Errors
Every error the API returns has the same shape:
{ "error": { "code": "domain_not_verified", "message": "paylink.ng is not verified for live sending. Add and verify it via POST /v1/domains, or develop with a sk_test_ key (sandbox needs no domain).", "docs_url": "https://docs.sendbyte.africa/errors/domain_not_verified" }}Messages state what happened and how to fix it. Every response also carries an x-request-id header; include it when contacting support.
Error codes
| Code | Status | Meaning |
|---|---|---|
validation_error | 422 | A field is missing or malformed; the message names it |
authentication_error | 401 | Missing, malformed, revoked, or unknown API key or session |
authorization_error | 403 | Key scope does not allow this action |
domain_not_verified | 403 | Live send from an unverified domain |
suppressed_recipient | 422 | A recipient is on the suppression list; the message says why |
not_found | 404 | No such resource in this project |
idempotency_conflict | 409 | Idempotency key reused with a different payload |
rate_limit_exceeded | 429 | Default limit: 120 requests per minute per key |
internal_error | 500 | Our fault; logged with your request id |
In the SDKs
All SDKs raise a typed error carrying code, status, and docsUrl, so you can branch on code rather than parsing messages.