Messages
Submit certified messages and read their state.
GET /v1/messages
List messages of the tenant
Newest first. Combine from/to with status, or look up by clientTrackId.
- Authentication: API key in the
Authorization: Bearerheader - Scopes: at least one of
messages:read - operationId:
listMessages
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientTrackId | query | string | No | Only the message submitted with this clientTrackId (up to 128 characters). |
from | query | Timestamp | No | Accepted at or after this instant. |
to | query | Timestamp | No | Accepted before this instant. |
status | query | RecipientStatus | No | Only messages with at least one recipient in this state. |
cursor | query | Cursor | No | Opaque pagination token. Do not parse or build it. |
limit | query | integer | No | Maximum number of items per page, from 1 to 200 (default 50). |
If-None-Match | header | string | No | ETag of a previous response; a match answers 304 without a body. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | A page of messages. | MessagePage |
304 | Not modified since the ETag sent in If-None-Match. | — |
400 | The request is malformed. The body is not valid JSON or not a JSON object, a field is invalid (errors lists each one), a header or query parameter is invalid, or the Content-Type is not application/json where a JSON body is expected (unsupported_media on the control plane). | Problem |
401 | Missing or invalid API key. | Problem |
403 | The API key is not allowed to perform this operation. | Problem |
429 | Rate limit or quota exceeded. | Problem |
500 | Unexpected failure (internal_error). The request may be retried; keep the requestId when contacting support. | Problem |
503 | A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present. | Problem |
POST /v1/messages
Submit a certified message
Accepts a message for certified delivery. Nothing is sent before the request is
durably recorded, so a 202 means the message will be processed exactly once.
- Authentication: API key in the
Authorization: Bearerheader - Scopes: at least one of
messages:write - operationId:
submitMessage
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | Yes | Client-generated key, scoped to the tenant. Repeating a request with the same key and the same body returns the original response with Idempotent-Replayed: true; the same key with a different body is rejected with 422 idempotency_key_reused. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
from | EmailAddress | Yes | Sender address. It must be an authorized sender of the tenant, according to the sender policy. |
to | list of EmailAddress | Yes | Each recipient is sent, tracked and certified individually. |
cc | list of EmailAddress | No | Recipients in copy, up to 50. |
bcc | list of EmailAddress | No | A blind recipient never appears in the evidence of another recipient. |
replyTo | EmailAddress | No | Address that receives the replies, when it differs from the sender. |
subject | string | Yes | Subject of the message (1 to 998 characters, no control characters). |
html | string | No | HTML body. At least one of html or text is required. |
text | string | No | Plain-text body. At least one of html or text is required. |
attachments | list of InlineAttachment or UploadedAttachment | No | Attachments of the message, up to 50: inline (filename and contentBase64) or uploaded beforehand (attachmentId). |
options | MessageOptions | No | Per-message overrides of the configuration. Each one is resolved against the tenant, plan and platform levels and capped by their ceilings; the values really applied are returned in effectiveOptions. |
clientTrackId | string | No | Caller's own reference; searchable with GET /v1/messages?clientTrackId=. |
metadata | object | No | Free key/value pairs echoed back in queries and webhooks. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Replay of a request already accepted with the same Idempotency-Key. | SubmitMessageResponse |
202 | Accepted for delivery. | SubmitMessageResponse |
400 | The request is malformed. The body is not valid JSON or not a JSON object, a field is invalid (errors lists each one), a header or query parameter is invalid, or the Content-Type is not application/json where a JSON body is expected (unsupported_media on the control plane). | Problem |
401 | Missing or invalid API key. | Problem |
403 | The API key is not allowed to perform this operation. | Problem |
409 | A request with the same Idempotency-Key is still being processed (idempotency_request_in_progress). Retry after the number of seconds in Retry-After. | Problem |
413 | The message exceeds api.inline.maxBytes or api.message.maxBytes. | Problem |
422 | The request is well formed but cannot be accepted. | Problem |
429 | Rate limit or quota exceeded. | Problem |
503 | A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present. | Problem |
GET /v1/messages/{trackId}
Read a message and the state of each recipient
Returns the message metadata, per-recipient delivery/interaction state, and each
recipient's certification summary (state, pendingEvents, expectedBy,
latestReceipt). The ETag changes whenever any field in the representation—including
certification—changes; send If-None-Match to receive 304 Not Modified when unchanged.
- Authentication: API key in the
Authorization: Bearerheader - Scopes: at least one of
messages:read - operationId:
getMessage
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
trackId | path | TrackId | Yes | Server-generated ULID that identifies a message. |
If-None-Match | header | string | No | ETag of a previous response; a match answers 304 without a body. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | The message. | Message |
304 | Not modified since the ETag sent in If-None-Match. | — |
401 | Missing or invalid API key. | Problem |
403 | The API key is not allowed to perform this operation. | Problem |
404 | The resource does not exist or belongs to another tenant. | Problem |
429 | Rate limit or quota exceeded. | Problem |
500 | Unexpected failure (internal_error). The request may be retried; keep the requestId when contacting support. | Problem |
503 | A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present. | Problem |