Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Update Draft

PATCH

/

inboxes

/

:inbox_id

/

drafts

/

:draft_id

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.inboxes.drafts.update({
  inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
  draftId: 'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32',
  subject: 'Refund issued for order 1041',
});
cURL
curl -X PATCH 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts/c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d $'{
  "subject": "Refund issued for order 1041"
}'
CLI
resend inboxes drafts update \
  --inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
  --draft_id c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32 \
  --subject "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 issued 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:13:22.004Z"
}

Omitted fields are left unchanged. Send at least one of to, cc, bcc, subject, text, or html. The merged draft must still contain at least one non-empty field. Combined recipients cannot exceed 50.

string | string[] | null

Recipients. Pass null to clear.

string | string[] | null

CC recipients. Pass null or [] to clear.

string | string[] | null

BCC recipients. Pass null or [] to clear.

string | null

The subject. Pass null to clear. Max 2000 characters.

string | null

The HTML body. Pass null to clear.

string | null

The plain-text body. Pass null to clear.

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.

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.inboxes.drafts.update({
  inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
  draftId: 'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32',
  subject: 'Refund issued for order 1041',
});
cURL
curl -X PATCH 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts/c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d $'{
  "subject": "Refund issued for order 1041"
}'
CLI
resend inboxes drafts update \
  --inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
  --draft_id c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32 \
  --subject "Refund issued for order 1041"
JSON
{
  "object": "inbox_draft",
  "id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
  "type": "standalone",
  "to": ["ada@example.org"],
  "cc": [],
  "bcc": [],
  "subject": "Refund issued 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:13:22.004Z"
}

Was this page helpful?

⌘I

Suggest an edit

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

Export
Documentation menu