Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ontora.com/llms.txt

Use this file to discover all available pages before exploring further.

The API uses standard HTTP status codes. Errors come back as JSON in this shape:
{
  "detail": "Workspace not accessible by this API key",
  "code": "workspace_forbidden"
}
When validation fails (invalid request body), detail is an array of field-level errors:
{
  "detail": [
    { "loc": ["body", "topics", 0, "name"], "msg": "field required", "type": "missing" }
  ]
}

Status codes

CodeMeaningWhat to do
200 OKSuccess
201 CreatedResource createdCapture the returned id
204 No ContentSuccess, no body
400 Bad RequestMalformed requestFix the request body
401 UnauthorizedMissing or invalid credentialsCheck X-API-Key or Authorization header
403 ForbiddenAuthenticated but not allowedAdd the missing scope, or you’re hitting a workspace you don’t belong to
404 Not FoundResource doesn’t existVerify the id
409 ConflictResource isn’t in the expected stateCheck the error code — e.g., synthesis_pending
422 Unprocessable EntityValidation errorFix the field-level issues in detail
429 Too Many RequestsRate limitedHonor Retry-After
500 Internal Server ErrorBug on our sideRetry; if persistent, contact support with the request id
503 Service UnavailableTemporary outageRetry with backoff

Common error codes

codeMeaning
invalid_api_keyKey is missing, malformed, or revoked
insufficient_scopeKey is missing a required scope
workspace_forbiddenKey belongs to a different workspace
synthesis_pendingCampaign hasn’t completed synthesis yet
graph_not_readyEntity-extraction pipeline hasn’t finished
campaign_lockedLifecycle action invalid for current status (e.g., starting an already-completed campaign)
rate_limitedPer-workspace rate limit exceeded

Idempotency

Safe-by-design endpoints (any GET, DELETE) are naturally idempotent. For POST endpoints, pass an Idempotency-Key header with a unique value (e.g., a UUID) to make retries safe:
Idempotency-Key: 2c4a9cf2-...
The same key replayed within 24 hours returns the original response without creating a duplicate.

Rate limits

Rate limits apply per workspace, not per key. Limits are returned in headers on every response:
HeaderMeaning
X-RateLimit-LimitLimit for the current window
X-RateLimit-RemainingCalls remaining in this window
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait (only on 429)