Skip to content
Wire2AirWire2Air

Errors

HTTP status codes and application error codes for the REST API v1 and the legacy HTTP API, and how to handle them.

Last updated

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

StatusMeaning
200Success.
201Success: a new message has been queued for delivery (send a message).
400Bad request. The request is not valid; the JSON body says what is missing.
401Unauthorized. The API key is missing or incorrect.
429API calls quota exceeded. See Rate limits.
500Internal server error. Contact support.

Application errors

A 400 response carries a JSON body with a numeric StatusCode and a readable StatusMessage:

400 Bad Request
{
  "StatusCode": 712,
  "StatusMessage": "Campaign Id required."
}

The codes the documentation shows:

StatusCodeStatusMessageSeen on
703Text Message missing.Send a message
708Please select 31 or less days range.List received messages
712Campaign 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:

CodeMessageEndpoints
0Keyword is available (a success, despite the Err: prefix)Keyword lookup
300Invalid Userid or password / Invalid User credentialsKeyword register, keyword credits, subscribe user, send invitation
301Failed authenticationSend SMS, send MMS, credit balance
302Invalid vasidSend MMS
303Invalid passwordSend MMS
304Invalid logonSend MMS
305Not enough creditsSend SMS, send MMS
306Message Receipient is missingSend MMS
307Invalid delivery date time.Send MMS
312Failed to download content object.Send MMS
313Invalid MMS CodeSend MMS
314Invalid MMS Code or no files specified.Send MMS
400System errorSend MMS
700Missing ShortcodeKeyword register, subscribe user, send invitation
700Missing User APP Key / Missing Keyword / Missing Mobile NumberSend invitation
701Missing VASIDKeyword register, subscribe user
702Missing KeywordKeyword register
702Invalid KeywordSend invitation
702Missing Keyword/Invalid KeywordSubscribe user
703Missing User NameKeyword register, keyword credits
704Missing PasswordKeyword register, keyword credits
705Keyword is taken, Please try another keywordKeyword lookup, keyword register, keyword credits
706Service Name is requiredKeyword register
707Help Message is requiredKeyword register
708Unsubscribe Message is requiredKeyword register
709Processor URL is requiredKeyword register
710Keyword length should be minimum 4 charactersKeyword register
711Keyword credits not enoughKeyword register
712Sticky Session not allowedKeyword register
714Missing KeywordKeyword register
715Error while performing account updateKeyword credits
716Credit card declined.Keyword credits
718Keyword credit removal failed, No keyword credits assigned to account.Keyword credits
719Keyword credit removal failed, all available credits are in-use.Keyword credits
720Missing Mobile NumberSubscribe user
721Cannot send invite to more than 100 numbersSend invitation
722The Delivery Date Time should be now or in the futureSend 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: and Err: occur, with and without a space after the colon.
  • Err:0 on keyword lookup means available, not failure.
  • Keyword credits returns 718: and 719: without the Err: prefix, and 000: on success.
  • 700 alone does not tell you what is missing on send invitation; read the message text.