Skip to main content
PATCH
Edit email draft

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

draftId
string
required
Minimum string length: 1

Body

application/json
updatedAt
string<date-time>
required

Exact updatedAt from the draft being edited. A stale version returns 409; read the draft again before reapplying your changes.

inboxId
string

Optional ownership check. Must match the original sending inbox; edits cannot move a draft.

Minimum string length: 1
to
string<email> | null

Recipient, or null to clear it.

Maximum string length: 254
cc
string<email>[]

Replace copy recipients; use [] to clear.

Maximum array length: 100
Maximum string length: 254
bcc
string<email>[]

Replace blind-copy recipients; use [] to clear.

Maximum array length: 100
Maximum string length: 254
subject
string

Replacement subject. Reply drafts must retain their original subject.

Maximum string length: 998
removeAttachmentIndex
integer

Zero-based index among regular (non-inline) attachments to remove.

Required range: x >= 0
bodyHtml
string

Replacement HTML body. The plain-text fallback is generated automatically. Use an empty string to clear the body, or omit to preserve it. Retain cid: references for inline images you want to keep. Plain-text body inputs are not accepted.

Maximum string length: 500000

Response

Updated unsent draft

Updated unsent draft

id
string
required
inboxId
string
required
to
string | null
required
cc
string[]
required
bcc
string[]
required
subject
string
required
bodyText
string | null
required
bodyHtml
string | null
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
threadId
string | null

Thread this draft will reply to when sent.

sourceThreadId
string | null

Conversation this draft was composed from.

attachments
object[]