Documentation

Error codes

API Response And Error Codes

The MoMS response to the API call has two parts: the HTTP response code, and specific error codes contained in the body of the HTTP response to provide additional information about the API request itself. 

The API error code tells you more about your request to the MoMS or CM API service, and what specific aspect of your call might have caused the failure in the event that the call did not succeed.  The API response code, status and message are delivered in XML in the body of the HTTP 200 response. 

All 200 HTTP responses contain an API response code, status and message.

HTTP Response Codes

Response Code Description
200 The request was processed successfully. Check the response code and message of the response XML for additional information regarding the request. See the API Error Codes below for additional information on the response codes.
4xx The request was rejected by the API service. In most cases, you’ll receive this message if the source IP of the request is not white-listed or your client_id and token don't match.
5xx An error occurred with our servers. Please retry your request. If the issue persists, contact support@mogreet.com

Here is a sample:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error" code="445">
<message>
<![CDATA[The request was rejected. The entered "name" parameter is invalid.]]>
</message>
</response>
</response>

Or, in JSON,

{
"response": {
"code": "0",
"status": "error",
"message": "invalid number"
}
}

Error Code List

Here is an exhaustive list of all the current codes.


Code Description
1 Successful request.
400 The request was rejected for unknown reason.
403 Access Forbidden: bad client id or auth token, or ips not whitelisted
404 Unknown request. Verify object.method is correct.
430 Missing “campaign_id” parameter.
431 Invalid “campaign_id” parameter.
432 The campaign does not exist. It has been deleted or the campaign_id is incorrect.
433 Missing “from” parameter.
434 Invalid “from” parameter.
435 Missing “to” parameter.
436 Invalid “to” parameter.
437 Missing "from_name" parameter.
438 Missing "to_name" parameter.
439 Missing the "message" parameter.
440 The entered promo code does not match any approved promotions.
443 request is missing a required parameter
444 invalid list_id parameter
445 The request was rejected. The entered "name" parameter is invalid.
460 Bad Media API request
461 Invalid Media Size (over 150 MB on upload)
462 Invalid Media Type (unsupported file)
463 Invalid Media Name
500 Internal fatal error uncaught.
600 Transaction terminated for unknown reasons.
601 Transaction terminated for unknown reasons.
602 User type unknown. Returns which user and user input.
603 User carrier unknown. Returns unsupported user phone.
604 User blacklisted by carrier. Returns user phone and carrier.
605 User carrier unsupported. Returns user phone and carrier.
606 User opted out. Returns user phone.
607 Content is not valid.