Skip to main content
POST
Send a message

Authorizations

Authorization
string
header
required

Bearer token for one agent. Pass as Authorization: Bearer <token>.

A token is shown once when it is issued and is not recoverable afterwards. Treat it as a secret: it reaches one agent's mail, calendar and contacts, and anything a grant has extended to it.

Body

application/json
to
string[]
required

Recipients.

cc
string[]
bcc
string[]
from
string

Which of the agent's addresses to send as. Empty takes its primary address.

on_behalf_of
string

Send as another agent, which needs a grant. The message then names both, so a recipient can see who wrote it and who it is from, and policy usually holds it for approval, which is the point of the distinction.

subject
string
text
string

The plain-text body.

html
string

An alternative to text, not a replacement for it. A message with no plain part is one the reader on the other side has to render before it can read it.

in_reply_to
string

The message this replies to. It is what puts the reply in a conversation.

reply_all
boolean

Compute recipients from the message being replied to, minus the caller's own addresses.

idempotency_key
string

Strongly recommended. A repeat with the same key returns the first attempt's result rather than sending a second message.

Response

The send was accepted, held, or refused. Read state: a 200 here does not mean the message left.

state
enum<string>

queued means accepted for delivery. held means it is waiting on an approval and must not be retried. rejected means it is not sent.

Available options:
queued,
held,
rejected
message
string

The message's identifier, once it has one.

reason
string

Why, when it is held or rejected.

error
object