HTTP 409 Conflict — Resolving Resource State Conflicts
Warning4xx client error
Overview
HTTP 409 Conflict indicates the request conflicts with the current state of the server resource, common in concurrent editing and version control scenarios.
Key Details
- 409 signals that the request cannot be completed due to a conflict with the resource's state
- Common in RESTful APIs when two clients try to modify the same resource simultaneously
- Often used with ETags and If-Match headers for optimistic concurrency control
- The response body should describe the conflict so the client can resolve it
- Different from 412 Precondition Failed which is about conditional request headers
Common Causes
- Two users editing the same document simultaneously (edit conflict)
- Trying to create a resource that already exists (duplicate key)
- Version mismatch — client has stale data and tries to update
- Database unique constraint violation surfaced through the API
- Git-like merge conflict in collaborative editing systems
Steps
- 1Read the response body for details about what conflict occurred
- 2Fetch the latest version of the resource with a fresh GET request
- 3Merge your changes with the current state and retry the request
- 4Use If-Match with ETag headers for optimistic concurrency control
- 5Implement retry logic with exponential backoff for automated systems
Tags
http409conflictconcurrencyrest-api
More in 4xx Client Error
http-400-bad-requestHTTP 400 Bad Request — What It Means & How to Fix It
Errorhttp-401-unauthorizedHTTP 401 Unauthorized — What It Means & How to Fix It
Errorhttp-402-payment-requiredHTTP 402 Payment Required — What It Means & How to Fix It
Errorhttp-403-forbiddenHTTP 403 Forbidden — What It Means & How to Fix It
Errorhttp-404-not-foundHTTP 404 Not Found — What It Means & How to Fix It
Errorhttp-405-method-not-allowedHTTP 405 Method Not Allowed — What It Means & How to Fix It
ErrorFrequently Asked Questions
Use 409 when the request is valid but conflicts with server state. Use 400 when the request itself is malformed.