Idempotency-Key header. Sending the same key on a repeated request replays the original response instead of executing the operation again — making it safe to retry network errors and timeouts without worrying about duplicate creates or double-charges.
Which requests support idempotency
Idempotency keys are accepted on all mutating methods:POSTPATCHPUT
GET and DELETE requests are inherently idempotent and ignore the header.
How it works
- You attach an
Idempotency-Keyheader with a unique value to a mutating request. - The server processes the request normally and caches the response (for 2xx responses only) keyed by
(Idempotency-Key, request path). - If you send a second request with the same key and path, the server returns the cached response immediately — the handler is never called again.
- The replay response includes an
Idempotency-Replayed: trueheader so you can distinguish a fresh response from a cached one.
Only successful (2xx) responses are cached. If the original request returned a 4xx or 5xx, the next request with the same key will be executed again.
The Idempotency-Key header
Cache lifetime
Idempotency responses are cached for 24 hours. After that window, a request with the same key will be processed as a new request. When Redis is configured (REDIS_URL), the cache is shared across all API replicas. Without Redis, the cache is in-process — a request hitting a different replica will be treated as new. For production deployments with multiple API instances, configure Redis to ensure consistent idempotency guarantees.
Example: safely creating an issue
Generate a unique key before the request, then reuse it on retries:Response headers
| Header | When present | Description |
|---|---|---|
Idempotency-Replayed | On replayed responses only | Always true. Signals the response came from cache. |
Key scoping
The cache key is(Idempotency-Key value, request path). This means:
POST /v1/issueswith keyabc-123andPOST /v1/patternswith keyabc-123are separate cache entries.- The same key reused across different paths does not cause cross-resource collisions.