Response Codes (HTTP Status Code)

or each request, the REST APIs return one of the following HTTP Status Code :

200 - Request completed successfully

204 - Request completed successfully: resorce deleted

400 - Missing parameter

401 - Authentication failed

404 - Resource not found

405 - HTTP method not allowed

500 - An unexpected error occurred in the server

Response content

For each call HTTP GET and HTTP POST completed successfully (HTTP status 200 ) REST API returns the content as a JSON / XML

In the case of HTTP PUT and HTTP DELETE completed successfully (HTTP status 200 or 204 ) the content of the answer is empty.

If a call terminate with an error (HTTP status other than 200 or 204 ) a JSON / XML response containing error explanation:

errorCode - HTTP status code

errorMsg - smsHosting.it code to identify the problem type/p>

Ad esempio nel caso l'autenticazione fallisca le REST API restituiscono un HTTP Status 401 e come contenuto:

For example in the case of authentication failure the REST APIs return HTTP Status 401 and as content :



Some resources ( search text messages sent or received , search contacts, etc.) returns result as pages .

For example, the search text messages sent return the following JSON

         "text":"Test Sms",

The field metadatacontains the informations useful to managing the results pagetion.

The property count indicates the total number of results found for that search.

Fields offset and limit denote the index of the first result and the number of results returned

offset and limit can be used as parameters in the request in order to control the range of results returned.

For example, if a search retrive 100 results and the page size is 20


you can get 5 pages using the following values ​​of offset and limit:

page 1 - offset=0&limit=20
page 2 - offset=20&limit=20
page 3 - offset=40&limit=20
page 4 - offset=60&limit=20
page 5 - offset=80&limit=20