Errors & troubleshooting
Every error status the Obsivara ingest API can return, what causes it, and how to fix it.
Error reference
| Status | Message | Cause | Fix |
|---|---|---|---|
401 | Missing Bearer token | No Authorization header was sent | Add Authorization: Bearer obs_live_... to every request |
401 | Invalid API key | The key is malformed, revoked, or does not exist | Generate a new key at Settings → API Keys in the dashboard |
403 | API key lacks the ingest:write scope | The key exists but was created with a scope that does not include ingest:write | Recreate the key with the ingest:write (or *) scope |
400 | Invalid JSON body | The request body is not valid JSON | Validate your JSON; ensure Content-Type: application/json is set |
400 | events must be an array | The events field is missing or not an array in the batch payload | Wrap your events in { "events": [ ... ] } |
400 | (all events rejected) | Every event in the batch fails schema validation (wrong type, missing required field, etc.) | Check the errors array (each entry has index + error) and fix the flagged events — see Event schema |
413 | Max 1000 events per batch | The batch contains more than 1,000 events | Split the payload into multiple requests of ≤ 1,000 events each |
429 | Plan limit exceeded | Your workspace has exhausted its ingest quota for the current billing period | Upgrade your plan or slow down the ingest rate — contact support if you need a temporary lift |
401 — Missing Bearer token
Returned when the Authorization header is absent entirely.
HTTP/1.1 401 Unauthorized
Content-Type: text/plain
Missing Bearer tokenEvery request to /ingest/* must include:
Authorization: Bearer obs_live_YOUR_KEY401 — Invalid API key
Returned when the key in the Authorization header is not recognised — it may be malformed, expired, or has been deleted.
HTTP/1.1 401 Unauthorized
Content-Type: text/plain
Invalid API keyCreate a fresh key at Settings → API Keys in the Obsivara dashboard. Keys start with obs_live_.
403 — Wrong scope
The key is valid but was created without the ingest:write scope. For example, a read-only key will be rejected by all /ingest/* routes.
HTTP/1.1 403 Forbidden
Content-Type: text/plain
API key lacks the ingest:write scopeRecreate the key and choose the ingest:write scope (or * for full access).
400 — Invalid JSON
Returned when the request body cannot be parsed as JSON.
HTTP/1.1 400 Bad Request
Content-Type: text/plain
Invalid JSON bodyCommon causes: trailing commas, unquoted keys, binary body. Ensure the Content-Type: application/json header is set and the body is valid UTF-8 JSON.
400 — events must be an array
Returned by /ingest/batch when the events key is missing or not an array.
HTTP/1.1 400 Bad Request
Content-Type: text/plain
events must be an arrayThe correct batch envelope is:
{ "events": [ { "type": "run_start", "data": { ... } } ] }400 — All events failed validation
Returned only when every event in the batch fails schema validation (accepted is 0). The body is the normal ingest envelope: errors lists each rejected event by its zero-based index with the validation error message. (If some events are valid, the request instead returns 202 — see “Partial batch success” below.)
HTTP/1.1 400 Bad Request
{
"accepted": 0,
"rejected": 1,
"errors": [
{ "index": 0, "error": "runId must be a valid UUID" }
]
}Check each flagged field against the Event schema reference. The most common causes are:
runIdis not a valid UUID — userun_startfirst to obtain one, or generate a UUID v4.- A required numeric field (
promptTokens,durationMs, etc.) is missing or is a string. statusis not one of the accepted enum values.
413 — Batch too large
The batch contains more than 1,000 events.
HTTP/1.1 413 Payload Too Large
Content-Type: text/plain
Max 1000 events per batchSplit the payload into multiple requests. If you need high-throughput ingest, send batches in parallel.
429 — Plan limit exceeded
Your workspace has hit the ingest quota for the current billing period.
HTTP/1.1 429 Too Many Requests
Content-Type: text/plain
Monthly event limit reached for your planUpgrade your plan in the dashboard, or contact support if you need a temporary quota lift.
Partial batch success (202 with rejections)
When a batch contains a mix of valid and invalid events, the valid events are accepted and the invalid ones are rejected. The response is still HTTP 202, but rejected will be greater than zero and errors will list the per-index failures:
HTTP/1.1 202 Accepted
{
"accepted": 4,
"rejected": 1,
"errors": [
{
"index": 2,
"error": "runId must be a valid UUID"
}
]
}index in each error entry refers to the zero-based position of the event in the events array. Fix the flagged events and resubmit only those — do not resubmit the accepted events.