Skip to main content
Resend Docs
current

Search documentation

Type to search this documentation.

On this pageOverview

Create Draft

Create a draft on an inbox, either as a new conversation or as a reply.

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.

The Inbox ID.

  • to (string | string[] | null) — Recipients. Each value may include a friendly name, for example Ada Lovelace <ada@example.org>.

  • cc (string | string[] | null) — CC recipients.

  • bcc (string | string[] | null) — BCC recipients.

  • subject (string | null) — The subject. Max 2000 characters.

  • html (string | null) — The HTML body.

  • text (string | null) — The plain-text body.

The Thread ID to reply in. Must be sent with reply_to_email_id.

The Email ID to reply to, as returned in the thread's messages[].id. Must be sent with thread_id.

  • object (string) — Always inbox_draft.

  • id (string) — The ID of the draft.

  • type (string) — standalone for a new conversation, or reply.

  • to (string[] | null) — Recipients.

  • cc (string[]) — CC recipients.

  • bcc (string[]) — BCC recipients.

  • subject (string | null) — The subject.

  • html (string | null) — The HTML body.

  • text (string | null) — The plain-text body.

  • thread_id (string | null) — The Thread ID when this draft is a reply. null otherwise.

  • reply_to_email_id (string | null) — The Email ID being replied to. null otherwise.

  • email_id (string | null) — The queued outbound email after send. null until then.

  • created_at (string) — ISO 8601 timestamp when the draft was created.

  • updated_at (string) — ISO 8601 timestamp when the draft was last saved.

Node.js
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
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."
}'
Reply
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."
}'
CLI
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."
Response
{
  "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"
}
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu