Update Draft
Update fields on an existing draft.
PATCH
Updates the content of an unsent draft. Send at least one of
to, cc, bcc,
subject, text, html, or attachments. An empty body is rejected even when
the draft already has files. A body with none of these keys returns a 422, even
when it has other keys.
Fields you leave out stay as they are. html and text are the exception:
sending either one replaces both, and the one you leave out is saved as null.
For attachments, a present array replaces every file on the draft, [] or
null removes them, and leaving the field out keeps them.
After the update, the draft must still contain at least one non-empty field.
Files already on the draft count toward that. The combined recipients cannot
exceed 50. A draft that was already sent, or that changed during the request,
returns a 409.
Path Parameters
Body Parameters
string | string[] | null
Recipients. For multiple addresses, send an array of strings. Each value can
include a friendly name. 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. Max 2000 characters. Must not contain a line break. Pass
null
to clear.string | null
The HTML body. Pass
null to clear. Sending html or text replaces both,
and the one you leave out is saved as null.string | null
The plain-text body. Pass
null to clear. Sending html or text replaces
both, and the one you leave out is saved as null.array | null
Files to store on the draft. Each one needs
content, filename, and
content_type. path and content_id return 422. An empty file or a
blocked file type, such as .exe, returns 422. The files on a draft can
total at most 25 MB. A present array
replaces every file on the draft. [] or null removes them. Leave the field out to
keep the current files.Response Fields
string
Always
inbox_draft.string
The ID of the draft.
string
reply when the draft replies to an email in an existing thread. standalone
when the draft starts a new thread.string[] | null
Recipients.
null or empty when no recipients are set.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 ID of the outbound email queued when the draft was sent.
null until the
draft is sent.string
ISO 8601 timestamp when the draft was created.
string
ISO 8601 timestamp when the draft was last saved.
array
The files saved on the draft.