HTTP 409 Conflict
HTTP 409 Conflict means the request conflicts with the current state of the resource. Typical examples are creating a user whose email already exists…
Quick answer
HTTP 409 Conflict means the request conflicts with the current state of the resource. Typical examples are creating a user whose email already exists, editing a record someone else changed first, or a Git-style version mismatch. The client must resolve the conflict and retry.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 409 Conflict mean?
APIs use 409 for uniqueness violations and optimistic-concurrency failures. When the client sent a version precondition (If-Match) that failed, 412 is the more precise code.
| Status code | 409 |
|---|---|
| Name | Conflict |
| Class | 4xx Client Error |
| Defined in | RFC 9110 §15.5.10 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | No: change the request first |
What causes HTTP 409?
- A unique field (email, username, slug) already exists.
- Concurrent edits: the resource changed after the client read it.
- Invalid state transition (cancelling an already shipped order).
How do I fix HTTP 409?
- Return details about the conflicting field or current version.
- Use ETags with If-Match for safe concurrent updates.
What should a client do after HTTP 409?
Fetch the latest state, merge or change the data, then retry.
Does HTTP 409 affect SEO?
No SEO impact; used by APIs and forms.
Example 409 response
HTTP/1.1 409 Conflict
Date: Mon, 01 Dec 2026 12:00:00 GMT
Content-Type: application/json
{"error":{"status":409,"message":"Conflict"}} How to return 409 Conflict in code
Express (Node.js)
res.status(409).json({ error: 'Conflict' }); Next.js route handler
return Response.json({ error: 'Conflict' }, { status: 409 }); FastAPI (Python)
raise HTTPException(status_code=409, detail="Conflict") PHP
http_response_code(409); Nginx
location = /example {
return 409;
} Other 4xx status codes
The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
Frequently asked questions
409 vs 422 for a duplicate email?
409 vs 412?
Is 409 a client or server error?
Related
- 412 Precondition Failed HTTP 412 Precondition Failed means a condition the client set in a request header, such as If-Match or If-Unmo.
- 422 Unprocessable Content HTTP 422 Unprocessable Content (formerly Unprocessable Entity) means the server understood the request and its.
- 400 Bad Request HTTP 400 Bad Request means the server cannot process the request because of a client error, such as malformed .
- 201 Created HTTP 201 Created means the request succeeded and a new resource was created as a result.
- Open the HTTP Status Codes Reference → Free, no signup.