More ways to use this page
API reference
Transactional email delivery. Every request carries an API key as a bearer token: a server key (sk_) for everything inside one server, an account key (ak_) for what belongs to the account; a key of the wrong kind answers 403 wrong_token_kind. Every error answers a JSON body with an error code and a message.
Base URL https://api.sendora.se. Every request carries Authorization: Bearer and an API key: a server key (sk_) for everything inside one server, an account key (ak_) for what belongs to the account. Every error answers JSON with an error code and a message; the codes are listed under each route. Timestamps are ISO 8601 in UTC. Each route has a page of its own; the same document is served as OpenAPI 3.1.
Sending
Hand messages over for delivery.
- Send one message
POST /v1/email TypeScript
sendora.email .send( message) Python
sendora.email .send( **message) PHP
$sendora->email->send(...$message) Java
sendora.email() .send( email) - Send up to 100 messages
POST /v1/email/ batch TypeScript
sendora.email .sendBatch( messages) Python
sendora.email .send_ batch( messages) PHP
$sendora->email->sendBatch($messages) Java
sendora.email() .sendBatch( emails)
Messages
The message log and each message’s timeline.
- Read a message
GET /v1/messages/ {id} TypeScript
sendora.messages .get( messageId) Python
sendora.messages .get( message_ id) PHP
$sendora->messages->get($messageId) Java
sendora.messages() .get( messageId) - Search the message log
POST /v1/messages/ search TypeScript
sendora.messages .search( filters) Python
sendora.messages .search( **filters) PHP
$sendora->messages->search(...$filters) Java
sendora.messages() .search( search)
Streams
The streams of the server: transactional, broadcast, and at most one inbound.
- List the streams
GET /v1/streams TypeScript
sendora.streams .list() Python
sendora.streams .list() PHP
$sendora->streams->list()Java
sendora.streams() .list() - Create a stream
POST /v1/streams TypeScript
sendora.streams .create( { kind, name }) Python
sendora.streams .create( kind=..., name=...) PHP
$sendora->streams->create(kind: $kind, name: $name) Java
sendora.streams() .create( request) - Read a stream
GET /v1/streams/ {id} TypeScript
sendora.streams .get( streamId) Python
sendora.streams .get( stream_ id) PHP
$sendora->streams->get($streamId) Java
sendora.streams() .get( streamId) - Update a stream
PATCH /v1/streams/ {id} TypeScript
sendora.streams .update( streamId, { name, contentRetentionDays }) Python
sendora.streams .update( stream_ id, name=..., content_ retention_ days=...) PHP
$sendora->streams->update($streamId, name: $name, contentRetentionDays: $contentRetentionDays) Java
sendora.streams() .update( streamId, request) - Archive a stream
POST /v1/streams/ {id}/ archive TypeScript
sendora.streams .archive( streamId) Python
sendora.streams .archive( stream_ id) PHP
$sendora->streams->archive($streamId) Java
sendora.streams() .archive( streamId)
Broadcasts
One message to many, sent as a broadcast.
- List the broadcasts
GET /v1/broadcasts TypeScript
sendora.broadcasts .list( query) Python
sendora.broadcasts .list( limit=..., after=...) PHP
$sendora->broadcasts->list(limit: $limit, after: $after) Java
sendora.broadcasts() .list( query) - Send a broadcast
POST /v1/broadcasts TypeScript
sendora.broadcasts .send( broadcast) Python
sendora.broadcasts .send( **broadcast) PHP
$sendora->broadcasts->send(...$broadcast) Java
sendora.broadcasts() .send( request) - Get a broadcast
GET /v1/broadcasts/ {id} TypeScript
sendora.broadcasts .get( broadcastId) Python
sendora.broadcasts .get( broadcast_ id) PHP
$sendora->broadcasts->get($broadcastId) Java
sendora.broadcasts() .get( broadcastId) - Cancel a broadcast
POST /v1/broadcasts/ {id}/ cancel TypeScript
sendora.broadcasts .cancel( broadcastId) Python
sendora.broadcasts .cancel( broadcast_ id) PHP
$sendora->broadcasts->cancel($broadcastId) Java
sendora.broadcasts() .cancel( broadcastId)
Suppressions
Addresses the server no longer sends to.
- List the suppressed addresses
GET /v1/suppressions TypeScript
sendora.suppressions .list( query) Python
sendora.suppressions .list( stream_ id=..., limit=..., after=...) PHP
$sendora->suppressions->list(streamId: $streamId, limit: $limit, after: $after) Java
sendora.suppressions() .list( query) - Lift a suppression
POST /v1/suppressions/ delete TypeScript
sendora.suppressions .delete( { address }) Python
sendora.suppressions .delete( address=...) PHP
$sendora->suppressions->delete(address: $address) Java
sendora.suppressions() .delete( request)
Not-tracked list
Addresses the server never tracks.
- List the not-tracked addresses
GET /v1/tracking-opt-outs TypeScript
sendora.trackingOptOuts .list( query) Python
sendora.tracking_ opt_ outs .list( limit=..., after=...) PHP
$sendora->trackingOptOuts->list(limit: $limit, after: $after) Java
sendora.trackingOptOuts() .list( query) - Add a not-tracked address
POST /v1/tracking-opt-outs TypeScript
sendora.trackingOptOuts .add( { address }) Python
sendora.tracking_ opt_ outs .add( address=...) PHP
$sendora->trackingOptOuts->add(address: $address) Java
sendora.trackingOptOuts() .add( address) - Remove a not-tracked address
POST /v1/tracking-opt-outs/ delete TypeScript
sendora.trackingOptOuts .delete( { address }) Python
sendora.tracking_ opt_ outs .delete( address=...) PHP
$sendora->trackingOptOuts->delete(address: $address) Java
sendora.trackingOptOuts() .delete( address)
Webhooks
Where events are posted, signed with each of the webhook’s live secrets, and every delivery of them.
- List the webhooks
GET /v1/webhooks TypeScript
sendora.webhooks .list() Python
sendora.webhooks .list() PHP
$sendora->webhooks->list()Java
sendora.webhooks() .list() - Create a webhook
POST /v1/webhooks TypeScript
sendora.webhooks .create( { url, events }) Python
sendora.webhooks .create( url=..., events=...) PHP
$sendora->webhooks->create(url: $url, events: $events) Java
sendora.webhooks() .create( request) - Read a webhook
GET /v1/webhooks/ {id} TypeScript
sendora.webhooks .get( webhookId) Python
sendora.webhooks .get( webhook_ id) PHP
$sendora->webhooks->get($webhookId) Java
sendora.webhooks() .get( webhookId) - Remove a webhook
DELETE /v1/webhooks/ {id} TypeScript
sendora.webhooks .delete( webhookId) Python
sendora.webhooks .delete( webhook_ id) PHP
$sendora->webhooks->delete($webhookId) Java
sendora.webhooks() .delete( webhookId) - List the deliveries of a webhook
GET /v1/webhooks/ {id}/ deliveries TypeScript
sendora.webhooks .deliveries( webhookId, query) Python
sendora.webhooks .deliveries( webhook_ id, status=..., limit=..., after=...) PHP
$sendora->webhooks->deliveries($webhookId, status: $status, limit: $limit, after: $after) Java
sendora.webhooks() .deliveries( webhookId, query) - Replay a delivery
POST /v1/webhooks/ {id}/ deliveries/ {deliveryId}/ replay TypeScript
sendora.webhooks .replay( webhookId, deliveryId) Python
sendora.webhooks .replay( webhook_ id, delivery_ id) PHP
$sendora->webhooks->replay($webhookId, $deliveryId) Java
sendora.webhooks() .replay( webhookId, deliveryId) - Create a signing secret
POST /v1/webhooks/ {id}/ secrets TypeScript
sendora.webhooks .createSecret( webhookId) Python
sendora.webhooks .create_ secret( webhook_ id) PHP
$sendora->webhooks->createSecret($webhookId) Java
sendora.webhooks() .createSecret( webhookId) - Delete a signing secret
DELETE /v1/webhooks/ {id}/ secrets/ {secretId} TypeScript
sendora.webhooks .deleteSecret( webhookId, secretId) Python
sendora.webhooks .delete_ secret( webhook_ id, secret_ id) PHP
$sendora->webhooks->deleteSecret($webhookId, $secretId) Java
sendora.webhooks() .deleteSecret( webhookId, secretId)
Inbound
The mail the server has received: the messages, their raw form and their attachments.
- Search received messages
POST /v1/inbound/ search TypeScript
sendora.inbound .search( filters) Python
sendora.inbound .search( **filters) PHP
$sendora->inbound->search(...$filters) Java
sendora.inbound() .search( search) - Read a received message
GET /v1/inbound/ {id} TypeScript
sendora.inbound .get( inboundMessageId) Python
sendora.inbound .get( inbound_ message_ id) PHP
$sendora->inbound->get($inboundMessageId) Java
sendora.inbound() .get( inboundMessageId) - Download the raw message
GET /v1/inbound/ {id}/ raw TypeScript
sendora.inbound .raw( inboundMessageId) Python
sendora.inbound .raw( inbound_ message_ id) PHP
$sendora->inbound->raw($inboundMessageId) Java
sendora.inbound() .raw( inboundMessageId) - Download an attachment
GET /v1/inbound/ {id}/ attachments/ {attachmentId} TypeScript
sendora.inbound .attachment( inboundMessageId, attachmentId) Python
sendora.inbound .attachment( inbound_ message_ id, attachment_ id) PHP
$sendora->inbound->attachment($inboundMessageId, $attachmentId) Java
sendora.inbound() .attachment( inboundMessageId, attachmentId) - List the inbound domains
GET /v1/inbound/ domains TypeScript
sendora.inboundDomains .list() Python
sendora.inbound_ domains .list() PHP
$sendora->inboundDomains->list()Java
sendora.inboundDomains() .list() - Claim a domain for an inbound stream
POST /v1/inbound/ domains TypeScript
sendora.inboundDomains .create( { streamId, domain }) Python
sendora.inbound_ domains .create( stream_ id=..., domain=...) PHP
$sendora->inboundDomains->create(streamId: $streamId, domain: $domain) Java
sendora.inboundDomains() .create( request) - Read an inbound domain
GET /v1/inbound/ domains/ {id} TypeScript
sendora.inboundDomains .get( inboundDomainId) Python
sendora.inbound_ domains .get( inbound_ domain_ id) PHP
$sendora->inboundDomains->get($inboundDomainId) Java
sendora.inboundDomains() .get( inboundDomainId) - Remove an inbound domain
DELETE /v1/inbound/ domains/ {id} TypeScript
sendora.inboundDomains .delete( inboundDomainId) Python
sendora.inbound_ domains .delete( inbound_ domain_ id) PHP
$sendora->inboundDomains->delete($inboundDomainId) Java
sendora.inboundDomains() .delete( inboundDomainId) - Check the records now
POST /v1/inbound/ domains/ {id}/ verify TypeScript
sendora.inboundDomains .verify( inboundDomainId) Python
sendora.inbound_ domains .verify( inbound_ domain_ id) PHP
$sendora->inboundDomains->verify($inboundDomainId) Java
sendora.inboundDomains() .verify( inboundDomainId)
Keys
A server's own keys under one of them, up to two live at once; an account key manages them under /v1/servers/{id}/tokens, and the account's own keys are created in the dashboard.
- List the keys
GET /v1/tokens TypeScript
sendora.tokens .list() Python
sendora.tokens .list() PHP
$sendora->tokens->list()Java
sendora.tokens() .list() - Create a key
POST /v1/tokens TypeScript
sendora.tokens .create( { name }) Python
sendora.tokens .create( name=...) PHP
$sendora->tokens->create(name: $name) Java
sendora.tokens() .create( name) - Read a key
GET /v1/tokens/ {id} TypeScript
sendora.tokens .get( tokenId) Python
sendora.tokens .get( token_ id) PHP
$sendora->tokens->get($tokenId) Java
sendora.tokens() .get( tokenId) - Revoke a key
DELETE /v1/tokens/ {id} TypeScript
sendora.tokens .revoke( tokenId) Python
sendora.tokens .revoke( token_ id) PHP
$sendora->tokens->revoke($tokenId) Java
sendora.tokens() .revoke( tokenId)
Servers
The account’s servers and each one’s keys, under an account key: a server is created with its first key and holds up to two. GET /v1/server takes a server key and reads that key’s own server.
- Read this key's server
GET /v1/server TypeScript
sendora.server .get() Python
sendora.server .get() PHP
$sendora->server->get()Java
sendora.server() .get() - List the servers
GET /v1/servers TypeScript
account.servers .list() Python
account.servers .list() PHP
$account->servers->list()Java
account.servers() .list() - Create a server
POST /v1/servers TypeScript
account.servers .create( { name }) Python
account.servers .create( name=...) PHP
$account->servers->create(name: $name) Java
account.servers() .create( request) - Read a server
GET /v1/servers/ {id} TypeScript
account.servers .get( serverId) Python
account.servers .get( server_ id) PHP
$account->servers->get($serverId) Java
account.servers() .get( serverId) - Rename a server
PATCH /v1/servers/ {id} TypeScript
account.servers .update( serverId, { name }) Python
account.servers .update( server_ id, name=...) PHP
$account->servers->update($serverId, name: $name) Java
account.servers() .update( serverId, name) - Delete a server
DELETE /v1/servers/ {id} TypeScript
account.servers .delete( serverId) Python
account.servers .delete( server_ id) PHP
$account->servers->delete($serverId) Java
account.servers() .delete( serverId) - List the keys of a server
GET /v1/servers/ {id}/ tokens TypeScript
account.servers .tokens .list( serverId) Python
account.servers .tokens .list( server_ id) PHP
$account->servers->tokens->list($serverId) Java
account.servers() .tokens() .list( serverId) - Create a key for a server
POST /v1/servers/ {id}/ tokens TypeScript
account.servers .tokens .create( serverId, { name }) Python
account.servers .tokens .create( server_ id, name=...) PHP
$account->servers->tokens->create($serverId, name: $name) Java
account.servers() .tokens() .create( serverId, name) - Read a key of a server
GET /v1/servers/ {id}/ tokens/ {tokenId} TypeScript
account.servers .tokens .get( serverId, tokenId) Python
account.servers .tokens .get( server_ id, token_ id) PHP
$account->servers->tokens->get($serverId, $tokenId) Java
account.servers() .tokens() .get( serverId, tokenId) - Revoke a key of a server
DELETE /v1/servers/ {id}/ tokens/ {tokenId} TypeScript
account.servers .tokens .revoke( serverId, tokenId) Python
account.servers .tokens .revoke( server_ id, token_ id) PHP
$account->servers->tokens->revoke($serverId, $tokenId) Java
account.servers() .tokens() .revoke( serverId, tokenId)
Domains
Sending domains and their two DNS records, under an account key.
- List the sending domains
GET /v1/domains TypeScript
account.domains .list() Python
account.domains .list() PHP
$account->domains->list()Java
account.domains() .list() - Add a sending domain
POST /v1/domains TypeScript
account.domains .create( { domain }) Python
account.domains .create( domain=...) PHP
$account->domains->create(domain: $domain) Java
account.domains() .create( domain) - Read a sending domain
GET /v1/domains/ {id} TypeScript
account.domains .get( domainId) Python
account.domains .get( domain_ id) PHP
$account->domains->get($domainId) Java
account.domains() .get( domainId) - Remove a sending domain
DELETE /v1/domains/ {id} TypeScript
account.domains .delete( domainId) Python
account.domains .delete( domain_ id) PHP
$account->domains->delete($domainId) Java
account.domains() .delete( domainId) - Check the records now
POST /v1/domains/ {id}/ verify TypeScript
account.domains .verify( domainId) Python
account.domains .verify( domain_ id) PHP
$account->domains->verify($domainId) Java
account.domains() .verify( domainId)
Tracking domains
The hosts that tracked links and the open pixel use, each a subdomain of a sending domain, under an account key.
- List the tracking domains
GET /v1/tracking-domains TypeScript
account.trackingDomains .list() Python
account.tracking_ domains .list() PHP
$account->trackingDomains->list()Java
account.trackingDomains() .list() - Add a tracking domain
POST /v1/tracking-domains TypeScript
account.trackingDomains .create( { host }) Python
account.tracking_ domains .create( host=...) PHP
$account->trackingDomains->create(host: $host) Java
account.trackingDomains() .create( host) - Read a tracking domain
GET /v1/tracking-domains/ {id} TypeScript
account.trackingDomains .get( trackingDomainId) Python
account.tracking_ domains .get( tracking_ domain_ id) PHP
$account->trackingDomains->get($trackingDomainId) Java
account.trackingDomains() .get( trackingDomainId) - Remove a tracking domain
DELETE /v1/tracking-domains/ {id} TypeScript
account.trackingDomains .delete( trackingDomainId) Python
account.tracking_ domains .delete( tracking_ domain_ id) PHP
$account->trackingDomains->delete($trackingDomainId) Java
account.trackingDomains() .delete( trackingDomainId) - Check the records now
POST /v1/tracking-domains/ {id}/ verify TypeScript
account.trackingDomains .verify( trackingDomainId) Python
account.tracking_ domains .verify( tracking_ domain_ id) PHP
$account->trackingDomains->verify($trackingDomainId) Java
account.trackingDomains() .verify( trackingDomainId)
Erasures
A person's data erased from every server of the account, under an account key.
- Erase a person
POST /v1/erasures TypeScript
account.erasures .create( { address }) Python
account.erasures .create( address=...) PHP
$account->erasures->create(address: $address) Java
account.erasures() .create( address) - Read an erasure
GET /v1/erasures/ {id} TypeScript
account.erasures .get( erasureId) Python
account.erasures .get( erasure_ id) PHP
$account->erasures->get($erasureId) Java
account.erasures() .get( erasureId)
Webhook events
What a webhook receives for each event, with its fields and an example, is on Webhook events.