Errors
Every error below is the literal response a failure produces. Where a field is called error in one response and code in another, that is the real, if occasionally inconsistent, field name. Match on error or code, never on the human-readable detail text, which can be reworded.
Authentication
| HTTP | Code | Why | Fix |
|---|---|---|---|
| 401 | auth_invalid_key | The API key is missing, misspelled, or has been revoked. | Check the Authorization: Bearer … header is present, and use an active key from API keys. |
json
{ "error": "Invalid or inactive API key.", "code": "auth_invalid_key" }Validation (400)
Malformed input returns an object keyed by field name, each with a list of messages:
json
// to: "0000"
{ "to": ["'0000' is not a valid E.164 number. Expected format: +212612345678"] }More than one field can fail at once; each appears as its own key.
Monthly allowance (402)
| HTTP | Code | Why | Fix |
|---|---|---|---|
| 402 | quota_exceeded | Your monthly message allowance is used up. | Wait for the counter to reset on the first of the month, or contact us to raise it. See Usage and billing. |
json
{
"error": "quota_exceeded",
"code": "monthly_limit_reached",
"detail": "You have used 300 of 300 messages this month. Upgrade your plan to continue sending."
}The detail text is shown as it is returned today. Accounts are changed by contacting Connecfy rather than through a self-service upgrade.
Sender number (403, 503)
| HTTP | Code | Why | Fix |
|---|---|---|---|
| 403 | from_number_not_found | from isn't a sender number on your account. | Use one of the numbers under Sender numbers, and check for a typo. |
| 403 | from_number_access_denied | The number exists, but your account has no rights to send from it. | Ask us to grant access, or use a number that belongs to your account. |
| 503 | device_inactive | The sender number behind from has been deactivated. | Use another sender number, or contact us. |
Not found (404)
| HTTP | Code | Why |
|---|---|---|
| 404 | not_found | No message with that ID exists on your account. This includes IDs that exist on another account, so IDs can't be used to probe other accounts. |
Rate limiting (429)
json
// 429, header: Retry-After: 14
{ "detail": "Request was throttled. Expected available in 14 seconds." }Limits per endpoint are in Rate limits.