Nothing found

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.

Tip

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:

{ "type": "the_maximum_allowed_quota_for_sending_transaction_messages_has_been_exceeded", "code": 400, "error": "The maximum allowed quota for sending transaction messages has been exceeded", "detail": null }

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

{ "type": "invalid_phone_number", "code": 400, "error": "Invalid phone number", "detail": null } { "type": "unknown_identity", "code": 401, "error": "Unknown identity / unauthorized / empty application_id", "detail": null }

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

{ "data": { "campaign_id": "id-advanced-kqwmzt", "campaign_name": null, "total": { "status": { "sent": 0, "accepted": 1, "scheduled": 0, "error": 0, "blacklisted": 1, "invalid_number": 1, "invalid_sender": 0, "disabled_country": 1 } }, "response": [ { "status": "accepted", "message_id": "idkqwmzt-0", "part_id": [ "idkqwmzt-0" ], "number": "420777777777", "channel": "sms" }, { "status": "invalid_number", "code": 400, "error": "Invalid phone number", "detail": null, "number": "42077", "channel": "sms" }, { "status": "blacklisted", "code": 400, "error": "Phone number is on Blacklist", "detail": null, "number": "420888888888", "channel": "sms" }, { "status": "disabled_country", "code": 400, "error": "disabled_country", "detail": "promotional - de", "number": "491511234567", "channel": "sms" } ] } }

Bulk transactional message response

{ "data": { "total": { "status": { "sent": 0, "accepted": 1, "scheduled": 0, "error": 0, "blacklisted": 0, "invalid_number": 0, "invalid_sender": 0, "duplicity_message": 1 } }, "response": [ { "status": "accepted", "message_id": "transactional-6731f0a2b4c8e-0", "part_id": [ "transactional-6731f0a2b4c8e-0" ], "number": "420777777777", "channel": "sms" }, { "status": "duplicity_message", "code": 400, "error": "Duplicity message", "detail": null, "number": "420888888888", "channel": "sms" } ] } }

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.

Note

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.

Was this page helpful?