Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Request body for creating an email draft

agentId
string
required

Owning agent ID

Pattern: ^[cC][^\s-]{8,}$
fromIdentityId
string

Optional EmailIdentity ID to send from. Must belong to this agent and be verified.

Pattern: ^[cC][^\s-]{8,}$
to
string[]

Recipient email addresses (may be empty for an incomplete draft)

cc
string[]

CC recipients

bcc
string[]

BCC recipients

subject
string

Subject line

body
string

Plain-text body

bodyHtml
string

HTML body

inReplyTo
string

Optional In-Reply-To header for threading on send

references
string[]

Optional References chain for threading

metadata
object

Arbitrary metadata

Response

200 - application/json

OK

Email draft resource

id
string
required

Unique identifier of the draft

Pattern: ^[cC][^\s-]{8,}$
agentId
string
required

Owning agent ID

Pattern: ^[cC][^\s-]{8,}$
orgId
string
required

Owning organization ID

Pattern: ^[cC][^\s-]{8,}$
fromIdentityId
string | null
required

EmailIdentity used as the sender, or null to use the agent's primary identity at send time

Pattern: ^[cC][^\s-]{8,}$
to
string[]
required

Recipient email addresses

cc
string[]
required

CC recipient email addresses

bcc
string[]
required

BCC recipient email addresses

subject
string | null
required

Subject line, or null if not yet written

body
string | null
required

Plain-text body, or null if not yet written

bodyHtml
string | null
required

HTML body, or null if not provided

inReplyTo
string | null
required

Optional In-Reply-To Message-ID for threading on send

references
string[]
required

Optional References Message-ID chain for threading

metadata
object | null
required

Arbitrary metadata

createdAt
string<date-time>
required

Timestamp when the draft was created

updatedAt
string<date-time>
required

Timestamp when the draft was last updated