Requests, retries and idempotency
Networks fail. The rules below let you retry any request without charging twice, creating a second verification or recording a second decision.
Idempotency
The two contracts identify a repeated request differently.
Identity verification
Risk Intelligence
Send your own unique value as metadata.requestId when you create a verification.
- A repeat with the same
requestIdreturns the original verification with200. No new verification is created and nothing is charged again. - Use a value tied to your own business action, such as an order or application ID, so that a retry after a crash still carries it.
- One-off checks accept a top-level
requestIdwith the same behaviour. - Sessions are keyed by
externalUserId: a returning customer resumes their existing attempt.
Operations that create or change something require an Idempotency-Key header: 8 to 200 characters from A-Z a-z 0-9 . _ : ~ -.
- Same key, same request: you get the original result. No second charge, signal, alert or case.
- Same key, different request:
409with typeIDEMPOTENCY_CONFLICT. - Transactions and activities are different: their required
externalActivityIdis the idempotency identity. The same ID and payload replays the stored decision; the same ID with a changed payload conflicts.
Each endpoint page shows whether the header is required.
What is safe to retry
A risk decision that could not be made is never an approval. If a transaction or activity call fails or times out, hold the action or apply your own fallback rule. Do not treat an error as ALLOW.
Pagination
A few Risk Intelligence list endpoints are page-numbered instead; their reference pages say so.
Request IDs
On /api/v1 you may send X-Request-Id (up to 128 characters) to correlate a call with your own logs. Every /api/v1 error returns a request_id. Quote it when you contact support.
Versioning
Versioning applies to the Risk Intelligence and Trust endpoints under /api/v1: wallet and transaction screenings, risk assessments, monitoring, transactions, crypto, activities, cases, signals, alerts, webhooks, risk intelligence and /api/v1/versions. These are the responses that carry X-Myaza-API-Version. The identity verification endpoints under /api/v1 (/verify, /verifications, /config, /checks, /upload, /sessions and the rest) do not read the version headers and do not return them.
- The current API version is v2. Pin it with the optional request header
Toden-Version: v2; leave the header out to use the current version. The/api/v1in the URL is the base path, not the API version, and does not change. 2026-08-11is v2’s identifier and keeps working as an alias:Toden-Version: 2026-08-11means the same asToden-Version: v2. Signed webhook envelopes carry"version": "2026-08-11"for the same reason.- Each of these responses names the version that answered in the
Toden-Version: v2response header, besideX-Myaza-API-Version: v1, which names the base path and is unchanged. Browser callers can readToden-Version. Myaza-Version, the header’s earlier name, keeps working with the same values. If you send both headers they must name the same version, or the request is refused with400 conflicting_api_version. On these endpoints an unknown version is refused with400 unsupported_api_version, which lists the accepted values.GET /api/v1/versionslists the versions this API accepts.- Additive changes are not breaking: new optional response fields, new endpoints, new webhook event types. Write clients that ignore what they do not recognise.
- A new enum value can still break a client that matches exhaustively. Always include a default branch.
- Removing or renaming a field, making an optional field required, or changing what a field means requires a new version.