Error Codes

The API returns errors in a consistent JSON shape with an HTTP status code and a machine-readable error string.

Response shape

{
  "error":             "invalid_template",
  "error_description": "Template not found or not accessible",
  "trace_id":          "00-abcdef1234567890-1234567890abcdef-01"
}

trace_id is the ASP.NET Activity.Id for the request โ€” include it in support tickets so we can find the exact log entry.

HTTP status codes

StatusMeaning
200 OKSuccessful GET / synchronous operation.
201 CreatedResource created (Webhooks, ProviderConfigs).
202 AcceptedAsync work queued (Passes, Messages, Batches).
204 No ContentResource deleted, no body.
400 Bad RequestValidation / routing / template error.
401 UnauthorizedMissing / invalid / expired Bearer token.
403 ForbiddenAuthenticated but lacking scope or status.
404 Not FoundResource not found OR cross-tenant access.
409 ConflictState conflict (revoke a revoked pass, cancel a processing batch).
429 Too Many RequestsRate-limit or batch ceiling hit.
500 Internal Server ErrorUnhandled โ€” please report with trace_id.

Error codes

errorHTTPCause
invalid_request400FluentValidation rejected the body (missing / malformed field, length limit hit, duplicate, etc.).
invalid_client401Tenant or application doesn't exist / inactive, or the secret is wrong.
unauthorized_client403Application is disabled.
insufficient_scope403JWT scope doesn't cover the route.
not_found404Resource not found, or it exists but belongs to another tenant.
invalid_template400Template doesn't exist / archived / not owned by tenant.
intent_mismatch400Pass intent doesn't match template type.
no_providers400No ApiProviderConfig usable for the tenant.
invalid_state409Operation incompatible with current resource state.
too_many_requests429Rate-limit window exhausted.
too_many_batches429Tenant exceeds 10 active batches.

Idempotency

Mutating endpoints accept an Idempotency-Key request header. A repeated request with the same key returns the original response without creating a duplicate resource โ€” useful for safe retries after timeouts.

POST /passes uses the (tenant_id, external_ref) pair as an implicit idempotency key, even when no Idempotency-Key header is set.