HTTP statuses indicate whether the API has processed your request successfully and if not, what kind of error was encountered.
HTTP error code | Description |
400 - Bad Request | The API has detected mistakes in your request syntax. The SMS REST API provides codes to show exactly what is wrong (see below.) |
403 - Forbidden | User is forbidden from accessing a REST API resource. The SMS REST API provides codes to show exactly what the reason is (see below.) |
404 - Not Found |
The requested API resource has not been found. This can happen if:
|
In the SMS REST API, statuses 400 and 403 are subdivided into codes. Codes can be used to programmatically recognise errors and allow for more accurate diagnosis and debugging than HTTP statuses alone.
Code | Description | Troubleshooting Steps |
syntax_invalid_json |
The JSON in the request is invalid or doesn't conform to the API specification. | Use an online JSON validator such as https://jsonlint.com/. This should identify the invalid JSON syntax. |
syntax_invalid_parameter_format |
The format of a field value is invalid. For example, if a MSISDN (phone number) is not correctly formatted. If you, for example, forgot to add the area code, this error will appear. | Read the "message" field in the JSON response. This should provide the information needed to identify the syntax error. |
syntax_constraint_violation |
The request body doesn't fulfil all of the constraints set by the API. So if a required field is missing, you'll see this error. All required fields are marked in red text in the API reference. | Read the "message" field in the JSON response. This should provide the information needed to identify the syntax error. |
Code | Description | Troubleshooting Steps |
blocked_account |
Indicates that your account has been blocked. | Reach out to your account manager for further assistance. |
illegal_number_type |
Illegal phone number type of MSISDN for a chosen region was used. | Send to a different MSISDN. |
missing_callback_url |
A callback has been requested, but no URL is provided. | There are two ways to add a callback URL to your request:
|
Note: Refer to the Sinch SMS REST API Developer Documentation for a complete list of all the HTTP status codes.
Watch this step-by-step tutorial to familiarize yourself with the basics of SMS and to learn how easy it is to send your first message with Sinch.
Sign up to the Sinch Dashboard and get started today or take a look at the Sinch SMS Product page to learn more about our SMS products.