Authentication
All API requests must include your API key in the Authorization header using Bearer token format.
Scopes
API keys support fine-grained scopes: documents:read, documents:write, decisions:read, decisions:write, or * for full access.
Rate Limits
Limits vary by plan. Exceeded requests return 429 Too Many Requests with Retry-After, X-RateLimit-Limit, and X-RateLimit-Remaining headers.
Request Format
Every request that sends a body must declare its type: Content-Type: application/json, or multipart/form-data for document upload. A body with no Content-Type, or with another type (for example application/x-www-form-urlencoded, which is what curl -d sends by default), is refused before it reaches the endpoint with HTTP 415 and this body:
This response comes from the gateway, so it does not use the error format below. With curl, add -H "Content-Type: application/json" whenever you pass -d. Requests without a body (GET, or a DELETE with no body) are not affected.
Idempotency
Mutating endpoints (e.g. document upload) support idempotent retries. Pass a unique Idempotency-Key header (UUID v4 recommended). Duplicate requests with the same key within 24 hours return the original response without re-processing.
Endpoints
/api/v1/documentsList documents with cursor-based pagination.
/api/v1/documents/uploadUpload a document. Supports Idempotency-Key header.
/api/v1/documents/:idRetrieve a single document by ID.
/api/v1/documents/:id/qaAsk a question about a document. Returns a contextual answer.
/api/v1/decision-runsList decision runs with filters and cursor pagination.
/api/v1/decision-runs/:idRetrieve a single decision run with all associated items.
Pagination
List endpoints use cursor-based pagination. Pass ?cursor=<next_cursor> and ?limit=20 (max 100) to page through results. Responses include a next_cursor field when more results exist.
Error Format
All errors return a consistent JSON body with a machine-readable code field.