Reference

Errors

When the API refuses a request it says why, with a stable code you can switch on. This page lists every code and what to do about it.

The format#

Errors use the standard problem format (RFC 9457) with the media type application/problem+json.

FieldMeaning
typeAlways about:blank: the status and code say everything.
titleThe HTTP status in words.
statusThe HTTP status code, repeated.
detailWhat went wrong, for a person. It can change wording; do not parse it.
codeStable machine-readable reason. Switch on this.
request_idThe request's id. Quote it when you ask the hotel for help.

Every code#

StatusCodeMeaningWhat to do
400invalid_jsonThe body is not valid JSON.Fix the body. Check quoting and trailing commas.
400invalid_requestA field is missing, has the wrong type, or is out of bounds. detail names the field.Fix the field named in detail.
400unknown_fieldThe body has a field the API does not know. Unknown fields are refused, not ignored, so a typo never goes unnoticed.Remove or rename the field.
400invalid_addressAn email address is not valid.Fix the address named in detail.
400too_many_recipientsto, cc and bcc together exceed the per-message limit.Split the message, or ask the hotel to raise the limit.
400invalid_schedulescheduled_at is not an ISO 8601 time between 1 minute and 72 hours from now.Send a time inside that window, or leave it out to send now.
400invalid_idempotency_keyThe Idempotency-Key header is not 1 to 128 letters, digits, ., _, : or - (at most 124 on a batch, which adds :<index>).Fix the key.
401invalid_tokenNo usable token: missing, malformed, unknown, wrong or deleted, or a test token with its test_ removed. All of these answer the same on purpose.
Header: WWW-Authenticate: Bearer
Check the header and the token. If it was deleted, ask the hotel for a new one.
401token_expiredThe token has passed its expiry time.Ask the hotel to renew it or issue a new token.
403token_blockedThe token is blocked by the hotel.Contact the hotel. Do not retry.
403insufficient_scopeThe token lacks the permission this endpoint needs (send or read).Ask the hotel to add the permission.
403client_pausedThe hotel paused sending for the app this token belongs to.Contact the hotel. Do not retry.
403ip_not_allowedThe token may be used only from the addresses the hotel listed, and this request came from another.Send from an allowed address, or ask the hotel to add yours.
403template_not_allowedThe token may send only the templates the hotel chose, and this is not one of them.Use a template from GET /v1/templates, or ask the hotel.
403templates_onlyThe token may send templates only: a subject, html or text of its own is refused.Send template_id and variables instead.
403recipient_not_allowedA recipient is outside the email domains the hotel allows for this app. detail names the domain.Remove that recipient, or ask the hotel to allow the domain.
403sender_not_allowedThe from address is not one this token may use, or the hotel switched that sender off for the API, or the token has no sender.Use an address from GET /v1/me, or ask the hotel.
404not_foundNo such endpoint, or no message with that id for this token.Check the path and the id.
405method_not_allowedThe endpoint exists but not with this HTTP method.
Header: Allow
Use the method in the Allow header.
409not_cancelableThe message cannot be cancelled: it was not scheduled, it already went out or its time has come, it is already cancelled, or a test token sent it.Nothing to do: GET /v1/messages/{id} shows where it is.
411length_requiredA file upload (POST /v1/attachments) came without a Content-Length, or with an empty body.Send the file as the body with its length.
413payload_too_largeThe request body is over 256 KiB, or an uploaded file is over 4,000,000 bytes.Send less content, or a smaller file.
415unsupported_media_typeContent-Type is not application/json.Send Content-Type: application/json.
422idempotency_key_reuseThis Idempotency-Key was already used with a different body.Use a new key for a new message.
422unknown_templateNo published, active template has that template_id. A template is sent only once the hotel publishes it, and an archived one is never sent.Check the id with GET /v1/templates, or ask the hotel to publish it.
422invalid_variablesvariables does not fit the template: a required one is missing, one is unknown, or one has the wrong type. detail says which, and the X-Variable header names it.
Header: X-Variable
Fix the variable named in detail. GET /v1/templates lists each type.
422content_blockedThe content check refused the message: a link to an IP address, a link with a user name or password, a link to a blocked domain, or what looks like a payment card number. detail says which, and the X-Content-Rule header names the rule.
Header: X-Content-Rule
Remove what detail names. Never send card numbers by email.
422attachment_not_foundA message names an attachment this token did not upload, or one that has expired (files are kept 24 hours).Upload the file again and use its new id.
422attachment_refusedThe check at upload (POST /v1/attachments) refused the file: it is a program or script, its contents are not the type its name says, or it carries macros, scripts, embedded files or a password that keeps it from being checked. detail says which. It is not stored.Send the document without macros, scripts or a password, under its real file type.
422attachments_too_largeA message's attachments are over 4,000,000 bytes together.Send fewer or smaller files.
429rate_limitedThe token reached its per-minute limit, or sent more than 600 requests in a minute.
Header: Retry-After
Wait the seconds in Retry-After, then retry.
429daily_cap_reachedThe token reached its daily limit (UTC day).
Header: Retry-After
Wait until 00:00 UTC, or ask the hotel to raise the limit.
429monthly_cap_reachedThe token reached its monthly limit (UTC calendar month).
Header: Retry-After
Wait until the first day of next month (UTC), or ask the hotel to raise the limit.
429api_budget_reachedThe API's shared daily allowance of recipients, for all tokens together, is used up. When it is set to zero, sending through the API is paused for the day.
Header: Retry-After
Wait until 00:00 UTC. Do not retry in a loop.
500internalAn unexpected fault on our side. It is reported to the hotel automatically.Retry later with the same Idempotency-Key; quote request_id if it persists.
503api_disabledThe hotel has switched the API off for everyone.
Header: Retry-After: 60
Retry later.
503unavailableThe service is missing part of its configuration.Retry later; quote request_id.
503attachments_unavailableAttachments are not switched on yet, or the file store cannot be reached right now.
Header: Retry-After
Retry after the seconds in Retry-After. Messages without attachments are not affected.

A request refused with 400, 401, 403, 404, 405, 413, 415, 422 or 429 changes nothing and uses no limit.

Reasons a message fails later#

These are not HTTP errors: the message was accepted, then could not be sent. They appear in the error field of GET /v1/messages/{id} with status failed or dead.

error textMeaningWhat to do
This sender is no longer allowed for the API.The hotel withdrew the sender after the message was accepted.Use a sender from GET /v1/me and send a new message.
All recipients are on the suppression list.Everyone unsubscribed, bounced or complained before.Do not send to them again. Remove the addresses from your list.
Every To recipient is on the suppression list.Only Cc or Bcc addresses were left, and a message needs a To recipient.Send to a different To address if appropriate.
A refusal from the mail systemFor example an address the mail system will not accept. The text is passed on, cut to 200 characters.Read it; fix the cause; send a new message.
Other text with status deadEvery retry over about seven hours failed.Ask the hotel: it can re-send the message from its dashboard.

Retry or not#

AnswerRetry with the same key?
Network error or timeoutYes, with back-off
429 rate_limitedYes, after Retry-After
429 daily_cap_reached, api_budget_reachedAfter 00:00 UTC, from your own queue
500, 503Yes, with back-off or after Retry-After
Any other 400 to 422No: fix the request, the token or the id

Last reviewed 2026-10-01.