v34

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-21119235265.2 KB
InboxesDrafts

Update Draft

Edit fields on an existing draft. Passing null clears a field (or [] for a recipient field); send_at: null un-schedules a scheduled draft. A draft that is already being sent cannot be edited.

CLI:

agentmail inboxes:drafts update --inbox-id <inbox_id> --draft-id <draft_id> --subject "Updated subject"
patch/v0/inboxes/{inbox_id}/drafts/{draft_id}

Path parameters

inbox_idstring required

The ID of the inbox.

draft_idstring required

ID of draft.

Request body

reply_tostring[]

Reply-to addresses. In format username@domain.com or Display Name <username@domain.com>.

tostring[]

Addresses of recipients. In format username@domain.com or Display Name <username@domain.com>.

ccstring[]

Addresses of CC recipients. In format username@domain.com or Display Name <username@domain.com>.

bccstring[]

Addresses of BCC recipients. In format username@domain.com or Display Name <username@domain.com>.

subjectstring

Subject of draft.

textstring

Plain text body of draft.

htmlstring

HTML body of draft.

remove_attachmentsAttachmentId[] nullable

IDs of attachments to remove from the draft.

add_labelsstring[]

Labels of draft.

remove_labelsstring[]

Labels of draft.

send_atstring date-time

Time at which to schedule send draft.

Response

inbox_idstring required

The ID of the inbox.

draft_idstring required

ID of draft.

client_idstring

Client ID of draft.

labelsstring[] required

Labels of draft.

reply_tostring[]

Reply-to addresses. In format username@domain.com or Display Name <username@domain.com>.

tostring[]

Addresses of recipients. In format username@domain.com or Display Name <username@domain.com>.

ccstring[]

Addresses of CC recipients. In format username@domain.com or Display Name <username@domain.com>.

bccstring[]

Addresses of BCC recipients. In format username@domain.com or Display Name <username@domain.com>.

subjectstring

Subject of draft.

previewstring

Text preview of draft.

textstring

Plain text body of draft.

htmlstring

HTML body of draft.

in_reply_tostring

ID of message being replied to.

forward_ofstring

ID of message being forwarded.

referencesstring[] nullable

IDs of previous messages in thread.

send_status'scheduled' | 'sending' | 'failed'

Schedule send status of draft.

send_atstring date-time

Time at which to schedule send draft.

updated_atstring date-time required

Time at which draft was last updated.

created_atstring date-time required

Time at which draft was created.