Idempotency, explained
In HTTP, GET, PUT and DELETE are defined as idempotent; POST is not. APIs make non-idempotent operations such as payments safe to retry with an idempotency key: the client sends a unique key, and the server returns the original result for repeated requests with the same key.
Idempotency also matters for testing: replaying recorded requests safely depends on them not causing duplicate side effects.
Related terms
- Rate limiting: Rate limiting caps how many requests a client can make to an API in a given time window, protecting the service from overload and abuse.
- Webhook: A webhook is an HTTP callback: when an event happens, a provider sends an HTTP request with the event data to a URL the consumer registered.
- REST API: A REST API is an HTTP API organised around resources identified by URLs and manipulated with standard methods such as GET, POST, PUT, PATCH and DELETE.