[{"data":1,"prerenderedAt":77},["ShallowReactive",2],{"doc:\u002Freference\u002Fidempotency":3},{"page":4,"toc":72,"updated":76},{"path":5,"title":6,"seoTitle":7,"description":8,"blocks":9},"\u002Freference\u002Fidempotency","Idempotency and retries","Idempotent Requests and Safe Retries","Retry an identification safely: the Idempotency-Key header makes a repeated request return the first answer, charged once.",[10,13,18,20,27,34,40,44,47,63,65,68],{"type":11,"text":12},"p","A network can fail after Fingerly has answered but before the answer reaches the client. Retrying then would identify the visitor twice and charge twice. An idempotency key prevents both.",{"type":14,"level":15,"text":16,"id":17},"heading",2,"Idempotency keys","idempotency-keys",{"type":11,"text":19},"Send a unique `Idempotency-Key` header with `POST \u002Fidentify`, and send the same value with every retry of that request.",{"type":21,"samples":22},"code",[23],{"label":24,"lang":25,"code":26},"Request","http","POST \u002Fapi\u002Fv1\u002Fidentify HTTP\u002F1.1\nHost: us.api.fingerly.io\nContent-Type: application\u002Fjson\nx-api-key: fly_pk_us_production_…\nIdempotency-Key: 7d5e1f2a-3c4b-4d6e-8f90-a1b2c3d4e5f6",{"type":28,"items":29},"list",[30,31,32,33],"Keys are scoped to your organization and remembered for at least one hour.","Use a random UUID. Keys may be up to 255 characters.","A repeat of a key that was already answered returns `200` with the first `request_id` and `\"duplicate\": true`, is not charged, and does not count against your rate limit.","A request refused with `402` or `429` releases its key, so the retry is processed normally.",{"type":21,"samples":35},[36],{"label":37,"lang":38,"code":39},"Duplicate response","json","{\n  \"request_id\": \"01a0a84b-e6a2-7c09-9f51-0b3d7a26c8e4\",\n  \"duplicate\": true\n}",{"type":41,"tone":42,"text":43},"callout","tip","A duplicate response carries only the request ID. Keep the first response, or read the event on your server with [Get an event](\u002Freference\u002Fget-event).",{"type":14,"level":15,"text":45,"id":46},"How the SDKs retry","how-the-sdks-retry",{"type":48,"columns":49,"rows":54},"table",[50,51,52,53],"SDK","Attempts","Retries on","Backoff",[55,60],[56,57,58,59],"JavaScript and web frameworks","3","Network errors, timeouts, `408`, `425`, `429`, `5xx`","Full jitter from 100 ms, capped at 2 s",[61,57,62,59],"iOS and Android","Network errors, `429`, `5xx`",{"type":11,"text":64},"Every SDK attempt times out after 5 seconds and reuses one idempotency key per `identify()` call.",{"type":14,"level":15,"text":66,"id":67},"Other endpoints","other-endpoints",{"type":28,"items":69},[70,71],"`GET` requests are naturally safe to retry.","`POST \u002Fevents\u002F{request_id}\u002Fsupplement` deduplicates on content: resending the same deferred report returns `202` with `\"duplicate\": true`, and a different one returns `409`.",[73,74,75],{"id":17,"text":16,"level":15},{"id":46,"text":45,"level":15},{"id":67,"text":66,"level":15},"2026-09-17T08:28:36.000Z",1789667797846]