Skip to content
Article Issue #5254

Idempotency

What to know

Idempotency is the property of an operation where performing it multiple times with the same inputs produces the same outcome as performing it once; HTTP GET, PUT, and DELETE are defined as idempotent by specification; Idempotency is especially critical for payment and provisioning APIs where duplicate executions cause real harm

Idempotency, WikiWalls Glossary illustration

« Back to Glossary Index

Idempotency is the property of an operation where performing it multiple times with the same inputs produces the same outcome as performing it once. In API design, idempotent endpoints allow clients to safely retry requests after network failures without fear of duplicate side effects.

How it works

HTTP GET, PUT, and DELETE are defined as idempotent by specification. For non-idempotent POST operations, providers often support an Idempotency-Key header: the client generates a unique key per logical operation, and the server deduplicates requests with the same key, returning a cached response for retries.

Key facts

  • Idempotency-Key header: A client-generated UUID that servers use to deduplicate POST requests within a time window
  • GET, PUT, DELETE: HTTP defines these methods as idempotent; POST is not idempotent by default
  • Deduplication window: Servers typically cache idempotency keys for 24 hours before expiring them

For builders

Idempotency is especially critical for payment and provisioning APIs where duplicate executions cause real harm. Building idempotent APIs and consumers that supply idempotency keys makes retry logic safe to implement aggressively.

Sources

« Back to Definition Index
Administrator · 41 published guides · Joined 2016

Welcome to wikiwalls

The WikiWalls Journal · Free, weekly

One careful fix in your inbox each Wednesday.

No affiliate links inside the diagnosis. No sponsored "top 10". One careful fix per week — unsubscribe in one click.

No tracking pixels · No spam · Edited by a human.