Skip to main content
Network failures, timeouts, and retries are unavoidable. Spotzee supports idempotency keys so a retried POST or PATCH returns the original response instead of running the operation twice.
Idempotency-Key enforcement is live on the Extended API today and rolling out to the Main API. Including the header on Main API requests is forward-compatible: today it has no effect, and once the rollout completes, retries with the same key replay the cached response.

How it works

1

Generate a key

Generate a unique key per logical request, typically a UUID, a hash, or your own primary key.
2

Send it on the first attempt

Add an Idempotency-Key header to your POST or PATCH.
3

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.
4

Receive the cached response

Spotzee replays the original response. Same status, same body, same request_id.

Scope and TTL

  • Scope: keys are scoped per API key, so you can reuse the same key string across keys without collision.
  • Per-surface scope: the Main API and Extended API maintain independent caches. The same Idempotency-Key sent to both surfaces is treated as two distinct requests. Pick a fresh key per surface if you want isolation, or reuse it deliberately knowing each surface will replay independently.
  • TTL: cached responses live for 24 hours. After that, a request with the same key runs as a brand-new operation.
  • Eligible methods: POST and PATCH. GET, HEAD, and DELETE are idempotent by definition and ignore the header.

What Spotzee does on replay

Errors

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 user” 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

  • 2xx responses are cached.
  • 4xx responses are cached (your retry would have failed the same way).
  • 5xx and 429 responses 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.