Skip to main content
POST
Create Draft
Composes a draft in one inbox without sending it. Takes to, cc, bcc, subject, text, html, labels, attachments, and in_reply_to / references to thread it. Returns the full draft including draft_id. Nothing leaves the account until you call post_agentmail_inbox_draft_send, which makes this the safe way to stage outbound mail for review. 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.

Body

application/json
labels
string[]

Labels 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.

text
string

Plain text body of draft.

html
string

HTML body of draft.

attachments
SendAttachment · object[]

Attachments to include in draft.

in_reply_to
string

ID of message being replied to.

send_at
string<date-time>

Time at which to schedule send draft.

client_id
string

Client ID of 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.