> ## 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.

# Create a share

> POST /v1/renders/:id/shares — mint a durable, revokable share link for a succeeded render.

<Info>**POST** `https://api.craftkit.dev/v1/renders/:id/shares`</Info>

Creates a guest-facing share link for a render. The render must have **succeeded**. See
[Sharing](/guides/sharing).

## Authorization

<ParamField header="Authorization" type="string" required>`Bearer ck_live_…`</ParamField>

## Path parameters

<ParamField path="id" type="string" required>The render id.</ParamField>

## Body

<ParamField body="channel" type="string" default="link">`link` or `email`.</ParamField>
<ParamField body="recipientEmail" type="string">Recipient email (valid email; used with `channel: "email"`).</ParamField>
<ParamField body="message" type="string">Optional message (max 2000 chars).</ParamField>
<ParamField body="expiresAt" type="string">ISO 8601 timestamp. Omit for no auto-expiry.</ParamField>

## Response

`201`:

<ResponseField name="id" type="string" />

<ResponseField name="shareToken" type="string" />

<ResponseField name="shareUrl" type="string">`{shareBase}/share/{shareToken}`.</ResponseField>

<ResponseField name="channel" type="string" />

<ResponseField name="recipientEmail" type="string | null" />

<ResponseField name="message" type="string | null" />

<ResponseField name="expiresAt" type="string | null" />

<ResponseField name="revokedAt" type="string | null" />

<ResponseField name="createdAt" type="string" />

## Errors

| Status | code        | Meaning                                       |
| ------ | ----------- | --------------------------------------------- |
| 404    | `not_found` | No render with that id in this key's project. |
| 409    | `not_ready` | Render has not succeeded yet.                 |

## Related

* `GET /v1/renders/:id/shares` — list shares for a render.
* `DELETE /v1/renders/:id/shares/:shareId` — revoke a share.

```bash cURL 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 201 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"
}
```
