Back to All Blogs1 min read2 Sept 2026
Backend Engineering Essentials · Part 1 of 7
REST API Design: Building Endpoints That Stay Understandable
“Practical conventions for resources, status codes, pagination and stable API contracts.”
REST API Design
A good API should feel predictable.
GET /courses
GET /courses/123
POST /courses
PATCH /courses/123
DELETE /courses/123
Status Codes
| Status | Meaning |
|---|---|
| 200 | Successful request |
| 201 | Resource created |
| 204 | Successful with no response body |
| 400 | Invalid request |
| 401 | Not authenticated |
| 403 | Not authorized |
| 404 | Missing resource |
| 409 | Conflict |
| 422 | Validation failure |
| 429 | Rate limited |
Pagination
GET /posts?limit=20&offset=40
or cursor based:
GET /posts?limit=20&after=01JABC...
Error Contract
{
"code": "VALIDATION_FAILED",
"message": "The submitted data is invalid",
"fields": {
"email": "Email is required"
}
}
Note
API consistency is a feature.
Finished this article?
Mark it done to update your series progress.