Idempotency Key Reused
idempotency-key-reused · 422
The Idempotency-Key came before with a different request body, so the API neither replayed nor ran anything.
All pages
A stored response replays only for the body it was stored for, and a new operation never runs under an old key. Keys are kept for 24 hours by default.
Besides the members every error carries, this type adds idempotencyKey, endpoint and errors.
- A key was reused for the next operation instead of a new one being made.
- A retry changed the body: a name made fresh, a new timestamp, a field with different content.
- To repeat the first operation, resend its body exactly, with the same key. The stored response comes back with
Idempotency-Replayed: true. - To perform a new operation, make a new key.
- Keep each key with the body it belongs to, so a retry can't pair one with the other.
json
{
"type": "idempotency-key-reused",
"title": "Idempotency Key Reused",
"detail": "The Idempotency-Key '0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401' was already used for a different request. Send a new key for a new operation, or resend the original payload to replay the stored response.",
"idempotencyKey": "0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401",
"endpoint": "POST /v1/projects/:projectId/services",
"errors": [
{
"field": "Idempotency-Key",
"message": "already used with a different request payload",
"value": "0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401"
}
],
"requestId": "req-1785231000000-4f7b2c9ae",
"timestamp": "2026-07-28T09:30:00.000Z",
"path": "/v1/projects/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401/services",
"method": "POST",
"instance": "POST /v1/projects/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401/services",
"status": 422,
"docs": "https://ghaym.me/docs/errors/idempotency-key-reused"
}