- Class
- 4xx client error
- Defined in
- RFC 9110, section 15.5.10
- Retry
- After re-reading state
- Fix
- Resolve the clash
- Cacheable by default
- No
When your API should return 409
Return 409 when two things can’t both be true, like creating a user with an email that’s taken, merging a pull request that has already been merged, or cancelling an order that has shipped. Describe the clash in the body, and link to the resource that caused it when you can.
For lost updates, where two clients edit the same record, conditional requests with If-Match are the precise tool and return 412. If the data is valid in shape and breaks a rule that doesn’t depend on other state, many APIs use 422.
How public APIs declare 409 in their OpenAPI specs
Five of the eleven public specs we score declare a 409, as they were on 4 December 2026. GitHub does on 94 operations, OpenAI on 69 and Box on 33.
Asana and Twilio declare it once each, and the rest leave it to a default response or to the prose.
| API | Operations | Declare 409 | How errors are described |
|---|---|---|---|
| GitHub | 1,288 | 94 | Per status code |
| OpenAI | 406 | 69 | Per status code |
| Box | 297 | 33 | Per status code, plus a default |
| Asana | 302 | 1 | Per status code |
| Twilio | 197 | 1 | No error responses |
| Stripe | 612 | 0 | One default error response |
| Plaid | 351 | 0 | One default error response |
| Slack | 174 | 0 | One default error response |
| Adyen Checkout | 28 | 0 | Per status code |
| Swagger Petstore | 19 | 0 | Per status code, plus a default |
| SendGrid Mail | 3 | 0 | Per status code |
Counted per operation from each vendor’s public OpenAPI document on 4 December 2026.
Declare 409 in your OpenAPI spec
Declare 409 on the operations where a clash can happen, and say what clashes in the description.
paths:
/users:
post:
operationId: createUser
responses:
"201":
$ref: "#/components/responses/UserCreated"
"409":
$ref: "#/components/responses/EmailTaken"
components:
responses:
EmailTaken:
description: A user with this email already exists.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"What an Octri SDK does with a 409
An Octri SDK doesn’t retry a 409, since the clash is still there. The caller gets an SdkConflictError in TypeScript, Python, Java, Kotlin, PHP and Ruby.
A POST retried after a dropped connection carries the same Idempotency-Key, which the SDK sends on every POST and PATCH by default. That lets your API recognise the retry and return the first result, so a create that worked doesn’t come back as a 409 for a duplicate.
import { Acme, SdkConflictError } from "acme-sdk";
const acme = new Acme({ apiKey: process.env.ACME_API_KEY });
try {
await acme.users.create({ email: "ada@example.com" });
} catch (err) {
if (err instanceof SdkConflictError) {
// The email is taken. Fetch that user and carry on.
}
throw err;
}More on retries and typed errors in SDK error handling.
HTTP 409 questions
Is 409 right for a duplicate email at sign-up?
Yes. On a public sign-up form, though, it confirms that the email has an account, so some services return a success and send a message to the address.
Should a 409 include the current state?
Yes, when it’s cheap. Sending the resource as it is now saves the client a GET before it decides what to do.
Does reusing an idempotency key cause a 409?
Partly. Stripe returns a 409 when a request with the same key is still in progress, and returns the stored result once the first one has finished.