[{"data":1,"prerenderedAt":164},["ShallowReactive",2],{"doc-/docs/idempotency":3},{"id":4,"title":5,"body":6,"description":154,"extension":155,"meta":156,"navigation":157,"order":158,"path":159,"section":160,"seo":161,"stem":162,"__hash__":163},"docs/docs/idempotency.md","Idempotency",{"type":7,"value":8,"toc":147},"minimal",[9,13,26,31,54,83,87,113,122,132,136,143],[10,11,5],"h1",{"id":12},"idempotency",[14,15,16,17,21,22,25],"p",{},"Every state-changing endpoint accepts an ",[18,19,20],"code",{},"Idempotency-Key"," header. We store the response for 24 hours, keyed on ",[18,23,24],{},"(app, endpoint, key)",". Retries with the same key return the same response — even if the original request succeeded after a network blip on your side.",[27,28,30],"h2",{"id":29},"when-to-use-it","When to use it",[14,32,33,34,38,39,42,43,42,46,49,50,53],{},"Set it on ",[35,36,37],"strong",{},"every"," ",[18,40,41],{},"POST",", ",[18,44,45],{},"PATCH",[18,47,48],{},"PUT",", and ",[18,51,52],{},"DELETE"," from a server. Generate a UUID per logical operation, not per HTTP attempt.",[55,56,61],"pre",{"className":57,"code":58,"language":59,"meta":60,"style":60},"language-http shiki shiki-themes github-light github-dark","POST /v1/alarms/A-10293/acknowledge HTTP/1.1\nAuthorization: Bearer chekt_live_...\nIdempotency-Key: ack-A-10293-2026-05-26T10:21:34\n","http","",[18,62,63,71,77],{"__ignoreMap":60},[64,65,68],"span",{"class":66,"line":67},"line",1,[64,69,70],{},"POST /v1/alarms/A-10293/acknowledge HTTP/1.1\n",[64,72,74],{"class":66,"line":73},2,[64,75,76],{},"Authorization: Bearer chekt_live_...\n",[64,78,80],{"class":66,"line":79},3,[64,81,82],{},"Idempotency-Key: ack-A-10293-2026-05-26T10:21:34\n",[27,84,86],{"id":85},"the-contract","The contract",[88,89,90,97,107],"ul",{},[91,92,93,96],"li",{},[35,94,95],{},"Same key, same payload"," → same response (cached).",[91,98,99,102,103,106],{},[35,100,101],{},"Same key, different payload"," → ",[18,104,105],{},"409 idempotency_conflict",".",[91,108,109,112],{},[35,110,111],{},"Different key, same payload"," → executed twice. (Your call.)",[27,114,116,117,121],{"id":115},"whats-not-idempotent","What's ",[118,119,120],"em",{},"not"," idempotent",[14,123,124,127,128,131],{},[18,125,126],{},"GET"," requests are read-only by definition — no key needed. Streaming endpoints (",[18,129,130],{},"/v1/events/stream",") don't accept idempotency keys.",[27,133,135],{"id":134},"best-practice","Best practice",[14,137,138,139,142],{},"Generate the key from a business identifier, not a random UUID. A key like ",[18,140,141],{},"dispatch-A-10293"," survives a process crash; a fresh UUID per attempt doesn't.",[144,145,146],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":60,"searchDepth":79,"depth":79,"links":148},[149,150,151,153],{"id":29,"depth":73,"text":30},{"id":85,"depth":73,"text":86},{"id":115,"depth":73,"text":152},"What's not idempotent",{"id":134,"depth":73,"text":135},"Safe retries for write requests.","md",{},true,6,"/docs/idempotency","Get Started",{"title":5,"description":154},"docs/idempotency","eeWDJ01zeIN6s__9dk0EfcZtfK_7mFxkCYkr4LftFoQ",1779905486350]