409 Conflict

The request conflicts with the resource's current state.

4xx · Client error

What it means

The request conflicts with the current state of the resource. The user may be able to resolve the conflict and try again, so the body should explain it.

Why you're seeing it

  • Creating something that already exists, such as a duplicate username.
  • Two people editing the same record at once.
  • Deleting something that other records still depend on.

How to fix it

  • Explain the conflict in the response body, and what would resolve it.
  • For simultaneous edits, use ETag with If-Match; the server can then answer 412.

Example response

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

{"error": "email_taken", "field": "email"}