Status, errors and retries
The status codes of the API, its two error shapes, rate limits, which calls to retry and how to page through a list.
A call is answered in two stages. The gateway checks the credential, the rate limit and the read-only rule first; then the operation runs. Each stage has its own error shape.
Status codes
| Status | Meaning | Retry? |
|---|---|---|
200 | Success. | No need. |
400 | The request is malformed, or a write has no Idempotency-Key header. | No: fix the request. |
401 | No credential, or the credential is not valid or carries no tenant. | No: fix the credential. Repeated 401 calls block your address. |
403 | The credential is valid but may not do this, for example a write on the read-only demo. | No. |
404 | Not found for your tenant. Another tenant's record is reported the same way. | No. |
409 | The resource is not ready, for example a proof for an event not yet in a batch. | Yes, later. |
429 | Rate limit reached, or your address is blocked after failed authentications. | Yes, after the wait the response gives. |
500, 502, 503, 504 | A fault on Ventra's side. | Yes, with backoff. |
501 | The operation is not built. | No. |
Error from an operation: problem details
Operations of the Platform API answer errors as problem details, with the content type
application/problem+json:
{
"type": "urn:ventra:problem:404",
"title": "Resource Not Found",
"status": 404,
"rule": "E6",
"fields": ["eventId"],
"correlationId": "<your-correlation-id>"
}
| Field | Meaning |
|---|---|
type | A URN. urn:ventra:problem:<status> for most errors; urn:ventra:problem:idempotency-required, urn:ventra:problem:write-forbidden and urn:ventra:problem:not-implemented for the cases their names say. |
title | A short human-readable text. Do not parse it: it can change. |
status | The HTTP status. |
rule | The rule that refused the call, when there is one, for example E6 (the egress filter). |
fields | Names of the fields involved. Names only, never values. |
correlationId | The X-Correlation-Id you sent, echoed back. |
Error from the gateway
Authentication, rate-limit and read-only refusals come before the operation, as JSON with success: false:
{
"success": false,
"error": { "code": "RATE_LIMITED", "message": "Too many requests. Please retry later.", "retryAfterMs": 60000 }
}
| Code | Status | Meaning |
|---|---|---|
AUTH_MISSING | 401 | No Authorization header. |
AUTH_INVALID | 401 | The token is not valid: signature, issuer, audience or expiry. |
AUTH_RATE_LIMITED | 429 | Too many failed authentications from your address. Wait for Retry-After (seconds). |
RATE_LIMITED | 429 | Too many calls. Wait for retryAfterMs (milliseconds). |
DEMO_READONLY | 403 | A write with a read-only demo credential. |
Branch on status and error.code or type, never on the message or title text.
Retries
- Retry only
409,429and5xx. Never retry400,401,403,404or501unchanged. - On
429, wait at least as long asRetry-AfterorretryAfterMssays. - Otherwise back off exponentially with random jitter, for example 1, 2, 4 and 8 seconds, then give up and alert.
- Stop at the first
401: every further failure counts towards blocking your address. - Send the same
X-Correlation-Idon each retry of one call, so the attempts can be traced together. - A write is retried with the same
Idempotency-Key; see Identifiers and idempotency.
Paging through a list
List operations return one page at a time:
{ "data": [], "nextCursor": "<opaque-cursor>" }
limitsets the page size: 50 by default, at most 200.- Pass
nextCursorback ascursorto get the next page. It isnullon the last page. - A cursor is opaque. Do not build or change one.
Related
- Identifiers and idempotency · The identifiers that tie messages, events and proofs together, the correlation id you send, and how writes stay safe to retry.
- Environments and keys · Where the API runs, how a call is authenticated, and how to keep a credential out of places it does not belong.
- API reference · Every documented operation of the Ventra Platform API v1, grouped by resource, generated from the specification.
Last reviewed 2026-12-01