Getting started with the API
API Errors
Manage errors declared by each operation
When a body is present, the APIs normally return this format:
{
"status": "BAD_REQUEST",
"message": "Descrizione dell'errore",
"errors": "Dettagli dell'errore"
} statusis the name of the HTTP status, for exampleBAD_REQUESToNOT_FOUND.messagecontains a readable description of the error.errorscontains details and can be a string, a list of validation errors or a structured object.
See the single reference operation for specific statuses and examples. Some content-free answers do not include a body.
Status of error
| Status | General meaning | Indication |
|---|---|---|
400 | Request or invalid parameters | Correct the sent data before retrying. |
401 | API credentials not valid | Verification clientId and clientSecret. |
403 | Non-allowed operation | Check user permissions. |
404 | Resource not found | Check identifiers and parameters. |
409 | Conflict with current state | Upgrade your data or resource status before retrying. |
500 | Internal error | Keep the technical context and contact assistance if it persists. |
502 | Error of an external service | Try again later or contact assistance. |
503 | Temporarily unavailable service | Wait and try again. |
Example: already active number
POST /v1/numbers/activate Returns 400 Bad Request when the number is already active or has been deleted:
{
"status": "BAD_REQUEST",
"message": "Number already active or deleted",
"errors": "Number already active or deleted"
} Diagnostics
When signaling a problem, include timestamps, environment, HTTP method, path and status received. Anonymizes the payload and not share API key, access tokens or personal data.
Perform automatic retry only when you know the imperceptibility of the operation and you can exclude that a writing has already been applied.