Error types
You can find the following error types in the Advanced API and Simple API. An error rejects the whole request. For the statuses of individual messages in a bulk response, see Message statuses.
Error types
| Type | Description | Info |
|---|---|---|
| unknown_identity | Unknown identity / unauthorized / empty application_id | |
| banned | Account is blocked | |
| invalid_input_parameters | Request parameters are missing or invalid, the detail field says which |
|
| invalid_sender | Own sender not validated | |
| empty_message | Message text is empty | |
| invalid_phone_number | Invalid number | |
| disabled_country | Sending to the recipient's country is disabled | |
| duplicity_message | Message dropped as a duplicate (duplicates_check) |
|
| blacklisted_number | Phone number is on Blacklist | |
| admin_not_found | Admin not found | Transactional SMS only |
| bulk_transaction_is_not_enabled | Sending transactional messages to multiple recipients is not enabled on the account | Transactional SMS only |
| an_hourly_transaction_messages_quota_has_been_exhausted | The hourly limit of transactional messages for a new account is used up | Transactional SMS only |
| invalid_rcs_variant | The rcs object holds none or more than one variant |
Cascade only |
| invalid_whatsapp_variant | The whatsapp object holds none or more than one variant |
Cascade only |
| no_recipients | The request produced no valid recipient | Bulk SMS and Advanced transactional API |
| method_not_allowed | HTTP method is not allowed | |
| unknown_action | Unknown API action (Transactional/Bulk SMS) | |
| unknown_error | Unexpected error |
A non-existent endpoint or API version returns HTTP code 404.
New error types may be added over time. Handle an unknown type as a general error of the request, using the code field.
Recipient limit for transactional messages
the_maximum_allowed_quota_for_sending_transaction_messages_has_been_exceeded
Transactional messages are meant for individual notifications, so the batch size is limited, that is how many recipients one transactional request can contain. Without a special account setting, API 2.0 allows at most 10 recipients in one request. The limit applies to each request separately and only checks the batch size, not the number of requests. The overall message volume is governed by API limits.
When a request has more recipients than the limit, the API rejects the whole request and sends no message:
We allow a higher limit on request where sending transactional messages in bulk is legitimate, for example early warning of citizens or sending reminders. Contact support, describe your use case and we will raise the limit for your account.
Response structure
Where:
- type and error (description of the error) can be found in the error types table,
- code represents http error
- detail is an additional info about the error
Message statuses
When a request sends messages to multiple recipients, an invalid recipient does not reject the whole request. Every recipient gets its own item in the response field with a status, and the total.status field counts the recipients by status.
| Status | Meaning | Info |
|---|---|---|
| accepted | The message was accepted for sending | |
| scheduled | The message was accepted and will be sent at the scheduled time | |
| invalid_number | Invalid phone number | |
| blacklisted | Phone number is on Blacklist | |
| invalid_sender | Own sender not validated | |
| disabled_country | Sending to the recipient's country is disabled | |
| duplicity_message | Message dropped as a duplicate (duplicates_check) |
Transactional SMS only |
| error | The message could not be sent, e.g. its text is empty | |
| paused_in_outbox | The message is over the API limit and was saved to the outbox | API limits |
| scheduled_to_next_day | The message is over the API limit and will be sent the next day | API limits |
| discarded | The message is over the API limit and was discarded | API limits |
If a recipient fails several checks, it gets the status of the first one in the order of the table. The last three statuses come from the over limit action set in the API limits, and they replace the status of a message that passed the checks.
A rejected message carries the same fields as an error plus the recipient's number and channel.
Bulk promotional message response
Bulk transactional message response
The examples show API 2.0. API 1.0 returns sms_id instead of message_id for accepted messages, and adds the price and credit fields.
The total.status field contains the disabled_country key and the API limit statuses only when at least one recipient got them. Do not rely on every status having its key there.
Thank you for your feedback.