After sending
More ways to use this page
Messages and events
Every message you send is in the log, with its recipients, their statuses and a timeline of what Sendora’s mail server and the receivers said about it. Sendora keeps a message’s text and HTML only to deliver it, and never returns them, so keep what you send. The server’s Messages tab under Servers in the dashboard shows the same log.
Statuses
A message has a status of its own, which says whether Sendora’s mail server has it: accepted once stored, injected once the mail server has it, and failed if that never happened. The outcome for each recipient is in the recipient’s status.
Each recipient has a status too, which starts as queued. This table maps what happened to the recipient’s status, the timeline’s event and the webhook event:
| What happened | Status | Timeline event | Webhook event |
|---|---|---|---|
| Sendora’s mail server took the message | queued | Reception | none |
| The receiver accepted it | delivered | Delivery | delivered |
| The receiver asked Sendora to try later | deferred | TransientFailure | deferred |
| The receiver refused it | bounced | Bounce | bounced |
| A bounce report arrived later by mail | bounced | OOB | bounced |
| The receiver was still deferring after three days | expired | Expiration | bounced, with expired: true |
| The recipient reported it as spam | unchanged | Feedback | spam_ |
| The recipient unsubscribed from a broadcast stream | unchanged | none | unsubscribed |
| A tracked copy’s pixel loaded | unchanged | Open | opened |
| A tracked link was followed | unchanged | Click | clicked |
A status only moves forward, so a late deferral never undoes a delivery. delivered, bounced and expired are final. The one exception is a bounce report that arrives later, which turns delivered into bounced.
A timeline event has the SMTP code and the receiver’s text in details, where there is one. A Bounce also has a classification, such as InvalidRecipient, where Sendora can tell. Other event types are rare, and the recipient’s status reflects them.
Read a message with its timeline by its id:
GET /v1/messages/{messageId}curl https://api.sendora.se/v1/messages/{messageId} \
-H "Authorization: Bearer $SENDORA_API_TOKEN"import { Sendora } from '@sendora/sdk';
const sendora = new Sendora({
token: process.env.SENDORA_API_TOKEN,
});
const message = await sendora.messages.get(
'5f432ffd-c005-499b-aa3a-5b8a088ea20e',
);
for (const recipient of message.recipients) {
console.log(recipient.address, recipient.status);
}
for (const event of message.events) {
console.log(
event.at,
event.type,
event.code,
event.details,
);
}import os
from sendora import Sendora
sendora = Sendora(os.environ["SENDORA_API_TOKEN"])
message = sendora.messages.get(
"5f432ffd-c005-499b-aa3a-5b8a088ea20e"
)
for recipient in message.recipients:
print(recipient.address, recipient.status)
for event in message.events:
print(event.at, event.type, event.code, event.details)<?php
use Sendora\Sendora;
// The key comes from SENDORA_API_TOKEN.
$sendora = new Sendora();
$message = $sendora->messages->get(
'5f432ffd-c005-499b-aa3a-5b8a088ea20e',
);
foreach ($message->recipients as $recipient) {
printf(
"%s %s\n",
$recipient->address,
$recipient->status,
);
}
foreach ($message->events as $event) {
printf(
"%s %s %s %s\n",
$event->at->format('c'),
$event->type,
$event->code,
$event->details,
);
}import se.sendora.Sendora;
import se.sendora.model.MessageDetail;
class ReadMessage {
public static void main(String[] args) {
String messageId =
"5f432ffd-c005-499b-aa3a-5b8a088ea20e";
// The server key comes from SENDORA_API_TOKEN.
try (var sendora = Sendora.fromEnv()) {
MessageDetail message =
sendora.messages().get(messageId);
for (var recipient : message.recipients()) {
System.out.printf(
"%s %s%n",
recipient.address(),
recipient.statusAsString());
}
for (var event : message.events()) {
System.out.printf(
"%s %s %s%n",
event.at(),
event.typeAsString(),
event.details().orElse(""));
}
}
}
}Response (50 lines)
{
"messageId": "5f432ffd-c005-499b-aa3a-5b8a088ea20e",
"streamId": "3d1a2b4c-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"broadcastId": null,
"status": "injected",
"from": "no-reply@example.se",
"subject": "Your account is ready",
"tag": "welcome",
"metadata": {},
"submittedAt": "2026-09-15T12:00:00.000Z",
"test": false,
"recipients": [
{
"address": "anna@example.com",
"kind": "to",
"status": "delivered",
"tracked": false,
"opens": 0,
"clicks": 0,
"firstOpenAt": null,
"firstHumanOpenAt": null
}
],
"tracking": {
"recordingOpens": false,
"recordingClicks": false,
"skipped": null
},
"attachments": [],
"events": [
{
"recipient": "anna@example.com",
"type": "Reception",
"at": "2026-09-15T12:00:00.000Z",
"code": 250,
"details": null,
"classification": null,
"tracking": null
},
{
"recipient": "anna@example.com",
"type": "Delivery",
"at": "2026-09-15T12:00:02.000Z",
"code": 250,
"details": "2.0.0 OK",
"classification": null,
"tracking": null
}
]
}Opens and clicks
The log shows the opens and clicks of mail that is tracked. An administrator switches tracking on for a stream under its Settings tab in the dashboard, for opens, clicks or both. The account’s first switch asks them to accept the data processing agreement and to confirm consent. Tracking then applies to mail that leaves after the switch, if its from domain has a tracking domain that is ready. A test server needs no tracking domain, and two of its addresses act out an open and a click.
A message can override its stream. A send, a batch message or a broadcast takes trackOpens and trackLinks: true tracks that kind, and false leaves it out. A field you leave out follows the stream. Over SMTP, the headers X-Sendora-Track-Opens and X-Sendora-Track-Links do the same. A stream shows its own switches as trackOpens and trackLinks, and only the dashboard changes them.
| Code | Status | When |
|---|---|---|
tracking_ | 409 | A field is true, and no administrator has switched tracking on yet |
tracking_ | 403 | A field is true, and Sendora has withdrawn tracking from the account |
A false never fails, so you can always send without tracking.
Each recipient has these fields, in a message you read by its id and in a search:
| Field | What it says |
|---|---|
tracked | Whether 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 |
opens, clicks | How many were recorded, machines’ included |
firstOpenAt | The first open, or the first click that was likely a person’s; null before that |
firstHumanOpenAt | The same, counting only what was likely a person; null before that |
A message you read by its id also has tracking:
| Field | What it says |
|---|---|
recordingOpens | Whether new opens of this message are recorded now. Its own setting decides, then its broadcast’s, then its stream’s at this moment. So this can change after sending, and says nothing of what a copy carries |
recordingClicks | The same for clicks on its links |
skipped | Why tracking stayed out of at least one copy, or null. no_: the from domain had no working tracking domain. gmail_: see below |
Tracked links make a message longer. Where they would take the HTML past where Gmail clips it, the links stay as written and the message reads gmail_. The pixel still goes in.
An Open or a Click on the timeline has its code, details and classification set to null, and these fields in tracking, which is null on any other event:
| Field | What it says |
|---|---|
automated | Whether a machine rather than a person did it: likely, unlikely, or unknown where nobody can tell |
agent | The proxy or machine, where Sendora knows it: apple_, gmail_, gmail_, yahoo_, outlook_, proton_, scanner or crawler |
reasons | Why it was labelled a machine’s: privacy_, prefetch_, delivery_, link_, scanner_, bot_ or many_ |
client | The mail program, where Sendora knows it: apple_, gmail, outlook, yahoo, thunderbird, proton, browser or other |
device | The kind of device, where Sendora knows it: desktop, mobile or tablet |
first | The recipient’s first event of this kind |
firstHuman | The recipient’s first event of this kind that was likely a person’s |
link | The link clicked, or null on an Open: its index in the HTML, the same in every copy, and its url while the text and HTML are kept |
A label is a judgement. Apple’s privacy protection fetches every image whether or not anyone reads the mail, so those opens read unknown. A mail gateway that scans one link late can pass as a person. A person’s click also counts as an open, though it adds nothing to opens.
The timeline may not hold every open and click, while opens and clicks count them all. Limits gives how many a recipient keeps and how many a read returns.
Search the log
Every filter is optional:
| Filter | Matches |
|---|---|
recipient | Messages to this address, or with this part of one, in to, cc or bcc |
streamId | Messages on this stream |
broadcastId | Messages of this broadcast |
tag | Messages with this tag |
status | Messages with at least one recipient in this status, or in any of a list of statuses |
from | Messages submitted at or after this time |
to | Messages submitted before this time |
A whole address in recipient matches exactly. Three characters or more of one match anywhere in an address, such as kommun.
from and to are times, not addresses. A recipient address travels in the request body, never in a URL. The results are newest first, in the page sizes on Limits. Pass next as after for the next page.
POST /v1/messages/searchcurl -X POST https://api.sendora.se/v1/messages/search \
-H "Authorization: Bearer $SENDORA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "welcome",
"from": "2026-09-01T00:00:00Z",
"limit": 20
}'import { Sendora } from '@sendora/sdk';
const sendora = new Sendora({
token: process.env.SENDORA_API_TOKEN,
});
const page = await sendora.messages.search({
tag: 'welcome',
from: '2026-09-01T00:00:00Z',
limit: 20,
});
for (const message of page.messages) {
console.log(
message.submittedAt,
message.subject,
message.recipients[0]?.status,
);
}
console.log(
page.next === null
? 'last page'
: `next page after ${page.next}`,
);import os
from sendora import Sendora
sendora = Sendora(os.environ["SENDORA_API_TOKEN"])
page = sendora.messages.search(
tag="welcome", from_="2026-09-01T00:00:00Z", limit=20
)
for message in page.messages:
print(
message.submitted_at,
message.subject,
message.recipients[0].status,
)
if page.next is None:
print("last page")
else:
print(f"next page after {page.next}")<?php
use Sendora\Sendora;
// The key comes from SENDORA_API_TOKEN.
$sendora = new Sendora();
$page = $sendora->messages->search(
tag: 'welcome',
from: '2026-09-01T00:00:00Z',
limit: 20,
);
foreach ($page->messages as $message) {
printf(
"%s %s %s\n",
$message->submittedAt->format('c'),
$message->subject,
$message->recipients[0]->status ?? '',
);
}
if ($page->next === null) {
echo "last page\n";
} else {
echo "next page after {$page->next}\n";
}import java.time.Instant;
import se.sendora.Sendora;
import se.sendora.model.MessagePage;
import se.sendora.model.MessageSearch;
class SearchMessages {
public static void main(String[] args) {
MessageSearch search =
MessageSearch.builder()
.tag("welcome")
.from(Instant.parse("2026-09-01T00:00:00Z"))
.limit(20)
.build();
// The server key comes from SENDORA_API_TOKEN.
try (var sendora = Sendora.fromEnv()) {
MessagePage page =
sendora.messages().search(search);
for (var message : page.messages()) {
var first = message.recipients().getFirst();
System.out.printf(
"%s %s %s%n",
message.submittedAt(),
message.subject(),
first.statusAsString());
}
System.out.println(
page.next()
.map(next -> "next page after " + next)
.orElse("last page"));
}
}
}Response (29 lines)
{
"messages": [
{
"messageId": "5f432ffd-c005-499b-aa3a-5b8a088ea20e",
"streamId": "3d1a2b4c-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"broadcastId": null,
"status": "injected",
"from": "no-reply@example.se",
"subject": "Your account is ready",
"tag": "welcome",
"metadata": {},
"submittedAt": "2026-09-15T12:00:00.000Z",
"test": false,
"recipients": [
{
"address": "anna@example.com",
"kind": "to",
"status": "delivered",
"tracked": false,
"opens": 0,
"clicks": 0,
"firstOpenAt": null,
"firstHumanOpenAt": null
}
]
}
],
"next": null
}messages takes the same filters and walks every page for you, for for await. Its from and to also take a Date.
messages takes the same filters and walks every page for you, as an iterator. Its from_ and to also take an aware datetime.
$sendora->messages->searchAll() takes the same filters and walks every page for you, as a generator. Its from and to also take a DateTimeInterface.
sendora takes the same MessageSearch as search(), and walks every page for you, as an Iterable for a for loop. Its from and to take an Instant.
How long a message is kept
Sendora deletes the content of a message’s attachments as soon as its mail server has the message, or once the message has failed. Their names, types and sizes stay in the log. The text and HTML go next, with the URL of each click, whose link keeps its index. The message, its recipients and its events go last. Limits gives each period, and a test server keeps less.
When a recipient asks you to erase their data, use an erasure request.