Skip to main content
POST
Drafts let an agent compose an email without sending it. A draft can be plain, a reply (in_reply_to), or a forward (forward_of), and it keeps a monotonically increasing version so concurrent edits can be detected instead of silently overwritten. Sending a draft converts it into a permanent message and deletes the draft record. All endpoints below are scoped to a mailbox:

Create Draft

Path Parameters

string
required
Full mailbox address (eva@wireboxmail.com) or local agent handle (eva).

Body Parameters

string | string[]
Recipient email address(es). Required before the draft can be sent, but optional at creation time.
string
Draft subject line.
string
Plain-text body (alias: body_text).
string
HTML body (alias: body_html).
string | string[]
Optional CC recipients.
string | string[]
Optional BCC recipients.
string
Message ID to draft a reply to. Copies thread context when the reply is sent.
boolean
default:"false"
Draft a reply to every recipient of the parent message.
string
Message ID to draft a forward of.
boolean
default:"true"
Whether a forwarded draft copies the parent message’s attachments.
object[]
Optional attachments. Each object requires filename and base64 content; content_type and content_id are optional.
object
Optional custom RFC headers as a key/value map.

Draft Object

All draft endpoints return this object:
string
Unique draft identifier (drf_ prefix).
string
Mailbox the draft belongs to.
string | null
Thread the draft will join when sent (set for replies).
string | null
Parent message for reply drafts.
string | null
Parent message for forward drafts.
boolean
Whether the reply targets all parent recipients.
boolean
Whether forwarding copies parent attachments.
string[]
Recipient addresses.
string[]
CC addresses.
string[]
BCC addresses.
string | null
Draft subject.
string | null
Short preview of the body.
string | null
Plain-text body.
string | null
HTML body.
string
draft, sending, or sent. Drafts are removed once sent.
integer
Optimistic concurrency version, incremented on every update.
boolean
Whether the draft has attachments.
object[]
Attachment metadata: id, filename, content_type, size_bytes, content_id, and a signed download url.
object
Custom RFC headers.
string
ISO 8601 creation timestamp.
string
ISO 8601 update timestamp.

List Drafts

Query Parameters

integer
default:"50"
Number of drafts to return (1–100).
integer
default:"0"
Number of drafts to skip.
Response shape: { "drafts": [...], "count": <total>, "limit": <n>, "offset": <n> }, newest update first.

Get Draft

Returns a single draft with its attachments.

Update Draft

Updates recipients and bodies. Passing null explicitly clears a field; omitting it leaves the field unchanged.

Body Parameters

integer
Expected current version. If it does not match, the update is rejected with 409 instead of overwriting a newer revision.
string | string[] | null
Replace recipients, or clear them with null.
string | null
Replace or clear the subject.
string | null
Replace or clear the plain-text body (alias: body_text).
string | null
Replace or clear the HTML body (alias: body_html).
string | string[] | null
Replace or clear CC recipients.
string | string[] | null
Replace or clear BCC recipients.
object[]
Attachments to append (filename + base64 content).
string[]
Attachment IDs to remove.
object | null
Replace or clear custom RFC headers.
A 409 with draft_version_conflict means someone else updated the draft first — refetch it and re-apply your changes. A 409 with draft_not_editable means the draft is currently sending or has already been sent.
Response: the updated draft object (see Draft Object) with an incremented version.

Delete Draft

Permanently deletes the draft and cleans up its draft-scoped attachments.

Send Draft

Sends the draft as an outbound email and deletes the draft record. The draft is claimed atomically (draft → sending → sent), so concurrent send calls cannot double-send. Draft attachments are promoted into permanent message attachments.

Headers

string
Optional client-generated token that makes retries safe: replaying a send with the same key returns the original 201 response with an Idempotent-Replayed: true header instead of sending a second email.

Body Parameters

All fields are optional overrides applied only for this send (they do not modify the stored draft):
string | string[]
Override recipients.
string
Override subject.
string
Override plain-text body (alias: body_text).
string
Override HTML body (alias: body_html).
string | string[]
Override CC recipients.
string | string[]
Override BCC recipients.
The draft must have at least one recipient and text or HTML content, or the send is rejected with 400 and the draft is returned to draft status. A 409 with draft_send_in_progress means the draft is already sending or was already sent.

Response

string
Message ID of the sent email (msg_ prefix).
string
Thread the sent message belongs to.
string
Always sent.