X-API-Key; supported user and identity tokens can also access
these routes. Content mutations use optimistic concurrency: read the current
generation, include it in the next mutation, and replace your local value with
the generation returned by the API.
Create draft
DraftDetailResponse with status 201 and generation 1.
The optional Idempotency-Key header makes an initial create safe to retry with
the exact same request. If the created draft still exists, a matching retry
returns it instead of creating a duplicate. Reusing the key with different
content, or after the draft was sent or deleted, returns
409 idempotency_key_reused; use a new key for a new logical create.
Request body
Forward drafts use
forward_note_text and forward_note_html instead of the
generic body fields. Reply fields and forward fields cannot be combined.
Example
bash
in_reply_to_message_id; detail responses expose
the resolved header as in_reply_to.
List drafts
JSON
Get draft
DraftDetailResponse, including bodies and attachment
descriptors. A draft may be read in any send state.
Update draft
generation is required. Omitted fields
are preserved; an explicit null clears a nullable field. Attachments are
preserved and are changed through the attachment endpoints.
bash
Duplicate draft
1, and a new Message-ID. It uses storage independently from the
source.
JSON
uncertain: review the copy before deciding whether to send it.
Delete draft
204 No Content. An uncertain draft can be deleted; a draft currently being sent cannot.
Add attachments
DraftDetailResponse and a new generation.
JSON
AttachmentUpload has filename, content_type, and content_base64, with
filename and content type limited to 255 characters. A request can add up to 50
attachments, and decoded attachment input cannot exceed 25 MB. Requests may be
rejected for policy reasons. The complete encoded draft must remain below 9.5 MiB.
The optional content_id marks an inline image referenced from HTML as
cid:<content_id>. Content IDs must be unique, use an image/* content type,
and require the draft to have an HTML body. Forward drafts do not accept inline
attachments.
Remove attachment
part_index. Returns the
updated detail and generation. Part indexes belong to a specific generation, so
always use a descriptor from the revision you are mutating.
For a wrapped forward, the message/rfc822 part containing the original message
cannot be removed. Other attachments remain removable.
Download attachment
bash
Send draft
JSON
Response objects
DraftSummaryResponse
DraftDetailResponse
Includes every summary field plus:in_reply_to_message_id is the create/update request field;
in_reply_to is the detail response field.
DraftAttachmentResponse
Conflicts and delivery state
Draft conflicts use409 Conflict. Branch on detail.error, not on status alone.
An uncertain draft is readable and deletable but cannot be edited or sent.

