Errors
Every failed request answers with the same envelope and a meaningful HTTP status:
{
"error": {
"code": "UNPROCESSABLE",
"message": "Invalid contact",
"details": {
"fields": [{ "path": "lifecycle_stage", "message": "must be equal to one of the allowed values: subscriber, lead, marketing_qualified, sales_qualified, customer" }]
}
}
}code— a stable machine-readable string. Branch on this, never onmessage.message— a human-readable sentence, safe to log and to show to a developer.details— present only where it adds something structured (validation fields, the rate-limited group, the exhausted quota).
5xx messages are generic
A server error never leaks internals: the body is always { "error": { "code": "INTERNAL", "message": "Internal Server Error" } }. Correlate with the response's request id when you contact support.
Status codes
| Status | Code | Meaning | What to do |
|---|---|---|---|
400 | BAD_REQUEST | The request is malformed — an unparseable body, a nonsensical parameter combination. | Fix the request. Retrying is pointless. |
401 | UNAUTHORIZED | Missing, malformed, expired or revoked token. | Check the Authorization header; issue a new token. |
403 | FORBIDDEN | Authenticated, but not allowed — an owner-only action, a record you have no grant on. | Nothing to retry; change the permission or the actor. |
403 | insufficient_scope | The token is valid but lacks the scope for this group and action — or the endpoint accepts no API keys at all. | Re-issue the key with the scope named in message. |
404 | NOT_FOUND | No such resource in this organization — including soft-deleted ones. | Treat as gone. |
409 | CONFLICT | The resource is in a state that forbids the operation (cancelling a shipped order, publishing an already-published version, a stale write). | Re-read the resource and decide. |
409 | idempotency_conflict | Another request with the same Idempotency-Key is still running. | Wait and retry — see Idempotency. |
422 | UNPROCESSABLE | The body failed validation. details.fields[] names each offending path. | Fix the named fields. |
429 | rate_limit_exceeded | You are going too fast. Retry-After says how long to wait; details.group names the group. | Back off and retry — see Rate limits. |
429 | concurrency_limit_exceeded | Too many long-running AI or media requests in flight at once. | Retry after a couple of seconds with less parallelism. |
429 | quota_exceeded | A plan quota is exhausted. details carries meter, limit and period_end. | Retrying will not help before period_end — upgrade or buy more. |
500 | INTERNAL | Something broke on our side. | Retry with backoff; report if it persists. |
503 | SERVICE_UNAVAILABLE | A dependency we call for you (a payment provider, a carrier) is down. message names the real reason. | Retry with backoff. |
The two 429 families
They share a status but mean opposite things, which is exactly why the codes differ:
rate_limit_exceeded= "slow down." Your budget refills continuously. HonourRetry-Afterand the same request succeeds.quota_exceeded= "buy more." The allowance is monthly. Backing off changes nothing untildetails.period_end.
Treat them differently in your retry logic; an integration that hammers a quota_exceeded in a backoff loop will still be failing at the end of the month.
Validation errors
422 is the one you will meet most while building. details.fields[] gives one entry per problem:
{
"error": {
"code": "UNPROCESSABLE",
"message": "Invalid payload",
"details": {
"fields": [
{ "path": "name", "message": "must have required property 'name'" },
{ "path": "points.0.kind", "message": "must be equal to one of the allowed values: email, phone, social" }
]
}
}
}path is dot-notated into your body (points.0.kind), and enum errors list the values they would have accepted — so a client (or an AI agent writing the call) can self-correct without reading this page.
Unknown keys are dropped, not rejected. If a field you sent has no effect, check the spelling against the reference for that endpoint.
Retrying safely
Read requests are always safe to retry. For writes, send an Idempotency-Key — then a timeout, a 500 or a dropped connection can be retried with the same key and can never create a second contact, order or message.