API reference
Errors
Every error response is JSON with a consistent envelope. Status codes follow REST conventions and the body always carries a stable, machine-readable shape.
Envelope
Typical 4xx body
{
"statusCode": 401,
"message": "Missing scope: validate",
"error": "Unauthorized"
}statusCodemirrors the HTTP status, included so SDKs can centralize handling without parsing the status line.messageis human-readable. Safe to surface back to the model — they’re short and don’t leak internals.erroris the high-level category, e.g.Unauthorized,BadRequest,NotFound.
Status codes you might see
FieldTypeDescription
200OKSuccessful response. On
validate and propose a 200 with allowed: false is still a 200 — the policy did its job.400Bad RequestMalformed JSON, missing required fields, unknown enum values. Inspect message — these are not retry-safe.
401UnauthorizedBad bearer, expired key, revoked key, or missing scope for this route. Not retry-safe; rotate the key.
403ForbiddenRBAC permission denial — for org members whose role lacks the permission. Not retry-safe.
404Not FoundUnknown route or resource id. Often a typo in the path.
409ConflictIdempotency-Key collision on
propose with a different payload for the same key. Use a fresh key or wait 24 hours.429Too Many RequestsYou hit the throttle (100/min/user). Back off with exponential delay. See Rate limits.
500Internal Server ErrorBug or transient failure on our side. Retry-safe — exponential backoff with jitter.
502 / 503 / 504Edge / upstreamGateway, capacity, or timeout at the edge. Retry-safe.
Retry policy
- Retry on 5xx and 429. Exponential backoff starting at 250ms with jitter, capped at ~10s. Give up after 5 attempts.
- Don’t retry 4xx. Fix the request instead.
- Use
Idempotency-Keyonproposeso retries don’t create duplicate attestation requests.
Violation rules
The violations array inside a validate_trade response uses a small fixed vocabulary documented on the Validate trade page. Per-key policy violations carry a key_policy_* prefix and are documented on the Per-key policy constraints page.
Last updated 2026-06-15