> ## Documentation Index
> Fetch the complete documentation index at: https://docs.craftkit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Sharing

> Mint a durable, revisitable, revokable share link for a rendered PDF — a better artifact to hand a guest than the raw download URL.

A **share link** is a durable, guest-facing URL backed by a render. Unlike the raw `downloadUrl`,
a share can carry an optional expiry, be revoked, and is the right artifact to return to an end-user
for a record they will revisit. Your project `ck_live_` key can create shares.

## Create a share

[`POST /v1/renders/:id/shares`](/api-reference/create-share). The render must have **succeeded**
first (otherwise `409 not_ready`).

```bash theme={null}
curl -X POST https://api.craftkit.dev/v1/renders/$RENDER_ID/shares \
  -H "Authorization: Bearer $CRAFTKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "channel": "link", "expiresAt": "2026-12-31T23:59:59Z" }'
```

```json theme={null}
{
  "id": "…",
  "shareToken": "…",
  "shareUrl": "https://www.craftkit.dev/share/…",
  "channel": "link",
  "recipientEmail": null,
  "message": null,
  "expiresAt": "2026-12-31T23:59:59.000Z",
  "revokedAt": null,
  "createdAt": "2026-06-05T10:05:00.000Z"
}
```

Omit `expiresAt` for a link with no auto-expiry. If your project has a custom share domain
configured, `shareUrl` uses it.

## List and revoke

* `GET /v1/renders/:id/shares` lists all shares for a render (revoked included).
* `DELETE /v1/renders/:id/shares/:shareId` revokes a share (sets `revokedAt`); the link stops
  resolving immediately.

<Tip>
  For an offline-first record that crews revisit, return the `shareUrl` (durable, revokable) rather
  than the raw `downloadUrl`. You can always re-fetch the render itself later with
  [`GET /v1/renders/:id`](/api-reference/get-render).
</Tip>
