Errors
HTTP status codes and application error codes for the REST API v1 and the legacy HTTP API, and how to handle them.
The two APIs report errors differently. The REST API uses HTTP status codes plus a JSON body. The HTTP API returns a line of plain text that you have to parse.
REST API v1
HTTP status codes
| Status | Meaning |
|---|---|
200 | Success. |
201 | Success: a new message has been queued for delivery (send a message). |
400 | Bad request. The request is not valid; the JSON body says what is missing. |
401 | Unauthorized. The API key is missing or incorrect. |
429 | API calls quota exceeded. See Rate limits. |
500 | Internal server error. Contact support. |
Application errors
A 400 response carries a JSON body with a numeric StatusCode and a readable StatusMessage:
{
"StatusCode": 712,
"StatusMessage": "Campaign Id required."
}
The codes the documentation shows:
StatusCode | StatusMessage | Seen on |
|---|---|---|
703 | Text Message missing. | Send a message |
708 | Please select 31 or less days range. | List received messages |
712 | Campaign Id required. | Campaigns |
Handle errors by the HTTP status first, then show or log StatusMessage. Do not branch on the numbers below as if they were shared with the HTTP API: the same number means different things in the two APIs (see the next section).
HTTP API error codes
The HTTP API answers every request with a line of text. A success starts with a keyword such as JOBID:, SERVICEID:, OK or 000:; a failure starts with ERR: or Err: followed by a number. Each endpoint's page lists its full set. Combined, they are:
| Code | Message | Endpoints |
|---|---|---|
0 | Keyword is available (a success, despite the Err: prefix) | Keyword lookup |
300 | Invalid Userid or password / Invalid User credentials | Keyword register, keyword credits, subscribe user, send invitation |
301 | Failed authentication | Send SMS, send MMS, credit balance |
302 | Invalid vasid | Send MMS |
303 | Invalid password | Send MMS |
304 | Invalid logon | Send MMS |
305 | Not enough credits | Send SMS, send MMS |
306 | Message Receipient is missing | Send MMS |
307 | Invalid delivery date time. | Send MMS |
312 | Failed to download content object. | Send MMS |
313 | Invalid MMS Code | Send MMS |
314 | Invalid MMS Code or no files specified. | Send MMS |
400 | System error | Send MMS |
700 | Missing Shortcode | Keyword register, subscribe user, send invitation |
700 | Missing User APP Key / Missing Keyword / Missing Mobile Number | Send invitation |
701 | Missing VASID | Keyword register, subscribe user |
702 | Missing Keyword | Keyword register |
702 | Invalid Keyword | Send invitation |
702 | Missing Keyword/Invalid Keyword | Subscribe user |
703 | Missing User Name | Keyword register, keyword credits |
704 | Missing Password | Keyword register, keyword credits |
705 | Keyword is taken, Please try another keyword | Keyword lookup, keyword register, keyword credits |
706 | Service Name is required | Keyword register |
707 | Help Message is required | Keyword register |
708 | Unsubscribe Message is required | Keyword register |
709 | Processor URL is required | Keyword register |
710 | Keyword length should be minimum 4 characters | Keyword register |
711 | Keyword credits not enough | Keyword register |
712 | Sticky Session not allowed | Keyword register |
714 | Missing Keyword | Keyword register |
715 | Error while performing account update | Keyword credits |
716 | Credit card declined. | Keyword credits |
718 | Keyword credit removal failed, No keyword credits assigned to account. | Keyword credits |
719 | Keyword credit removal failed, all available credits are in-use. | Keyword credits |
720 | Missing Mobile Number | Subscribe user |
721 | Cannot send invite to more than 100 numbers | Send invitation |
722 | The Delivery Date Time should be now or in the future | Send invitation |
Messages are quoted as the API returns them, spelling included, so you can match on them if you must.
Parsing tips
- Compare the start of the response case-insensitively: both
ERR:andErr:occur, with and without a space after the colon. Err:0on keyword lookup means available, not failure.- Keyword credits returns
718:and719:without theErr:prefix, and000:on success. 700alone does not tell you what is missing on send invitation; read the message text.

