Resend icon

Resend

Send emails, manage contacts, create broadcasts, handle templates, domains, segments, topics, and webhooks using the Resend email platform

Inbox Draft → Update

AI-generated

Summary

Update an existing draft email in a specified inbox by setting or clearing its properties such as recipients, subject, body, and attachments. Attachments can be added from binary data or remote URLs; URL attachments are downloaded when the draft is saved. Attachments replace all existing ones; the total size limit is 25 MB. Invalid attachments (empty files, blocked types, unsupported or undownloadable URLs, or downloads exceeding 20 seconds) cause an error.

Inputs

  • Authentication (required) — Choose the method of authentication: API Key or OAuth2.
  • Inbox (required) — Select the inbox containing the draft to update, by list selection, inbox ID, or email address.
  • Draft ID (required) — The unique identifier of the draft to update.
  • Update Fields — Fields to update on the draft including To, CC, BCC email addresses, Subject (max 2000 characters), plain-text body, HTML body, and attachments. Attachments can be binary data or remote URLs, replacing all existing attachments; total size limit is 25 MB. An empty file, blocked file type, or a URL that is not http or https or cannot be downloaded causes an error, as do downloads taking more than 20 seconds together.
  • Clear Fields — Specify one or more draft fields to clear. Clearing a field removes its value and overrides any update value for that field. Options include Attachments, BCC, CC, HTML, Subject, Text, and To.

Output shape

a single JSON object containing the updated draft's data as returned by the Resend API

The returned data includes all draft properties after the update. If attachments are provided, they replace all existing attachments. Invalid attachments (empty or blocked file types) cause an error. Multiple recipient fields accept comma-separated email addresses.

Examples

Example 1: Update draft with new recipient, subject, and HTML body

Specify the inbox, provide the draft ID, set To, Subject, and HTML fields in update fields.

Example 2: Clear attachments and set plain-text body only

Use 'Clear Fields' to clear attachments, then provide a new Text body in update fields.

Links

Discussion