Reference
More ways to use this page
Errors
Every error from the API is JSON, with an error code for your program and a message for a person. A request that fails validation also has issues, one per invalid field:
{
"error": "invalid_request",
"message": "The request is invalid: to.0: Invalid email address",
"issues": [{ "path": "to.0", "message": "Invalid email address" }]
}
Some errors add fields, such as the suppressed recipients or when a limit resets. Each operation’s page in the reference lists them.
Two refusals are plain text, not JSON: 429 Too Many Requests and 413 Request Entity Too Large. They come from the proxy in front of the API, as Limits explains. A body over the size limit meets the proxy first, so it gets the plain-text 413.
Retry or fix
rate_(429): wait the seconds inlimited retryAfter, which theRetry-Afterheader also gives, then send again. The refused message was not stored. If you meet this limit often, ask support to raise it.sending_(503): sending is disabled for everyone for the moment. Retry after the seconds in thedisabled Retry-Afterheader.monthly_(429): wait untilcap_ reached resetsAt, or have an administrator of your account raise the cap under Account › Usage. Limits says how far they can raise it. After a cancellation, the code can also mean that the month holds all the emails that the monthly fee includes, and themessagesays so. Then only undoing the cancellation under Account › Usage lets the live servers send more.daily_(429): an account can have a daily cap, and its live servers have sent all of today’s emails. Wait untilcap_ reached resetsAt, the next midnight in UTC.- A 5xx status: retry with a growing delay, under the same idempotency key so the message cannot go twice.
- Any other code: read its meaning in the table below. Most need a fix to the request or the account, and fail the same way if sent again unchanged.
On rate_, daily_ and monthly_, scope says whose limit it is: the account’s (account), the server’s own (server) or the test servers’ (test). A daily cap is always the account’s. Test mail never counts toward the account’s caps. A webhook can warn you before the monthly cap is used up.
The SDK throws SendoraError for every failed call. It has the same code, the HTTP status and the body’s extra fields, such as issues, retryAfter, scope, limit, cap, used, resetsAt, suppressed and existingId. retryable says whether trying again could succeed. A lost connection or a timeout is the same error, with connection_ or timeout and no status.
The SDK retries rate limits, sending_ and server errors itself for a few seconds. If retryAfter is longer than that, it throws at once so you can schedule the retry.
The SDK raises a SendoraError for every failed call. Its class depends on the status, such as RateLimitError for 429. It has the same code, the HTTP status and the body’s extra fields, such as issues, retry_, scope, limit, cap, used, resets_, suppressed and existing_. retryable says whether trying again could succeed. A lost connection is an APIConnectionError with connection_, and a timeout an APITimeoutError with timeout, both without a status.
The SDK retries rate limits, sending_ and server errors itself for a few seconds. If retry_ is longer than that, it raises at once so you can schedule the retry.
The SDK throws a SendoraException for every failed call. Its class depends on the status, such as RateLimitException for 429. The code is in errorCode and the HTTP status in status, with the body’s extra fields beside them, such as issues, retryAfter, scope, limit, cap, used, resetsAt, suppressed and existingId. isRetryable() says whether trying again could succeed. A lost connection is an ApiConnectionException with connection_, and a timeout an ApiTimeoutException with timeout, both without a status.
The SDK retries rate limits, sending_ and server errors itself for a few seconds. If retryAfter is longer than that, it throws at once so you can schedule the retry.
The SDK throws a SendoraException for every failed call, and it is unchecked. Its class depends on the status, such as RateLimitException for 429. code() returns the code as an ErrorCode. Every class for a status has statusCode(), the HTTP status. The body’s extra fields have accessors of their own, such as issues(), retryAfter(), scope(), limit(), cap(), used(), resetsAt(), suppressedRecipients() and existingId(). isRetryable() says whether trying again could succeed. A lost connection is an ApiConnectionException with connection_, and a timeout an ApiTimeoutException with timeout, both without a status.
The SDK retries rate limits, sending_ and server errors itself for a few seconds. If retryAfter() is longer than that, it throws at once so you can schedule the retry.
When an account cannot send
payment_(402): the account’s live servers wait for a payment. They send once the account’s first payment has arrived. If an invoice is still unpaid after its retries, they stop until it is paid. If the subscription has ended, no payment reopens it, and an administrator starts the subscription again. If Sendora has paused the payment, support tells you why. Account › Usage in the dashboard shows where the account stands. A test server works meanwhile.required account_(403): Sendora has not approved the account yet. Every account is reviewed by hand before a live server can send. A test server works before that.not_ active account_(403): Sendora has paused the account. Support tells you why.paused
Over SMTP, the same refusals arrive as SMTP replies, which SMTP submission lists.
Error codes
| Code | Status | Meaning |
|---|---|---|
account_ | 403 | The account is closed, or not yet approved for a live server's sends or an inbound stream. |
account_ | 403 | The account is paused by Sendora. |
broadcast_ | 409 | The broadcast is completed or cancelled already; nothing is left to cancel. |
content_ | 410 | The content of this received message is gone; the stream’s content window has passed. The message itself stays 13 months. |
content_ | 409 | The stored content of this received message cannot be opened. Sendora has been told. |
daily_ | 429 | The account's daily cap is used up. |
default_ | 409 | The default stream of a server cannot be archived. |
domain_ | 409 | The account already has that domain. |
domain_ | 400 | The name is Sendora’s own, or a return-path host; no account can receive on it. |
from_ | 422 | The From domain is not a verified sending domain of this server. |
idempotency_ | 422 | The Idempotency-Key was already used for a different request. |
idempotency_ | 400 | Batch sends need an Idempotency-Key header. |
inbound_ | 409 | The stream already has a domain, or another account holds the name verified. |
inbound_ | 409 | A server has one inbound stream at a time; archive it to make another. |
invalid_ | 400 | The body, the query or a header does not match what the route takes. |
last_ | 409 | The only live secret of a webhook cannot be deleted; create another first. |
last_ | 409 | This is the only live key of the server; create another before revoking it. |
list_ | 422 | On a broadcast stream Sendora writes the List-Unsubscribe pair itself, so a message may not carry one. |
mode_ | 400 | A server’s mode is fixed when it is created; create a new server for the other mode. |
monthly_ | 429 | The monthly cap of the account, the server or the test servers is used up. After a cancellation, the account's cap is the emails that the monthly fee includes. |
not_ | 403 | A connected app called an operation that no tool of the MCP server calls. An API key can. |
not_ | 404 | No such broadcast of this server. |
payment_ | 402 | The first payment has not arrived, an invoice is unpaid, payment is paused, the subscription has ended, or the account's plan does not include broadcasts. |
rate_ | 429 | More was sent within a minute than the limit allows. |
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. |
recipient_ | 422 | One or more recipients are on the suppression list of the stream. |
request_ | 413 | The body exceeds 10 MB. |
secret_ | 409 | The webhook already holds two live secrets: one in use and one to roll to. Delete one before creating another. |
sending_ | 503 | Sending is disabled for everyone for the moment; retry after the seconds in Retry-After. |
server_ | 409 | The account already has a server with that name. |
server_ | 409 | Messages of the server are still being delivered; try again once they have left. |
server_ | 409 | The account has as many servers as it may; Sendora raises the cap on request. |
server_ | 409 | This server sends Sendora’s own sign-in mail and cannot be renamed or removed. |
spam_ | 403 | The recipient reported a message as spam; only Sendora support lifts that, at the recipient’s own request. |
stream_ | 422 | The stream is archived and takes no new messages. |
stream_ | 409 | The server already has a stream with this name, archived or not. |
stream_ | 422 | A test server has no inbound stream; receive on a live server. |
stream_ | 422 | A broadcast goes on a broadcast stream; the streamId names a transactional one. |
stream_ | 422 | The streamId names no stream of this server. |
stream_ | 422 | An inbound stream receives mail; it takes no messages and has no suppression list. Name a transactional or broadcast stream. |
stream_ | 422 | Sendora has paused the stream after complaints; it takes no messages until support has resumed it. |
substitution_ | 422 | The subject, text or HTML names a {{ key }} that a message does not give. |
test_ | 422 | Addresses at simulator.sendora.se act out an outcome on a test server; a live server never sends to them. |
test_ | 403 | A connected app may create a secret, or do what cannot be undone, on a test server only. |
token_ | 409 | The server or the account already holds two live keys: one in use and one to rotate to. Revoke one before creating another. |
tracking_ | 409 | The account already has that host, or a host on that sending domain. |
tracking_ | 409 | The account has as many tracking domains as it may have. |
tracking_ | 422 | The host is a sending domain itself. A tracking domain is a subdomain of one. |
tracking_ | 422 | The host is not under a verified sending domain of this account. |
tracking_ | 409 | Another account holds the host, and its sending domain is still verified. |
tracking_ | 409 | The request sets trackOpens or trackLinks to true before an administrator has first switched tracking on in the dashboard. |
tracking_ | 403 | The request sets trackOpens or trackLinks to true, and tracking is not open to the account. |
unauthorized | 401 | The key is missing, malformed or revoked. |
unsubscribe_ | 403 | The recipient unsubscribed themselves; only Sendora support lifts that, at the recipient’s own request. |
unsubscribe_ | 422 | A message on a broadcast stream must carry {{ unsubscribe_url }} in every part it has. |
webhook_ | 409 | The server already has a webhook for that URL. |
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. |