HTTP Status Codes
Unsuccessful requests to our REST API will result in one of the following HTTP status codes:
| Status Code | Name | Description |
|---|---|---|
| 400 | Bad Request | The server was not able to process the request due to missing or invalid data. |
| 401 | Unauthorized | Wrong or missing credentials. |
| 403 | Forbidden | The request could not be processed due to missing permissions or because it would create an invalid state. |
| 500 | Internal Server Error | An error occurred on the server while processing the request. |
Response
Our service will respond to every request with JSON formatted data. If there is a problem with a request or if we encounter a problem, you will receive a response containing some information about what occurred. This will be helpful for resolution of any problems that occur.
Response Parameters
These parameters are wrapped in a ResponseStatus object.
| Parameter | Type | Description |
|---|---|---|
| ErrorCode | string | A single word descriptor of the type of error that was encountered (in capital letters) e.g. “FORBIDDEN”. |
| Message | string | A short friendly message describing the problem that was encountered. |
| Errors | array | An array of ‘Error’ objects containing additional information. |
Depending on the error, more details may be available. In this case the ‘ResponseStatus’ object contains an array of ‘error’ objects in a property called ‘Errors’ with following structure:
| Parameter | Type | Description |
|---|---|---|
| FieldName | string | The name of the invalid parameter. |
Error Codes
| Error Code | Description |
|---|---|
| ACCOUNT_NOT_FOUND | A matching account could not be found. |
| ADDRESS_CANNOT_BE_DELETED | A request to delete an address could not be processed as there are existing numbers which are linked to this address. |
| ADDRESS_NOT_FOUND | A matching address could not be found. |
| CALL_NOT_FOUND | A matching call could not be found. |
| CONFLICTING_PARAMETERS | Provided parameters are conflicting with each other. |
| COUNTRY_NOT_FOUND | A matching country could not be found. |
| COUNTRY_UNAVAILABLE | Attempted access to a country which is not available. |
| FLOW_NOT_FOUND | A matching flow could not be found. |
| FORBIDDEN | A request could not be processed due to missing permissions. |
| INVALID_COUNTRYCODE_FORMAT | A provided country code is not in the expected format (ISO 3166-1). |
| INVALID_DATE_RANGE | The provided date range is invalid. |
| INVALID_EMAIL_FORMAT | An email address is not in a valid format. |
| INVALID_HTTP_METHOD | An HTTP method is not valid. |
| INVALID_HTTP_URI_FORMAT | An HTTP Uri is not in a valid format. |
| INVALID_MODEL_STATE | The provided model state is invalid. |
| INVALID_PATCH_PAYLOAD | The partial update (Patch) payload is invalid. |
| INVALID_PERMISSION_VALUE | Permissions cannot be parsed or are invalid. |
| INVALID_PERMISSIONS | Something is wrong with the permission set (e.g. both Account and Project are defined at the same time). |
| INVALID_PHONENUMBER_FORMAT | A provided number is not in the expected format (E.164). |
| INVALID_SMS_DIRECTION | The SMS direction is invalid. |
| INVALID_SMS_SENDER | The SMS sender has an invalid format. |
| INVALID_SMS_STATUS | The SMS status is invalid. |
| INVALID_SMS_TEXT | The SMS text is invalid. |
| INVALID_WHISPER_MEDIAID | A provided whisper media id is invalid. |
| LOCATION_NOT_FOUND | The combination of geographical filters that were provided cannot be resolved to a known location. |
| MESSAGE_NOT_FOUND | A matching SMS message could not be found. |
| NO_SMS_AGREEMENT | The account for which the SMS is sent has no agreement for SMS. |
| NUMBER_ALLOCATION_FAILED | Unable to allocate a number to use as an originating number. |
| NUMBER_BELONGS_TO_DIFFERENT_PROPERTY | The number provided in the request belongs to a different property than the one provided in the request. |
| NUMBER_NOT_FOUND | A matching phone number could not be found. |
| ONE_OF_SEVERAL_PARAMETERS_REQUIRED | At least one parameter from several parameters must be provided. The name of the parameters are available in the error message and (concatenated) as ‘FieldName’ in the ‘Error’ object (see above). |
| ONLINE_LOGIN_EMAIL_EXISTS | A user with this email already exists. |
| ONLINE_LOGIN_NOT_FOUND | The requested online login user was not found. |
| PARAMETER_INVALID | A supplied parameter is not within appropriate bounds. The name of the missing parameter is available in the error message and as ‘FieldName’ in the ‘Error’ object (see above). |
| PARAMETER_REQUIRED | A required parameter is missing. The name of the missing parameter is available in the error message and as ‘FieldName’ in the ‘Error’ object (see above). |
| PARAMETER_TOO_LONG | A provided parameter is too long. More details are available in the error message. |
| PARAMETER_TOO_SHORT | A provided parameter is too short. More details are available in the error message. |
| PERMISSION_EXCEEDS_ACCESS_BOUNDARY | The permission set exceeds allowed access boundaries. |
| PROJECT_LIMIT_REACHED | The project limit for the account has been reached. |
| PROPERTY_NOT_FOUND | A matching property could not be found. |
| RECORD_NOT_FOUND | The requested record was not found. |
| SCHEDULED_TIME_OUT_OF_RANGE | Date/time for a scheduled event is not within the acceptable range. |
| SIP_TRUNK_NOT_FOUND | A matching SIP trunk could not be found. |
| SIP_TRUNK_WAS_DELETED | The requested SIP trunk has been deleted. |
| SMS_LEASED_NUMBER_NOT_OWNED | SMS was sent from a leased number not owned by the sender. |
| SMS_NOT_ENABLED | SMS functionality has not been enabled for the property for which the SMS is sent. |
| UNKNOWN_CAPABILITY | A provided capability is not known. |
| UNKNOWN_DISPOSITION | A provided disposition is not known. |
| UNKNOWN_NUMBERTYPE | A provided number type is not known. |
| UNKNOWN_PREAMBLE_OPTION | A provided preamble option is unknown. |
| UNKNOWN_RECORDING_OPTION | A provided recording option is not known. |
| UNKNOWN_ROUTING_METHOD | A provided routing method is not known. |
| UNKNOWN_TIME_ZONE | The provided time zone value is not known. |