The API REST can respond with the following HTTP states:
State code | Description | Details |
---|---|---|
202 | Accepted | The message has been accepted for processing. |
207 | Multi-status | The message has been accepted for processing, but some recipients are incorrect. |
400 | Bad request | The request contains errors, the message has not been accepted. |
401 | Unauthorized | Failure client authentication. |
402 | Payment required | The client does not have enough credit. |
500 | Internal server error | The server has an internal error. |
In the body of the HTTP response a JSON is delivered with the result details; these are the possible answers:
State code 202:
[{“accepted”:true,”to”:”34666555444″,”id”:”102648819″}]
State code 207:
[{“accepted”:true,”to”:”34666555444″,”id”:”102648819″}]
State code 202:
[{“accepted”:true,”to”:”34626690739″,”id”:”102648820″},{“accepted”:false, “to”:”34″,”error”:{“code”:102,”description”:”No valid recipients”}}]
State code 400:
{“error”:{“code”:102,”description”:”No valid recipients”}}
{“error”:{“code”:104,”description”:”Text message missing”}}
{“error”:{“code”:105,”description”:”Text message too long”}} {“error”:{“code”:106,”description”:”Sender missing”}}
{“error”:{“code”:107,”description”:”Sender too long”}}
{“error”:{“code”:108,”description”:”No valid Datetime for send”}} {“error”:{“code”:109,”description”:”Notification URL incorrect”}} {“error”:{“code”:110,”description”:”Exceeded maximum parts allowed or incorrect number of parts”}} {“error”:{“code”:113,”description”:”Invalid coding”}}
State code 401:
{“error”:{“code”:103,”description”:”Username or password unknown”}} {“error”:{“code”:111,”description”:”Not enough credits”}}
State code 402:
{“error”:{“code”:111,”description”:”Not enough credits”}}