Skip to main content
PATCH
Update Draft
Rewrites an unsent draft’s recipients, subject, body or attachments and returns the full draft after the change. Still sends nothing — post_agentmail_inbox_draft_send does that. Writes to the shared AgentMail workspace: Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created, and what you write here is visible and editable by the next caller.

Example

Authorizations

Authorization
string
header
required

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

Headers

Authorization
string
required

Bearer authentication

Path Parameters

inbox_id
string
required

The ID of the inbox.

draft_id
string
required

ID of draft.

Body

application/json
reply_to
string[]

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

to
string[]

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

cc
string[]

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

bcc
string[]

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

subject
string

Subject of draft.

text
string

Plain text body of draft.

html
string

HTML body of draft.

send_at
string<date-time>

Time at which to schedule send draft.

Response

Response with status 200

inbox_id
string
required

The ID of the inbox.

draft_id
string
required

ID of draft.

labels
string[]
required

Labels of draft.

updated_at
string<date-time>
required

Time at which draft was last updated.

created_at
string<date-time>
required

Time at which draft was created.

client_id
string

Client ID of draft.

reply_to
string[]

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

to
string[]

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

cc
string[]

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

bcc
string[]

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

subject
string

Subject of draft.

preview
string

Text preview of draft.

text
string

Plain text body of draft.

html
string

HTML body of draft.

attachments
Attachment · object[]

Attachments in draft.

in_reply_to
string

ID of message being replied to.

references
string[]

IDs of previous messages in thread.

send_status
enum<string>

Schedule send status of draft.

Available options:
scheduled,
sending,
failed
send_at
string<date-time>

Time at which to schedule send draft.