API Conventions
Conventions for authentication, idempotency, webhooks, errors, pagination, and asynchronous operations.
Scope
This page defines the conventions used across the Numora Public API developer preview.
Base Path and Versioning
- Public routes live under
/v1. - Internal app routes remain separate.
- Schema versions are explicit in resource fields, for example
invoice_v2.
Authentication
The public API uses API keys rather than browser session cookies.
Authentication model:
Authorization: Bearer <api_key>- One-time secret reveal at creation time
- Server-side hash storage
- Key scopes
- Key rotation and revocation
Idempotency
The current preview uses resource-specific identifiers as the primary idempotency model.
Current guidance:
- use
external_idfor document creation reconciliation - use
execution_idfor delivery callback reconciliation
Do not assume that a generic Idempotency-Key header is the primary retry contract across all current /v1 mutating routes.
Webhooks
Webhook delivery is a first-class integration mechanism.
Event types:
document.processingdocument.review_requireddocument.reviewedpush.succeededpush.failedrun.failed
Delivery model:
- HMAC signature with timestamp
- Raw request body verification
- Retry with backoff
- Delivery logs per endpoint
Error Model
Error responses use a stable error body:
{
"error": {
"code": "invalid_schema",
"message": "schema must be one of invoice_v2, receipt_v1, contract_v1",
"request_id": "req_01jpwqkshg6x8j9k9j29m8n0n4"
}
}Error classes:
unauthorizedforbiddeninvalid_payloadinvalid_schemanot_foundconflictrate_limitedinternal_error
Pagination
List routes use cursor pagination for long-lived public endpoints.
Suggested response shape:
{
"data": [],
"next_cursor": "cur_01jpwqv8k0fbbbx7k2y7w1v7r7"
}Operational Headers
Operational headers:
x-request-idretry-afteron429x-rate-limit-limitx-rate-limit-remainingx-rate-limit-reset
Async by Default
If an operation can take multiple seconds, fan out to background processing, or call third-party systems, the API returns 202 Accepted and exposes a retrievable resource instead of holding a long synchronous request open.