DevKits
409

Conflict

4xx Client Error

Last updated:

The request conflicts with the current state of the resource.

Description

Common for concurrent modification: two clients try to update the same resource, and the second update is rejected. Also used for uniqueness violations (e.g. registering an email that already exists).

When to use

Return 409 for optimistic locking failures, duplicate key errors, or state-machine violations.

Specification

RFC 9110 §15.5.10

Examples

HTTP response
HTTP/1.1 409 Conflict
Content-Type: application/json

{"error":"Conflict"}
Node.js (Express)
res.status(409).json({ error: "Conflict" });
Go (net/http)
w.WriteHeader(http.StatusConflict)
Python (Flask)
return jsonify({"error": "Conflict"}), 409

Related status codes

All 4xx codes