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

# Email a render

> POST /v1/renders/:id/email — create an email share and deliver the document via Resend.

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

Creates an `email`-channel share **and** sends the document to the recipient via Resend in one
call. The render must have **succeeded**. Email must be configured on the deployment
(`RESEND_API_KEY` + a sender address) or this returns `503`. 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="to" type="string" required>Recipient email (valid email address).</ParamField>
<ParamField body="recipientName" type="string">Recipient display name for the greeting (max 200 chars).</ParamField>
<ParamField body="message" type="string">Optional note included in the email body (max 2000 chars).</ParamField>
<ParamField body="expiresAt" type="string">ISO 8601 timestamp. Sets an expiry on the share link. Omit for no auto-expiry.</ParamField>

## Response

`201`:

<ResponseField name="id" type="string">The created share id (channel `email`).</ResponseField>

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

<ResponseField name="shareUrl" type="string">The link delivered in the email: `{shareBase}/share/{shareToken}`.</ResponseField>
<ResponseField name="emailMessageId" type="string">Resend provider message id for the sent email.</ResponseField>
<ResponseField name="sentAt" type="string">ISO 8601 timestamp the email was dispatched.</ResponseField>

## Errors

| Status | code                   | Meaning                                                         |
| ------ | ---------------------- | --------------------------------------------------------------- |
| 400    | `invalid_json`         | Body is not valid JSON.                                         |
| 400    | `invalid_request`      | Body failed schema validation (`issues` included).              |
| 401    | `unauthorized`         | Missing/invalid/revoked key.                                    |
| 404    | `not_found`            | No render with that id in this key's project.                   |
| 409    | `not_ready`            | Render has not succeeded yet.                                   |
| 502    | `email_send_failed`    | Resend rejected the send.                                       |
| 503    | `email_not_configured` | Resend is not configured (set `RESEND_API_KEY` + `EMAIL_FROM`). |

```bash cURL theme={null}
curl -X POST https://api.craftkit.dev/v1/renders/$RENDER_ID/email \
  -H "Authorization: Bearer $CRAFTKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "client@acme.com",
    "recipientName": "Jane Doe",
    "message": "Here is your signed agreement.",
    "expiresAt": "2026-12-31T23:59:59Z"
  }'
```

```json 201 theme={null}
{
  "id": "…",
  "shareToken": "cks_…",
  "shareUrl": "https://www.craftkit.dev/share/cks_…",
  "emailMessageId": "re_…",
  "sentAt": "2026-06-06T09:05:00.000Z"
}
```
