Skip to content

Errors ​

Errors use HTTP status codes and a body in the format of RFC 9457, Content-Type: application/problem+json:

json
{
  "type": "about:blank",
  "status": 422,
  "code": "validation_failed",
  "title": "Check the form fields",
  "errors": [
    { "field": "variables.promo_code", "code": "required", "message": "Fill in this field" }
  ]
}
Field
statusThe HTTP status.
codeWhat went wrong, machine-readable and stable. Build your logic on it.
titleA short text for people, in the language of Accept-Language. It may change.
errorsFor validation_failed and some others: each wrong field with its own code and message.

Some codes carry more members: shortage (insufficient_funds), retry_after (daily_limit_reached), segments and max_segments (message_too_long).

Field errors ​

errors[].field is the path of the field in the body (to, variables.promo_code, fields.amount). errors[].code is the failed rule, for example required, max, in (not an allowed value), prohibited (not allowed together with another field), string, field_value (a contact field value of the wrong type).

Codes ​

StatusCodeMeaning
400bad_requestThe request cannot be read, for example the body is not valid JSON.
401api_key_invalidNo Authorization: Bearer header, or the key is unknown or revoked. After 20 failed key checks in a minute the address gets too_many_requests for the rest of the minute.
403api_key_ip_deniedThe key has an IP allowlist and the request came from another address.
403account_suspendedThe account is suspended. Contact support.
403api_key_scopeThe key lacks the permission of the endpoint (send, status or contacts).
403free_text_not_allowedAn SMS with an own text, but the account may only send templates. Ask your manager to enable it.
404not_foundNo such path, or no such object in the account (a message of another account or of the other key mode).
404template_not_foundThe account has no approved template with this name in the channel.
405method_not_allowedThe path exists but not with this HTTP method; the Allow header lists the methods.
413payload_too_largeThe body is over 64 KiB.
422validation_failedSome fields are wrong: errors lists each field with its code and a message.
422invalid_numberThe number is not a valid phone number. Send it in E.164: +, the country code and the number, without spaces or dashes.
422recipient_stoppedThe number is on one of the stop lists of the account (opted out or added by your team).
422destination_unavailableThe channel does not deliver to this country for the account: no route, no price, or (SMS) no sender name for the country. Ask your manager.
422message_too_longThe SMS needs more segments than allowed; segments and max_segments say by how much.
409template_unavailableWhatsApp only: the template version is approved in ACE SEND but not (or no longer) approved by WhatsApp for sending, for example paused or disabled. Check the template in the console.
409insufficient_fundsThe available balance does not cover the price; shortage is the missing amount. Top up and retry.
409idempotency_conflictThe Idempotency-Key was used within 24 hours for another body, or by a key of the other mode (test or live).
409idempotency_in_progressThe first request with this Idempotency-Key is still running. Retry in a moment.
429too_many_requestsOver the rate limit. Wait for the seconds of the Retry-After header.
429daily_limit_reachedThe daily message limit of the account (or of test keys: 1000 a day) is reached. It resets at midnight in the time zone of the account; retry_after and the Retry-After header say when. Ask your manager to raise the limit.
500server_errorSomething failed on our side. Retry with the same Idempotency-Key.
503service_unavailableMaintenance or overload. Retry later with the same Idempotency-Key.

New codes may be added. Handle an unknown code by its HTTP status: 4xx — the request needs a change, 5xx — retry later.

ACE SEND API v1