Every consent record carries test, and every webhook event carries the same flag.
Written with
test
Kept
A test key
true
Apart from live records, and deleted 30 days after the last change
A live key
false
As live evidence
Updates, withdrawals and the calls on a person reach only records of the key's own kind. Made with a test key, they never touch a live record. How to use test records is in Test your integration.
A write that carries an Idempotency-Key header is applied once, however many times you send it.
Item
Rule
Endpoints
POST /consent, PATCH /consent/{consentId}, POST /consent/{consentId}/withdraw and POST /email-consent.
Calls on a person
POST /subjects/withdraw, /erase and /link check the header but store no response. A repeat runs again and changes nothing more.
Other endpoints
Ignore the header.
Key format
1 to 255 printable ASCII characters, with no spaces
Stored for
24 hours
Scope of a key
One project and one API key. The same value under two API keys never collides.
Same request
The same method, path and JSON body. The order of the JSON keys does not matter.
You send
You get
A key for the first time
The request is handled as usual and its response is stored
The same key and the same request
The stored response, with Idempotent-Replayed: true. Nothing is recorded again.
The same key and a different request
422 with the code IDEMPOTENCY_KEY_REUSED
The same key while the first request is still running
A wait of up to two seconds, then 409 with the code IDEMPOTENCY_REQUEST_IN_PROGRESS
A key that is empty, too long or has spaces
400
A response below 500 that comes from handling the request is stored and replayed, a 400 with a code included. After such a refusal, fix the request and send it with a new key. A failed field check, a refused key, a rate limit and a 5xx response are not stored, so the same key tries again.