Make routes describe resources

Use nouns for resources and HTTP methods for actions. A consistent URL pattern helps new developers guess how to read, create, update, or remove a record.

Keep naming and response shapes consistent across related endpoints.

Return useful errors

Use an appropriate status code and a small, stable error format. Tell clients what failed and what they can change without exposing stack traces or secrets.

Validate incoming data at the boundary so the rest of the application can rely on predictable inputs.

Plan for real collections

Paginate lists before they grow large. Document filtering and sorting rules, and set sensible limits so a request cannot return an unbounded response.

Version only when a breaking change needs it, and write examples for the requests and responses people use most.