APIs api backend architecture

What is Idempotency?

Definition

An operation is idempotent if performing it multiple times has the same effect as performing it once. In REST APIs, GET, PUT, and DELETE are idempotent — repeating them does not change the outcome. POST is not idempotent — each call may create a new resource.

Why It Matters

Idempotency is critical for building reliable distributed systems. Network failures cause retries, and idempotent operations are safe to retry without side effects. Payment APIs use idempotency keys to prevent charging a customer twice.

Related Terms