Idempotent
Same result whether you do it once or many times.
Definition
An operation is idempotent if doing it once has the same effect as doing it many times. In web APIs, GET, PUT, and DELETE are usually idempotent: calling them again doesn't change the outcome. POST is not idempotent — each request typically creates something new, so retrying can create duplicates. Idempotent operations are safe to retry when a request might have failed or the response was lost.
Example
GET /users/5 returns the same user every time. PUT /users/5 with the same data leaves the user in the same state. So both are idempotent. POST /users to create a user is not — if you retry, you might create a second user.
See it in context Learn how Idempotent fits into the bigger picture of how software actually works.
Read the Guide →