Skip to content
AgileLogics
4 min read

API Design

Prerequisites: Working with APIs and HTTP requests

Designing a web API (rather than just consuming one) means deciding on consistent URL patterns, HTTP status codes, and response shapes:

GET    /users        -> list users
POST   /users        -> create a user
GET    /users/42     -> get one user
PATCH  /users/42     -> update a user
DELETE /users/42     -> delete a user

Returning consistent, predictable status codes (200 success, 201 created, 400 bad request, 404 not found, 500 server error) lets every client handle errors the same way, without inspecting the response body just to know if something failed.