cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HTTP Response Statuses

 

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:

  • the resource has not had time to load
  • the resource is no longer available
  • a user types an invalid endpoint.

 

 

Codes

 

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.

 

 

Codes for 400

 

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.

 

 

Codes for 403

 

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:
  1. Through the dashboard as explained here
  2. Directly in the request body (this will only work for the particular SMS.)

 

 

Note: Refer to the Sinch SMS REST API Developer Documentation for a complete list of all the HTTP status codes.

Featured Article
Version history
Last update:
‎02-27-2024 03:41 AM
Updated by: