LianaMailer

Errors

v1 and v2 report most errors in the response body, while v3 uses HTTP status codes. In every version, check both the HTTP status and the body.

v1 and v2

Responses include succeed. When a request fails, succeed is false and message describes the error:

JSONError response
{ "succeed": false, "message": "list (123) does not exist" }

These errors, including invalid parameters and failed authentication, have HTTP status 200, so check succeed, not just the status. In the API reference, they are the default response of each endpoint.

Error messages

MessageReason
Unauthorized (token expired)Authentication failed. See Handling errors.
<endpoint> not supportedv1 has no endpoint with that name. Endpoint names are case-sensitive.
Unknown methodv2 has no endpoint with that path.
empty contentThe v2 request body is empty. Send {} when the endpoint takes no parameters.

An invalid or expired token returns a message that starts with Unauthorized. A token for another product, an unexpected error, or a v1 request with an empty body returns a generic message with an incident ID:

JSONError response
{ "succeed": false, "message": "There was an error processing the request. Incident id: 5e609601dd092" }

Other messages describe what was wrong with the request. They are in English and can change, so do not build logic on their exact text.

HTTP error status

A few errors have an HTTP error status and a body without succeed:

HTTP statusReason
404The Authorization header is missing or malformed, or the API version in the path is unknown
429Too many requests. See Request rate.
500The request could not be processed

For example, a request with a malformed Authorization header returns:

JSONError response
{ "message": "Authorization information not found or malformed", "status": 404, "status_message": "Not Found" }

v3

v3 returns errors with an HTTP status code and a JSON body with code and message. code is the HTTP status as a string:

JSONError response
{ "code": "400", "message": "invalid sort key", "meta": { "response_at": "2026-12-01T09:00:00+02:00" } }
HTTP statusReason
400A parameter is invalid, or the endpoint is unknown
401Authentication failed, for example the token has expired
403No permission for the resource
404The resource was not found
429Too many requests at the same time. The body is not JSON.
500Unexpected error. message includes an incident ID.
501The endpoint does not support the request

Each endpoint in the API reference lists the statuses it can return. A request without an Authorization header, or with a header that is not a Bearer token, returns HTTP status 400 without a JSON body.

Handling errors

  • Check the HTTP status before you parse the body. Responses from the web server, such as HTTP status 413 for a request body that is too large and 429 for too many requests, are not JSON.
  • If authentication fails, check your credentials. A Bearer token expires after 15 minutes, so request a new one when it does. For an invalid or expired token, v1 and v2 return succeed: false with a message that starts with Unauthorized, and v3 returns HTTP status 401. For a token created for another product, v1 and v2 return succeed: false with the generic incident ID message.
  • HTTP status 429 means you sent requests too fast. Wait before you send the next one, and stay within the request rate limits.
  • Do not retry other errors without changing the request, as an invalid request fails again. Some requests, such as deliveries/batch-send, create something each time, so retrying one after a timeout can send the mail twice.
  • If an error has an incident ID, include it when you report the error to LianaMailer support.
Last modified on