Every quote-creation route accepts an optional idempotencyKeyin the request body. Retrying with the same key and the same payload replays the original Quote instead of creating a duplicate — so a flaky network or a double-clicked submit is always safe.
The key is unique per Environment together with the quote scope. The server stores a hash of the payload alongside the key:
Same key, same payload → the original Quote Intent and Receipt are returned (a replay). No new Quote, no duplicated usage event.
Same key, different payload → 409 with code: "idempotency_conflict". The server refuses to guess which request you meant.
No key → the server generates one (auto_<uuid>). The Quote is still safe from accidental double-submits inside the same request lifecycle, but you cannot replay it yourself — always send your own key for any request you might retry.
Generate one key per logical submission (for example, per checkout attempt).
Send the request. On a timeout or 5xx, retry with the same key and the same payload.
On 2xx, store the Quote ID. Any later retry with the same key returns that same Quote.
On 409 idempotency_conflict, the payload changed under a reused key — treat it as a bug in your key discipline, not as a transient error.
Never reuse a key across edited payloads. If the customer changes an answer, mint a new key for the new submission — otherwise the edit is rejected with 409. Retries reuse keys; edits regenerate them.
The rule of thumb: one key per payload. The @pricing/widget controller implements this discipline for you — it mints a fresh qi_<uuid> key whenever the offering or any factor changes after the last submit, and reuses the pending key only for a genuine retry of an unchanged payload. Mirror the same behavior in custom integrations:
let pendingKey: string | null = null;function onInputEdited() { pendingKey = null; // next submit must use a fresh key}async function submit(payload: QuotePayload) { pendingKey ??= `quote_${crypto.randomUUID()}`; return createQuote({ ...payload, idempotencyKey: pendingKey });}
It does not deduplicate across different keys. Two different keys with identical payloads create two Quotes.
It does not make reads consistent — GET replays nothing; it reads current state (Receipts are immutable, so Quote reads are stable anyway).
It does not replace error handling. A 422 will fail identically on every replay.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Kordless","colors":{"primary":"#1D52DE","light":"#D6DDFF","dark":"#3370FF"},"logo":{"light":"https://mintcdn.com/tidefastlimited/6KBaa1AveovlUYpe/logo/light.svg?fit=max\u0026auto=format\u0026n=6KBaa1AveovlUYpe\u0026q=85\u0026s=e5eb5457436933738fe95e45a0a87b55","dark":"https://mintcdn.com/tidefastlimited/6KBaa1AveovlUYpe/logo/dark.svg?fit=max\u0026auto=format\u0026n=6KBaa1AveovlUYpe\u0026q=85\u0026s=c255cbfe746b32473bbcf9c29d16ecf0"},"favicon":"https://mintcdn.com/tidefastlimited/CYKvU-C0fcBZnksg/favicon.svg?fit=max\u0026auto=format\u0026n=CYKvU-C0fcBZnksg\u0026q=85\u0026s=d5d9e8ccd694ea97b915e9496a287231","appearance":{"default":"light"},"navbar":{"links":[{"href":"https://kordless.ai","label":"Kordless"},{"href":"/changelog","label":"Changelog"},{"href":"https://kordless.ai/form/contact","label":"Support"}],"primary":{"type":"button","label":"Open HQ","href":"https://hq.kordless.ai"}},"footer":{"links":[{"items":[{"label":"Kordless","href":"https://kordless.ai"},{"label":"Product","href":"/product/overview"},{"label":"Developers","href":"/developers/overview"},{"label":"API reference","href":"/api-reference"}]},{"items":[{"label":"Changelog","href":"/changelog"},{"label":"Support","href":"https://kordless.ai/form/contact"},{"label":"Privacy","href":"https://kordless.ai/privacy"},{"label":"Terms","href":"https://kordless.ai/terms"}]}]},"fonts":{"family":"Inter"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tidefastlimited","hasAudioNarration":false,"actualSubdomain":"tidefastlimited","customDomains":["docs.kordless.ai"],"gitSource":{"type":"github","owner":"tidefastlimited","repo":"kordless-ai","deployBranch":"main","contentDirectory":"public-docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a7221895cd7d1d119b1f247","collectionId":"6b6a6185-a13e-4ca8-b6f8-094a9a2f5564","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a7221895cd7d1d119b1f247"},"entitlements":{},"buildId":"6a7221895cd7d1d119b1f247:success","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Product","count":43},{"language":"default","tag":"API reference","count":19},{"language":"default","tag":"Developers","count":10},{"language":"default","tag":"Accounts","count":9},{"language":"default","tag":"Make your Book","count":9},{"language":"default","tag":"Reference","count":8},{"language":"default","tag":"Publish and quote","count":7},{"language":"default","tag":"Webhooks","count":7},{"language":"default","tag":"Start here","count":6},{"language":"default","tag":"Your situation","count":5}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"developers/idempotency","slug":"/developers/idempotency","pageMetadata":{"title":"Idempotency","description":"Safe quote retries with idempotency keys.","href":"/developers/idempotency"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Safe quote retries with idempotency keys.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Every quote-creation route accepts an optional `,_jsx(_components.code,{children:`idempotencyKey`}),` `,_jsx(_components.strong,{children:`in the request body`}),`. Retrying with the same key and the same payload replays the original Quote instead of creating a duplicate — so a flaky network or a double-clicked submit is always safe.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://your-kordless-instance.com/v1/quotes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_test_...\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"businessId\": \"9d2c7f1e-…\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bookId\": \"b3a1…\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"offeringId\": \"ceramic-pro\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"factors\": { \"vehicle_size\": \"large\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotencyKey\": \"order-7392-attempt-1\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The key is unique per Environment together with the quote scope. The server stores a hash of the payload alongside the key:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Same key, same payload`}),` → the original Quote Intent and Receipt are returned (a replay). No new Quote, no duplicated usage event.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Same key, different payload`}),` → `,_jsx(_components.code,{children:`409`}),` with `,_jsx(_components.code,{children:`code: \"idempotency_conflict\"`}),`. The server refuses to guess which request you meant.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No key`}),` → the server generates one (`,_jsx(_components.code,{children:`auto_\u003cuuid>`}),`). The Quote is still safe from accidental double-submits inside the same request lifecycle, but you cannot replay it yourself — always send your own key for any request you might retry.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`key-rules`,children:`Key rules`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Rule`}),_jsx(_components.th,{children:`Detail`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Format`}),_jsx(_components.td,{children:`String, 8–120 characters, trimmed. UUIDs, nanoids, or your own order/session identifiers all work.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Scope`}),_jsx(_components.td,{children:`Unique within an Environment. Test and Live never collide.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Replay window`}),_jsx(_components.td,{children:`Keys persist with the Quote Intent. Replays return the stored Intent and Receipt as long as the records exist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Applies to`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`POST /v1/quotes`}),`, `,_jsx(_components.code,{children:`POST /v1/businesses/{businessId}/quotes`}),`, `,_jsx(_components.code,{children:`POST /v1/public_quotes`}),`. Reads are naturally safe.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`the-retry-pattern`,children:`The retry pattern`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Generate one key per `,_jsx(_components.strong,{children:`logical submission`}),` (for example, per checkout attempt).`]}),`\n`,_jsxs(_components.li,{children:[`Send the request. On a timeout or `,_jsx(_components.code,{children:`5xx`}),`, retry with the `,_jsx(_components.strong,{children:`same`}),` key and the `,_jsx(_components.strong,{children:`same`}),` payload.`]}),`\n`,_jsxs(_components.li,{children:[`On `,_jsx(_components.code,{children:`2xx`}),`, store the Quote ID. Any later retry with the same key returns that same Quote.`]}),`\n`,_jsxs(_components.li,{children:[`On `,_jsx(_components.code,{children:`409 idempotency_conflict`}),`, the payload changed under a reused key — treat it as a bug in your key discipline, not as a transient error.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Never reuse a key across edited payloads. If the customer changes an answer, mint a new key for the new submission — otherwise the edit is rejected with `,_jsx(_components.code,{children:`409`}),`. Retries reuse keys; edits regenerate them.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`edited-submissions`,children:`Edited submissions`}),`\n`,_jsxs(_components.p,{children:[`The rule of thumb: `,_jsx(_components.strong,{children:`one key per payload`}),`. The `,_jsx(_components.code,{children:`@pricing/widget`}),` controller implements this discipline for you — it mints a fresh `,_jsx(_components.code,{children:`qi_\u003cuuid>`}),` key whenever the offering or any factor changes after the last submit, and reuses the pending key only for a genuine retry of an unchanged payload. Mirror the same behavior in custom integrations:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pendingKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` null`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onInputEdited`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pendingKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// next submit must use a fresh key`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` QuotePayload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pendingKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `quote_\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`crypto`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`()`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createQuote`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`idempotencyKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pendingKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`what-idempotency-does-not-do`,children:`What idempotency does not do`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`It does not deduplicate across different keys. Two different keys with identical payloads create two Quotes.`}),`\n`,_jsxs(_components.li,{children:[`It does not make reads consistent — `,_jsx(_components.code,{children:`GET`}),` replays nothing; it reads current state (Receipts are immutable, so Quote reads are stable anyway).`]}),`\n`,_jsxs(_components.li,{children:[`It does not replace error handling. A `,_jsx(_components.code,{children:`422`}),` will fail identically on every replay.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Idempotency","description":"Safe quote retries with idempotency keys.","href":"/developers/idempotency"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Key rules","slug":"key-rules","depth":2,"children":[]},{"title":"The retry pattern","slug":"the-retry-pattern","depth":2,"children":[]},{"title":"Edited submissions","slug":"edited-submissions","depth":2,"children":[]},{"title":"What idempotency does not do","slug":"what-idempotency-does-not-do","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"tidefastlimited","siteName":"Kordless","title":"Idempotency - Kordless","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-04T17:30:07.401Z","originalFileLocation":"developers/idempotency.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Safe quote retries with idempotency keys.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Kordless\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Idempotency - Kordless\">\u003cmeta data-mint-head property=\"og:description\" content=\"Safe quote retries with idempotency keys.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Kordless\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.kordless.ai/developers/idempotency\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tidefastlimited.mintlify.app/_mintlify/api/og/v2?division=Core+concepts\u0026amp;title=Idempotency\u0026amp;description=Safe+quote+retries+with+idempotency+keys.\u0026amp;theme=adc0a29a502f081e78129ff8\u0026amp;signature=72bcddb2a1b1b6b76b39227658d0df9cde54e7f0a9636e667a5da0e3ff820ffb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Idempotency - Kordless\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Safe quote retries with idempotency keys.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tidefastlimited.mintlify.app/_mintlify/api/og/v2?division=Core+concepts\u0026amp;title=Idempotency\u0026amp;description=Safe+quote+retries+with+idempotency+keys.\u0026amp;theme=adc0a29a502f081e78129ff8\u0026amp;signature=72bcddb2a1b1b6b76b39227658d0df9cde54e7f0a9636e667a5da0e3ff820ffb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/tidefastlimited/4i1ut0nvxYkg0i8r/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Kordless\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1D52DE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.kordless.ai/developers/idempotency\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developers/idempotency.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.kordless.ai/#organization\",\"name\":\"Kordless\",\"url\":\"https://docs.kordless.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tidefastlimited/6KBaa1AveovlUYpe/logo/light.svg?fit=max\u0026auto=format\u0026n=6KBaa1AveovlUYpe\u0026q=85\u0026s=e5eb5457436933738fe95e45a0a87b55\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.kordless.ai#website\",\"name\":\"Kordless\",\"url\":\"https://docs.kordless.ai\",\"publisher\":{\"@id\":\"https://docs.kordless.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.kordless.ai/developers/idempotency#webpage\",\"url\":\"https://docs.kordless.ai/developers/idempotency\",\"name\":\"Idempotency\",\"description\":\"Safe quote retries with idempotency keys.\",\"dateModified\":\"2026-08-04T17:30:07.401Z\",\"isPartOf\":{\"@id\":\"https://docs.kordless.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.kordless.ai/developers/idempotency#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.kordless.ai/developers/idempotency#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Core concepts\",\"item\":\"https://docs.kordless.ai/developers/authentication\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Idempotency\",\"item\":\"https://docs.kordless.ai/developers/idempotency\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.kordless.ai/developers/idempotency#article\",\"headline\":\"Idempotency\",\"name\":\"Idempotency\",\"description\":\"Safe quote retries with idempotency keys.\",\"url\":\"https://docs.kordless.ai/developers/idempotency\",\"mainEntityOfPage\":{\"@id\":\"https://docs.kordless.ai/developers/idempotency#webpage\"},\"dateModified\":\"2026-08-04T17:30:07.401Z\",\"publisher\":{\"@id\":\"https://docs.kordless.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.kordless.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Kordless\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Kordless","nav":{"global":null,"tabs":[{"tab":"Product","pages":[{"title":"Product","href":"/product/overview"}]},{"tab":"Accounts","pages":[{"title":"Accounts","href":"/accounts/overview"}]},{"tab":"Developers","groups":[{"group":"Start here","icon":"compass","pages":[{"title":"Developer overview","href":"/developers/overview"},{"title":"Developer quickstart","href":"/developers/quickstart"}]},{"group":"Core concepts","icon":"book-open","pages":[{"title":"Authentication","href":"/developers/authentication"},{"title":"Test and Live","description":"Environment isolation for keys, publications, and quotes.","href":"/developers/test-and-live"},{"title":"Idempotency","href":"/developers/idempotency"},{"title":"Errors","description":"The error envelope and the real error codes.","href":"/developers/errors"}]},{"group":"Distribution","icon":"share-2","pages":[{"title":"Hosted quote path","href":"/developers/hosted-quote-path"},{"title":"Components and embeds","href":"/developers/components-and-embeds"}]},{"group":"Operations","icon":"activity","pages":[{"title":"Webhooks","href":"/developers/webhooks"},{"title":"Request logs","href":"/developers/request-logs"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/quotes/create-a-quote"}]}]},"title":"Idempotency - Kordless","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":[],"chunks":[]}