---
title: "Create a share token"
method: POST
path: "/api/preview/share"
tags: ["share"]
---

# Create a share token

`POST /api/preview/share`

## Request body

- object
  - `expiresAt` string, date-time — Optional expiry timestamp; ISO-8601 datetime with offset. Once reached, the share link returns 404.
  - `maxViews` integer — Optional view-count cap. Each share-link visit consumes one view.
  - `resourceId` string, required — UUID v4 string
  - `resourceType` 'capsule' | 'type' | 'collection', required — Type of resource being shared.

## Response `201`

Successful response

- object
  - `shareToken` object, required
  - `token` string, required — Share-link token

---

[API](https://skmtc.net/symbol/apis/symbol-api.md) · [All operations](https://skmtc.net/symbol/apis/symbol-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/symbol/symbol-api/revisions/c690ac22ae04/schema)
