Skip to main content
POST https://api.craftkit.dev/v1/renders/:id/email
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.

Authorization

Authorization
string
required
Bearer ck_live_…

Path parameters

id
string
required
The render id.

Body

to
string
required
Recipient email (valid email address).
recipientName
string
Recipient display name for the greeting (max 200 chars).
message
string
Optional note included in the email body (max 2000 chars).
expiresAt
string
ISO 8601 timestamp. Sets an expiry on the share link. Omit for no auto-expiry.

Response

201:
id
string
The created share id (channel email).
shareToken
string
shareUrl
string
The link delivered in the email: {shareBase}/share/{shareToken}.
emailMessageId
string
Resend provider message id for the sent email.
sentAt
string
ISO 8601 timestamp the email was dispatched.

Errors

StatuscodeMeaning
400invalid_jsonBody is not valid JSON.
400invalid_requestBody failed schema validation (issues included).
401unauthorizedMissing/invalid/revoked key.
404not_foundNo render with that id in this key’s project.
409not_readyRender has not succeeded yet.
502email_send_failedResend rejected the send.
503email_not_configuredResend is not configured (set RESEND_API_KEY + EMAIL_FROM).
cURL
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"
  }'
201
{
  "id": "…",
  "shareToken": "cks_…",
  "shareUrl": "https://www.craftkit.dev/share/cks_…",
  "emailMessageId": "re_…",
  "sentAt": "2026-06-06T09:05:00.000Z"
}