GuideError · HTTP status codes
REST API status codes
Choose the right HTTP status code for each API outcome: 200, 201, 204, 400 vs 422, 401 vs 403, 404, 409, 429 and 5xx, with the headers each code needs.
- 5 min
- read
- 5
- sources
- Oct 24, 2026
- updated
- Scaplet Editorial Team
- author
In one lineReturn the status code that says what happened, and put the detail in the body. Use 200 for a successful read, 201 with a Location header for a create, 204 when there's nothing to return, 400 or 422 for bad input, 401 or 403 for access problems, 404 for a missing resource, 409 for a state conflict, 429 for rate limits and 5xx for server faults.