Network failures, timeouts, and retries are unavoidable. Spotzee supports idempotency keys so a retriedDocumentation Index
Fetch the complete documentation index at: https://docs.spotzee.com/llms.txt
Use this file to discover all available pages before exploring further.
POST or PATCH returns the original response instead of running the operation twice.
How it works
Generate a key
Generate a unique key per logical request — typically a UUID, a hash, or your own primary key.
Retry with the same key and body
If the request times out or fails partially, retry with the exact same key and exact same body.
Scope and TTL
- Scope — keys are scoped per API key, so you can reuse the same key string across keys without collision.
- TTL — cached responses live for 24 hours. After that, a request with the same key runs as a brand-new operation.
- Eligible methods —
POSTandPATCH.GET,HEAD, andDELETEare idempotent by definition and ignore the header.
What Spotzee does on replay
| Replay scenario | Outcome |
|---|---|
| Same key, same body | Original response is returned. The Idempotent-Replayed: true response header confirms it’s a replay. |
| Same key, different body | 409 idempotency_key_mismatch — keys are tied to the exact request body. Use a fresh key for distinct requests. |
| Same key, in-flight | 409 idempotency_in_progress with Retry-After. The original request is still running; retry shortly. |
Errors
| HTTP | code | When |
|---|---|---|
400 | idempotency_key_invalid | Empty or longer than 255 characters |
409 | idempotency_key_mismatch | Same key reused with a different body |
409 | idempotency_in_progress | Original request still running — retry after Retry-After |
Generating keys
Any opaque string up to 255 characters works. Pick a generator that suits your platform:When not to reuse a key
Reuse a key for the same logical operation — for example, retrying the same “create contact” request after a timeout. Mint a fresh key when:- The user submits the form a second time after deciding to change a field.
- You’re processing a queue and each message is a distinct operation.
- You’re running a backfill — each row is its own logical request.
Caching rules
2xxresponses are cached.4xxresponses are cached (your retry would have failed the same way).5xxand429responses are not cached so retries can succeed when the platform recovers.
Next steps
Rate limits
Per-key budgets and headers.
Errors
Status codes and the
code catalogue.