Errors and status codes
Every status both surfaces return, and what to do about each one.
Read this one first if something is failing. 401 and 403 are the two that catch people out, and they mean different things.
The error body
A refusal from the read surface carries this envelope. The message is meant to be read by a person, not matched on. A key we do not recognise, or one that was revoked, gets { "detail": "invalid api key" } instead, on every route.
json
{ "error": { "code": "forbidden", "message": "missing scope: read" } }Every status
| 202 | Accepted and stored. Parsing and scoring happen after this, so this is not a promise that the payload was readable |
|---|---|
| 400 | The connector's platform does not accept webhooks, or a read asked for a from after its to |
| 401 | No usable credential. The key is missing, revoked or not one we issued, an ingest route got a key without the ingest scope, or a webhook delivery was not signed as its connector requires |
| 403 | A real credential that may not do this. A read route got a key without the read scope, or a client-limited key named another client |
| 404 | Unknown webhook token, a disabled connector, or a client id this workspace does not have |
| 413 | Over the ceiling. 8 MiB for an event batch, 200 MiB for an import file |
| 422 | A field is missing or malformed |
| 429 | Over the key's rate limit: a burst of 120 requests, then 20 a second. The body is { "detail": "rate limit exceeded" }. Wait the seconds in Retry-After |
| 503 | We could not check the key just then. Wait the seconds in Retry-After and send again |
The two that catch people out
| 401 on /ingest/v1/events | The key does not carry the ingest scope. A read key cannot send |
|---|---|
| 403 on /api/v1/threads | The key does not carry the read scope. An ingest key cannot read |
| 403 on any other /api/v1 route | That route is not part of the published read surface. Only conversations, metrics, findings and scores are |
Note: A
202 is not a success signal for the payload. We answer before anything parses, so a body we cannot read still got one. The connector screen counts what failed after the answer went back.Read next
- API · Send conversations in, and read the scores back out. Two surfaces, one key format.
- Authentication and API keys · The two scopes, what each one reaches, and how to replace a key.
- Webhook endpoint · The one URL a platform posts its calls and messages to.