Create Draft
POST
/
inboxes
/
:inbox_id
/
drafts
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.drafts.create({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
to: ['ada@example.org'],
subject: 'Refund for order 1041',
html: '<p>Refund issued for order 1041.</p>',
text: 'Refund issued for order 1041.',
});curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"to": ["ada@example.org"],
"subject": "Refund for order 1041",
"html": "<p>Refund issued for order 1041.</p>",
"text": "Refund issued for order 1041."
}'curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"reply_to_email_id": "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
"text": "Refund issued for order 1041."
}'resend inboxes drafts create \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--to ada@example.org \
--subject "Refund for order 1041" \
--html "<p>Refund issued for order 1041.</p>" \
--text "Refund issued for order 1041."{
"object": "inbox_draft",
"id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
"type": "standalone",
"to": ["ada@example.org"],
"cc": [],
"bcc": [],
"subject": "Refund for order 1041",
"html": "<p>Refund issued for order 1041.</p>",
"text": "Refund issued for order 1041.",
"thread_id": null,
"reply_to_email_id": null,
"email_id": null,
"created_at": "2026-08-05T14:12:04.110Z",
"updated_at": "2026-08-05T14:12:04.110Z"
}A draft is an unsent message. Omit thread_id for a new conversation. Pass thread_id and reply_to_email_id together to attach it as a reply. At least one of to, cc, bcc, subject, text, or html must be non-empty. Combined recipients cannot exceed 50. Returns 201 for a new draft, or 200 if that reply draft already exists.
Path Parameters
Section titled “Path Parameters”Body Parameters
Section titled “Body Parameters”string | string[] | null
Recipients. Each value may include a friendly name, for example Ada Lovelace <ada@example.org>.
string | string[] | null
CC recipients.
string | string[] | null
BCC recipients.
string | null
The subject. Max 2000 characters.
string | null
The HTML body.
string | null
The plain-text body.
Response Fields
Section titled “Response Fields”string
Always inbox_draft.
string
The ID of the draft.
string
standalone for a new conversation, or reply.
string[] | null
Recipients.
string[]
CC recipients.
string[]
BCC recipients.
string | null
The subject.
string | null
The HTML body.
string | null
The plain-text body.
string | null
The Thread ID when this draft is a reply. null otherwise.
string | null
The Email ID being replied to. null otherwise.
string | null
The queued outbound email after send. null until then.
string
ISO 8601 timestamp when the draft was created.
string
ISO 8601 timestamp when the draft was last saved.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.drafts.create({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
to: ['ada@example.org'],
subject: 'Refund for order 1041',
html: '<p>Refund issued for order 1041.</p>',
text: 'Refund issued for order 1041.',
});curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"to": ["ada@example.org"],
"subject": "Refund for order 1041",
"html": "<p>Refund issued for order 1041.</p>",
"text": "Refund issued for order 1041."
}'curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"reply_to_email_id": "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
"text": "Refund issued for order 1041."
}'resend inboxes drafts create \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--to ada@example.org \
--subject "Refund for order 1041" \
--html "<p>Refund issued for order 1041.</p>" \
--text "Refund issued for order 1041."{
"object": "inbox_draft",
"id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
"type": "standalone",
"to": ["ada@example.org"],
"cc": [],
"bcc": [],
"subject": "Refund for order 1041",
"html": "<p>Refund issued for order 1041.</p>",
"text": "Refund issued for order 1041.",
"thread_id": null,
"reply_to_email_id": null,
"email_id": null,
"created_at": "2026-08-05T14:12:04.110Z",
"updated_at": "2026-08-05T14:12:04.110Z"
}Was this page helpful?
⌘I