Errors
All errors are JSON:
{
"error": {
"code": "campaign_not_approved",
"message": "Campaign cmp_12 is not approved for tmobile."
}
}
| Status | Code | When |
| --- | --- | --- |
| 400 | idempotency_key_required | Live key POST without Idempotency-Key |
| 400 | invalid_request | Missing from / to / body or invalid JSON |
| 401 | unauthorized | Missing/invalid Bearer, or key not nl_test_ / nl_live_ |
| 404 | not_found | Unknown id, or Twilio aliases disabled |
| 409 | idempotency_conflict | Same Idempotency-Key, different body |
| 422 | campaign_not_approved | Fail closed: campaign missing, unknown, not approved for the destination MNO, or the carrier rejected 10DLC |
| 422 | number_not_owned | from is not an account number |
| 422 | agent_not_found | Unknown agent id |
| 422 | no_route | Carrier has no inventory/route, or Route failover bandwidth has no client |
| 504 | carrier_timeout | Carrier HTTP timeout or 5xx |
Idempotency
- Same key + same body → original response replayed.
- Same key + different body →
409. - Live keys must send
Idempotency-Keyon every POST. - Test keys may omit it.