Skip to content

Send plain-text email

POST
/api/v1/messages/send

Enqueued: answers 202 with the execution receipt; poll action_executions.get for the outcome. idempotency_key is required: repeating the call with the same key and arguments answers the same execution.

object
connection_id
required

Active connected Gmail mailbox with read and send grants.

string format: uuid
mode
required

New requires subject and forbids thread_id; reply requires thread_id and messages:read, forbids subject, and uses the authorised anchor.

string
Allowed values: new reply
thread_id
string format: uuid
subject
string
>= 1 characters
to
Array<string>
<= 50 items
cc
Array<string>
<= 50 items
bcc
Array<string>
<= 50 items
body
required

Plain text, at most 65536 UTF-8 bytes. Exact bytes are preserved; no attachments.

string
idempotency_key
required

Your key for this call: a repeat with the same key and arguments answers the same execution, and the same key with other arguments is 409 idempotency_key_reused. Unique per caller.

string
>= 1 characters <= 200 characters

Success

object
id
required
string format: uuid
organization_id
required
string format: uuid
operation
required

The enqueued operation this executes, for example messages.send.

string
status
required

Queued (waiting or between attempts), claimed (an attempt is running), done or failed.

string
Allowed values: queued claimed done failed
arguments
required

The operation’s final arguments, fixed when it was authorised.

object
key
additional properties
action_request_id
required

The approved action request this executes; null for a direct call.

string | null format: uuid
created_by
required

The principal that asked: the proposer for an approved request, the caller for a direct call.

string format: uuid
authorised_by
required

The principal whose authority it runs under: the approver, or the caller for a direct call.

string format: uuid
idempotency_key
required

The caller’s key of a direct call; null for an approved request.

string | null
result

What the operation produced; null until done.

error_code
required

Why it failed: reauth_required, permission_missing, anchor_missing, provider_rejected, outcome_unknown, attempts_exhausted or deadline_passed.

string | null
error_message
required

The vault’s sentence for the failure; never a provider’s own text.

string | null
deadline_at
required

When a never-attempted execution stops being attempted.

string
done_at
required

When it was executed: when it finished, done or failed; null while queued or claimed.

string | null
created_at
required

When it was queued: the moment it was authorised. For an approved action request that is the approval, equal to the request’s decided_at; for a direct call, the call.

string
updated_at
required
string