The response envelope
Authmatech does not return a bare{ error: ... } object. Instead, every response is wrapped consistently:
HTTP status codes
Validation, product-enablement, and balance problems all surface as
400 Bad Request with a descriptive message. Always read messages[].message rather than relying on the status code alone.Error codes
Thecode field carries a stable, machine-readable identifier you can branch on. Common values include:
Authentication failures are returned as
401 and may not carry a code — treat any 401 as “fix the X-API-KEY / X-CLIENT-ID headers.”
Phone number format
Submit mobile numbers in E.164 format: a leading+, the full country code (no leading zero), and the subscriber number with no spaces, dashes, or parentheses.
Valid
Retry strategy
Retryable
429 Too Many Requests and 500 Internal Server Error are safe to retry. Use exponential backoff:
- Wait ~1 s after the first failure.
- Double the wait each time: 2 s → 4 s → 8 s …
- Cap retries (e.g. 5 attempts) and the maximum wait (e.g. 60 s).
- Add small random jitter (±100 ms) so clients don’t retry in lockstep.
429.
Non-retryable
400, 401, and 404 reflect problems in the request itself. Retrying unchanged returns the same result — read messages[].message and fix the cause first.
Debugging checklist
Authentication (401)
- Are both
X-API-KEYandX-CLIENT-IDpresent on every request? - Did you copy the API key without trailing whitespace or quotes?
- Are you using the right credentials for the environment (sandbox vs. production)?
400)
- Is
Content-Type: application/jsonset and does the JSON parse cleanly? - Are all required fields present for the endpoint?
- Are mobile numbers in E.164 format?
- Is the product enabled and the balance sufficient and unexpired?
404)
- Is the resource id correct and from the same environment?
Getting help
If you’re still stuck after the checklist, contact connect@authmatech.com (Sun–Thu, 09:00–18:00 Amman time). To speed up resolution, include:- The HTTP status and the
messages[].code/messages[].messagefrom the response. - The request URL and method.
- The request body (redact your API key).
- The full response body.
- The approximate time of the error, with timezone.

