Skip to main content
POST /v1/transactions/analyze, /analyze/sandbox, /analyze/async, and /analyze/async/sandbox require the X-Idempotency-Key header on every request.
  • It is required — without a stable key you cannot retry safely.
  • It must be between 16 and 128 characters, from the url-safe alphabet (A-Z a-z 0-9 _ : . -).
  • The client generates and controls the key: you decide which transactions are “the same” by retrying with the same key, and which ones are new by using a different key.
Identity does not use this header. See POST /verifications.

The behaviors

The “same payload → replay” case is what makes it safe to retry a request that dropped on a network timeout: resend it with the same key and you get the original response, with no risk of duplicating the transaction.

The two 409s

They share HTTP 409 and error_code DATA_CONFLICT. You tell them apart by details (not by message, which is the code’s generic prose).

1. Request in flight

details contains A request with this X-Idempotency-Key is already in progress. Retry later with the same key. It is not an error in your payload.

2. Unreadable previous response

details contains The response stored for this X-Idempotency-Key was produced by an earlier version of the API and can no longer be replayed. When Fraudeg scores a transaction, it stores the response tied to your key so it can replay it. If that response was written under an earlier version of the contract and no longer matches the current shape, it cannot be returned as is. What matters:
  • The transaction was scored and is stored. Nothing was lost.
  • It is not an error in your request. Your payload and your key were fine.
  • It is not scored again with that key. Reprocessing it would produce a different result from the one already stored — exactly what idempotency exists to prevent.
The correct action is to retry with a new key. That produces a clean response consistent with the current contract.
This case is rare. If your 409 handling already reads details, it is enough to retry once with a new key when the text talks about replay, and with the same key when it talks about in progress.
See /analyze errors for the full envelope.

On the asynchronous paths

The key follows the same rule and lives in the same space as on the synchronous path: a key already decided by /analyze is replayed by /analyze/async, and vice versa. The difference is where you see the result: the 202 only accepts the request, and the result arrives as a webhook (or you read it from /analysis). With the same key you always get the same transaction_id. A DECIDED key never changes. Each 202 generates its own webhook: a resend of a decided key gets its own completed. See Asynchronous analysis. Next step: Fields.