Skip to content

Idempotency-Key reused

HTTP 422idempotency_key_reused

When the API answers 422 idempotency_key_reused, and how to fix it.

Version v1.1, updated

The type field of every idempotency_key_reused response links to this page.

On this page

The idempotency key was already used on this operation for a different request. A key belongs to one request: one body, on one record.

At a glance

  • Status: 422 Unprocessable Content

  • Code: idempotency_key_reused

  • Retry: No. Fix the cause first: the same request gets the same answer.

Causes and fixes

Likely cause

How to fix it

Your code reuses a fixed key, or a counter that started again.

Create a new key for every new request.

A retry changed the body, for example with a new time in a field.

Send a retry exactly as the first attempt, or give the changed request a new key.

Example

422 idempotency_key_reusedJSON
{
  "code": "idempotency_key_reused",
  "detail": "This Idempotency-Key was already used for a different request on this route.",
  "instance": "/v1/categories",
  "request_id": "a1b2c3d4-0000-4000-8000-0000000000ee",
  "status": 422,
  "title": "Idempotency-Key reused",
  "type": "https://birp.io/developers/errors/idempotency_key_reused"
}
  • idempotency
  • idempotency-key-missing
  • handling-errors