apicheats.dev resend/llms.txt Raw .md
POST

POST /inboxes/{inbox_id}/drafts — Resend API

Resend API

Create a draft

Base URL
https://api.resend.com
Auth
Authorization: Bearer <RESEND_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 233 tokens · Vary: Accept

Critical gotchas

All requests must include a User-Agent header (e.g. User-Agent: my-app/1.0) or the API returns HTTP 403.

The to field accepts either a single recipient email address string or an array of strings for multiple recipients (max 50).

cURL

curl -X POST 'https://api.resend.com/inboxes/inbox-id/drafts' \  -H "Authorization: Bearer $RESEND_API_KEY" \  -H 'User-Agent: my-app/1.0' \  -H 'Content-Type: application/json' \  -d '{  "to": [    "[email protected]"  ],  "cc": "example-cc",  "bcc": "example-bcc",  "subject": "Refund for order 1041",  "html": "<p>Refund issued for order 1041.</p>",  "text": "Refund issued for order 1041.",  "attachments": [    {      "content": "aGVsbG8gZTJl",      "filename": "receipt.pdf",      "content_type": "application/pdf"    }  ],  "thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",  "reply_to_email_id": "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60"}'

Parameters

Name In Type Required Description
inbox_id path string Yes The Inbox ID or the inbox email address, such as `[email protected]`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.
to body string No The recipients. For multiple addresses, send an array of strings. Each value can include a friendly name, for example `Ada Lovelace <[email protected]>`. Each address is `[email protected]` or `Name <[email protected]>`. An address that is not valid returns a 422.
cc body string No The CC recipients. For multiple addresses, send an array of strings. Each address is `[email protected]` or `Name <[email protected]>`. An address that is not valid returns a 422.
bcc body string No The BCC recipients. For multiple addresses, send an array of strings. Each address is `[email protected]` or `Name <[email protected]>`. An address that is not valid returns a 422.
subject body string No The subject. Max 2000 characters. A string that is only whitespace, or that contains a line break, is rejected.
html body string No The HTML body.
text body string No The plain text body.
attachments body object[] No Files to store on the draft. Each one needs `content`, `filename` and `content_type`. A `path` without `content` returns a 422, and when both are sent, `path` is ignored. A `content_id` returns a 422. The files on a draft can total at most 25 MB. An empty file or a blocked file type returns a 422.
thread_id body string No The Thread ID to reply in. Must be sent with `reply_to_email_id`.
reply_to_email_id body string No The Email ID to reply to, as returned in `data[].id` by the list thread emails endpoint. Must be sent with `thread_id`.

Response 200 OK

{
  "object": "inbox_draft",
  "id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32"
}
Get a free Resend API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.