A REST API exposes resources at URLs and lets clients act on them with standard HTTP methods. Roy Fielding described the style in his 2000 doctoral dissertation, and almost every public web API since has borrowed from it, usually with some of the rules bent. Most of them return JSON. Whether a given API is “really” RESTful matters less than whether its URLs, methods and status codes behave the way a client expects.
Name resources, not actions
A good URL is a noun: /orders/1042, /customers/77/invoices. The HTTP method supplies the verb, so there is no /getOrder or /deleteCustomer.

Nesting is where people overdo it. I’d skip anything deeper than two levels (/customers/77/invoices is fine, /customers/77/invoices/9/lines/3/notes is not), because the client ends up building URLs by hand and the server ends up validating four ids per request.
Stateless means every request carries its own context
The server keeps no session between calls. Each request brings its credentials and everything else needed to answer it, which is why any server in a pool can handle any request and why scaling out is simple.
It costs something, though: the token travels on every call.
Status codes
| Code | Use it for |
| 200 / 201 / 204 | Success, created, success with nothing to return |
| 400 | The request is malformed or fails validation |
| 401 / 403 | Not authenticated / authenticated but not allowed |
| 404 / 409 | Resource missing / conflicts with current state |
| 429 | Too many requests, try later |
The most irritating habit in real APIs is a 200 response with an error message in the body. Client code then has to inspect the body of every “successful” call.
Methods and what happens on a retry
Networks fail halfway through calls, so clients retry, and the method decides whether a retry is harmless. GET never changes anything. PUT and DELETE are idempotent, which means sending them twice leaves the server in the same state as sending them once.

POST is neither safe nor idempotent, so a retried “create order” call can create two orders. That is the reason payment APIs accept an idempotency key on POST requests: the client generates a unique value, sends it in a header, and the server returns the stored result if it sees the same key again. The method definitions are in RFC 9110.
PATCH sits in an awkward spot. It sends only the changed fields, which keeps requests small, but a patch like “add 1 to the quantity” is not idempotent and one like “set quantity to 5” is, so the answer depends on how the server interprets the body. PUT is blunter and more predictable. If clients are written by other teams, PUT with the full object causes fewer surprises, and if payloads are large, PATCH saves real bandwidth. Pick one rule and document it.
Security
Authentication is the easy part to get right.
The part that fails in practice is authorization, and the OWASP API Security Top 10 (2023 edition) puts broken object level authorization at number one: a user changes the id in the URL and reads someone else’s record.
- Check ownership of the specific object on every request, not just that the user is logged in.
- Terminate TLS everywhere and keep tokens out of URLs.
- Rate limit per client and answer with 429 once the limit is hit.
Growing past the first version
Return lists in pages from the start, because adding pagination later breaks every existing client.
Version the API in the URL or a header before the first breaking change, not after. And cache GET responses where the data allows it, since that is the cheapest scaling you will ever do. Nobody thanks you for it, and that is fine.
Bringing in outside help
If the team has no one who has built an API before, a development company can cover the work. Devcom’s API development services list custom API design and development, integration with third-party platforms, testing and quality assurance, and documentation and support. Those are the company’s own descriptions, so ask for sample documentation and a test plan before signing. More on the company is at devcom.com.
- How to Redo in VS Code (Shortcuts and Fixes) - December 5, 2026
- Scaling Customer Support Without Losing Quality: A Practical Guide for Growing Companies - December 5, 2026
- Top MySQL CDC Tools for Streaming Changes to a Data Warehouse - December 4, 2026



