Common HTTP API Errors and How to Fix Them

Common HTTP API Errors and How to Fix Them

HTTP code Probable cause Solution
400 Missing or invalid parameter (misformatted number, missing required field) Check your JSON request format and number format (+212...)
401 API key missing, invalid or expired Check the Authorization header and regenerate the key if necessary
402 Insufficient balance on account Top up your account or activate auto top-up
403 Action not allowed for this API key (Scope/IP restriction) Check the permissions associated with the key used
404 Resource not found (e.g. message_id does not exist) Check the ID used in the URL
422 Sender ID not validated or incompatible with channel type Check the validation status of your Sender ID
429 Rate limit exceeded Implement a retry system with progressive delay
500 Internal error on platform side Contact Support with Request ID (X-Request-ID)

Each error response includes a JSON body with an error.code and error.message field detailing precisely the cause.

Was this article helpful?