Errors & idempotency
RFC 7807 problems and Idempotency-Key semantics.
Problem details
Error responses are application/problem+json, per RFC 7807:
a type URI identifying the error kind, a human-readable title, the HTTP
status, and a detail describing this specific occurrence.
{
"type": "https://platform.dev/problems/validation",
"title": "Validation failed",
"status": 400,
"detail": "Idempotency-Key header is required for this request"
}Two responses use a different shape, both application/json:
POST /v1/oauth/tokenreturns the OAuth 2.0 error shape (RFC 6749 §5.2): a singleerrorcode —invalid_request,unsupported_grant_type,invalid_client,rate_limit_exceededorserver_error.POST /v1/vision/selfie-submitanswers409with{ "code": "liveness_retake", "attempts_remaining": <n> }when a liveness check needs another attempt.
Status codes
| Status | Meaning |
|---|---|
400 | Validation failed — a required field is missing or malformed. |
401 | Authentication required — the bearer token is missing, expired, or invalid. |
403 | The client isn't allowed to do this — wrong client type (org-wide vs. programme-pinned) or wrong programme. |
404 | The resource doesn't exist, or isn't visible to this client. |
409 | Conflict — for example, an Idempotency-Key reused with a different request body. |
410 | Gone — KYC data erased under the retention policy, or a capture session's scan budget is spent. |
422 | Well-formed, but not acceptable in the resource's current state — for example, an empty patch. |
429 | Rate limited — wait for the Retry-After interval before retrying (the token endpoint sends none; see Authentication). |
500 | Internal error. |
502, 503 | Temporarily unavailable — a dependency can't be reached or isn't configured yet. Retry with backoff. |
Idempotency
Mutating requests (POST, PUT, PATCH, DELETE) require an Idempotency-Key
header, except the ones listed below. Retry the same request with the same key and the same body, and you get
back the original stored result rather than a duplicate side effect — safe to
retry on a timeout or a dropped connection. Reuse the same key with a
different body and the request is rejected with 409.
Keys are scoped per operation, not globally, so the same key value used against two different endpoints doesn't collide. Generate a fresh UUID for each logically distinct request:
-H "Idempotency-Key: $(uuidgen)"These mutating calls take no Idempotency-Key; the operation reference
lists the headers each call accepts:
POST /v1/simulated-spends— each accepted call is meant to be its own distinct transaction rather than a replay-safe one; see the Quickstart.POST /v1/oauth/token.- Calls that issue a short-lived session, grant or challenge — a retry simply
issues a new one:
POST /v1/cards/{id}/secure-data,POST /v1/kyc/checks/{id}/capture-session,POST /v1/kyc/checks/{id}/chip-challenge,POST /v1/kyc/policy/draft/preview-sessionandPOST /v1/cardholders/{id}/passkeys/options. - Passkeys:
POST /v1/cardholders/{id}/passkeysandDELETE /v1/cardholders/{id}/passkeys/{credentialId}. - The KYC policy draft:
PUT /v1/kyc/policy/draftandDELETE /v1/kyc/policy/draft. POST /v1/cardholders/{id}/attestation(console sessions only).- The capture widget's own calls under
/v1/vision/.