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

PATCH /inboxes/{inbox_id}/drafts/{draft_id} — Resend API

Resend API

Update an existing 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
→ 229 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 PATCH 'https://api.resend.com/inboxes/inbox-id/drafts/draft-id' \  -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 issued for order 1041",  "html": "<p>It works!</p>",  "text": "example-text",  "attachments": [    {      "content": "aGVsbG8gZTJl",      "filename": "receipt.pdf",      "content_type": "application/pdf"    }  ]}'

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.
draft_id path string Yes The Draft ID.
to body string Yes The recipients. For multiple addresses, send an array of strings. Each value can include a friendly name. Pass `null` to clear. 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. Pass `null` or `[]` to clear. 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. Pass `null` or `[]` to clear. 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. Cannot be only whitespace or contain a line break. Pass `null` to clear.
html body string No The HTML body. Pass `null` to clear.
text body string No The plain text body. Pass `null` to clear.
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. Sending the field replaces every attachment on the draft. Send `[]` to remove them all. `null` also removes them all.

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.