Idempotency-Key request header:
POST /v1/sandbox— create a sandbox.POST /v1/sandbox/{sandbox_id}/previews— create a preview.
string
Optional. Maximum length 255 characters.
What it does — and doesn’t do
Per the API contract, an absentIdempotency-Key means the server generates one on your behalf — and a server-generated key provides no deduplication. Only a client-supplied key actually dedupes retries.
How to use it
Generate a unique key (a UUID works well) per logical create attempt, and send the same key again on retries of that same attempt:Idempotency-Key value on the retry rather than generating a new one. A new key on retry is indistinguishable from a genuinely new create request.
Idempotency-Key is only accepted on the two create endpoints listed above. Other operations, including delete and resume, don’t take this header — resume in particular already returns already_running: true as a no-op signal instead of needing idempotency-key support.