Messages
More ways to use this page
Search the message log
POST/v1/
TypeScript sendora
Python sendora
PHP $sendora->messages->search(
Java sendora
Key sk_… a server key
The messages of the server, newest first, one page at a time. A POST so that an address travels in the body and never in a URL. Messages older than the retention window are gone.
Request body
Every filter is optional; the page is newest first.
{
"recipient": "anna@example.com",
"status": "bounced",
"limit": 20
}recipientstring (at least 3, at most 254 characters)Messages to this address, in to, cc or bcc. A whole address matches exactly. Anything else of three characters or more matches anywhere in an address, such as kommun.se.
streamIdstring (uuid)Messages on this stream of the server.
broadcastIdstring (uuid)Messages of this broadcast.
tagstring (at least 1, at most 100 characters)statusone of 2Messages with at least one recipient in this state, or in any of these states.
- "queued" | "delivered" | "deferred" | "bounced" | "expired"
queued until the receiver answers; deferred while it keeps saying try later.
- array of "queued" | "delivered" | "deferred" | "bounced" | "expired", at least 1, at most 5
fromstring (date-time)Submitted at or after this time.
tostring (date-time)Submitted before this time.
limitinteger (1 to 100)default 50Page size, 1 to 100.
afterstring (uuid)The
nextvalue of the previous page.
Responses
Every field of a response is always present. A field that can be null says so in its type.
200A page of the messages that match, newest first.
Example (31 lines)
{
"messages": [
{
"messageId": "5f432ffd-c005-499b-aa3a-5b8a088ea20e",
"streamId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"broadcastId": null,
"status": "injected",
"from": "no-reply@example.se",
"subject": "Your invoice for September",
"tag": "invoice",
"metadata": {
"invoiceId": "2026-0912"
},
"submittedAt": "2026-09-15T12:00:00.000Z",
"test": false,
"recipients": [
{
"address": "anna@example.com",
"kind": "to",
"status": "delivered",
"tracked": true,
"opens": 2,
"clicks": 1,
"firstOpenAt": "2026-09-15T12:03:10.000Z",
"firstHumanOpenAt": "2026-09-15T12:03:10.000Z"
}
]
}
],
"next": null
}messagesarray of objectmessageIdstring (uuid)streamIdstring (uuid)The stream the message went on.
broadcastIdstring (uuid) or nullThe broadcast the message belongs to; null for a message sent on its own.
status"accepted" | "injected" | "failed"accepteduntil handed to the mail server,injectedafter;failedif that never worked.fromstringsubjectstringtagstring or nullmetadatamap of string to stringsubmittedAtstring (date-time)testbooleanTrue when the message went through a test server: its events were simulated and nobody received it.
recipientsarray of objectaddressstringkind"to" | "cc" | "bcc"status"queued" | "delivered" | "deferred" | "bounced" | "expired"queued until the receiver answers; deferred while it keeps saying try later.
trackedbooleanWhether tracking applied to this recipient’s copy when it left. It does not say to opens, links or both, or that the HTML held a link to track.
opensintegerOpens recorded, machines’ included.
clicksintegerClicks recorded, machines’ included.
firstOpenAtstring (date-time) or nullThe first open, or the first click that was likely a person’s. Null before that.
firstHumanOpenAtstring (date-time) or nullThe same, counting only what was likely a person. Null before that.
nextstring (uuid) or nullPass as
afterfor the next page; null on the last.
Errors
Every error answers error, the code, and message, a sentence for a person. A code that adds fields is shown in full below the table.
| Code | Status | Meaning |
|---|---|---|
invalid_ | 400 | The body, the query or a header does not match what the route takes. |
unauthorized | 401 | The key is missing, malformed or revoked. |
wrong_ | 403 | The key is of the other kind: a server key (sk_) where an account key (ak_) is needed, or the reverse. The message names the kind the operation takes. |
not_ | 403 | A connected app called an operation that no tool of the MCP server calls. An API key can. |
read_ | 403 | A connected app may only read here: the account is read only through a connection, and a live server takes changes only if the person allowed them when connecting. |
test_ | 403 | A connected app may create a secret, or do what cannot be undone, on a test server only. |
WWW-Authenticateheader on 401"Bearer"Always Bearer: send the key as Authorization: Bearer <key>.
invalid_request
Example
{
"error": "invalid_request",
"message": "The request is invalid: to.0: Invalid email address",
"issues": [
{
"path": "to.0",
"message": "Invalid email address"
}
]
}issuesarray of objectOne entry per invalid field; absent when a header is wrong.
pathstringrequiredThe field, dotted, such as to.0.email; empty when the whole body is wrong.
messagestringrequired