Path GlobalPrivate APIs are now on Path Global.Open Path Global

Docs

Idempotency

Path-Idempotency-Key on every write that changes a state — the scope, the fingerprint, the answers, and how a caller retries.

LIVE

The rule

A write that carries Path-Idempotency-Key runs once. Sent again with the same key and the same request, it returns the first answer, byte for byte. Sent with the same key and another request, it is refused. Specified in PIP-0022.

  • The key is 1 to 255 characters of printable ASCII. Your own operation identifier works well.
  • The key belongs to the member that signs the request. Two members using the same key never collide.
  • The key requires a member credential. Sent without one, it answers 400 path.core.malformed_request.
  • The operator keeps the answer at least 24 hours.

Same request

Two requests are the same when they have the same method, the same route path, the same API version and the same body in canonical JSON. Key order and whitespace in the body do not count. The mount prefix of the operator (/api/path/v1 or /api/path/genesis/v1 in the reference implementation) does not count.

The answers

You sendYou get
A new keyThe write runs
The same key and the same request, first answer givenThe first answer, with Path-Idempotent-Replay: true
The same key and the same request, first request still running409 path.core.idempotency_in_progress, with Retry-After
The same key and another request409 path.core.idempotency_conflict

A replayed answer is the first answer: a signed object in it keeps its signed_at and its signature.

Every answer below 500 is kept, an error included. A 4xx comes back the same on every replay; to retry after fixing its cause, use a new key. A 5xx is not kept, and the same key can be sent again.

Writes covered

AreaWrites
RequestPOST /requests, /requests/{ref}/revoke, /requests/{ref}/paid
CheckoutPOST /checkout/sessions, /checkout/sessions/{ref}/attempt, /revoke, /complete
InstructionsPOST /instructions, /instructions/{ref}/revoke
SettlementPOST /receipts, /receipts/{ref}/transitions
ConnectPOST /connect/connections, /connections/{ref}/consume, /revoke, /delegations; POST /connect/delegations/{ref}/consume, /revoke
RiskPOST /risk/signals, /risk/signals/{ref}/withdraw, /contest, /decide
PATH IDPOST /subjects, PUT /subjects/{id}/payee-record, POST /subjects/{id}/withdraw; POST /identifiers, /identifiers/{id}/release, /transfer; POST /attestations, /attestations/{ref}/revoke; POST /ownership-bindings, /ownership-bindings/{ref}/revoke
PATH ADDRESSPOST /addresses, /addresses/{id}/rotate, /revoke, /targets, /targets/{targetId}/revoke; PUT /addresses/{id}/standing-intent, /display

The identity and address writes are covered by the amendment of 2026-11-20 to PIP-0022.

POST /instructions for a request needs no credential. To send a key on it, sign the request.

An operator that honours the rule on all of these declares the profile PATH-CORE.Idempotency in its discovery document.

Example

POST /api/path/v1/receipts HTTP/1.1
Path-Version: 2026-10-04.genesis
Path-Idempotency-Key: settle-7f3a91c2
Path-Key-Id: member_2026_01
Path-Timestamp: 2026-11-20T10:00:00.000Z
Path-Signature: 3fa8c1…
Content-Type: application/json

The first call times out on the caller's side. The caller sends the same request, with a fresh Path-Timestamp and signature, and the same key:

HTTP/1.1 201 Created
Path-Idempotent-Replay: true
Content-Type: application/json; charset=utf-8

The body is the receipt issued by the first call. No second receipt exists.

Retrying

for (let attempt = 0; ; attempt++) {
  try {
    return await call(key); // the same key on every attempt
  } catch (err) {
    if (!(err instanceof PathApiError) || attempt >= 5) throw err;
    if (err.code === 'path.core.idempotency_in_progress') {
      await sleep(1000); // the first call has not answered yet
      continue;
    }
    if (!err.retryable) throw err; // 409 conflict and other 4xx: a decision, not a hiccup
    await sleep(backoff(attempt)); // 5xx and rate limits
  }
}

Keep the key with the operation it stands for, so that a restart sends the same one.


On this page