REST APIs
REST API development
A REST API lets other software, such as your own apps, partners' systems or customers' tools, work with your data over HTTP. Its design matters because it is hard to change once others depend on it. A well-designed API is predictable: resources are named consistently, methods behave as HTTP defines them, errors explain what went wrong, large lists are paged and changes are versioned so existing users are not broken.
This page explains the design decisions behind a REST API that people can rely on.
Illustrative diagram
REST API
- Resources
- Consistent names
- Relationships
- Behaviour
- HTTP methods
- Idempotency
- Responses
- Status codes
- Error bodies
- Lifecycle
- Versioning
- Documentation
Design decisions that matter
| Decision | Good practice |
|---|---|
| Resources | Clear, consistent names such as /orders and /orders/{id} |
| Methods | GET to read, POST to create, PUT or PATCH to update, DELETE to remove |
| Status codes | Use standard HTTP codes so clients can react correctly |
| Errors | Consistent error bodies explaining what to fix |
| Pagination | Large lists returned in pages with a clear way to continue |
| Versioning | Breaking changes released as a new version, with notice |
Following HTTP semantics
Clients and tools assume HTTP methods behave as RFC 9110 defines them. GET should only read; PUT and DELETE should be idempotent, meaning repeating the same request has the same effect as sending it once; POST is not idempotent, so repeating it may create another record. Respecting these rules lets clients retry safely after network failures. For operations created with POST, such as payments or orders, offering an idempotency key lets clients retry without creating duplicates.
Unexpected behaviour, such as a GET that changes data, causes subtle bugs for every consumer.
Errors consumers can act on
Status
- 4xx for problems with the request
- 5xx for problems on the server
- 429 when rate limits are exceeded
Body
- Machine-readable error code
- Human-readable message
- Which field was wrong and why
Consistency
- Same error format everywhere
- No internal details or stack traces exposed
- Documented error codes
Design and document first
Describing the API before building it, in a format such as the OpenAPI Specification, which defines a standard, language-agnostic way to describe HTTP APIs, lets future consumers review it early, generates documentation and test tools, and gives developers a contract to build against. Changes at the design stage cost little; changes after partners have built on the API are disruptive. Involve at least one real consumer, such as your mobile developers or a key partner, in reviewing the draft.
Keep the description updated as the API evolves, so documentation never drifts from reality.
Paging large lists
Endpoints that return lists should return them in pages, with a clear way to fetch the next page and sensible maximum page sizes. Cursor-based pagination copes better than page numbers when records are added during paging. Offering filters such as 'changed since' lets consumers sync efficiently instead of rereading everything, which also reduces load on your systems.
Versioning without breaking people
Additive changes, such as new optional fields, rarely break consumers. Removing fields, renaming them or changing behaviour does. Release breaking changes as a new version, run old and new side by side for a published period and tell consumers well in advance. A clear deprecation policy is a promise that lets others depend on your API with confidence.
Security from the start
Authentication, authorisation on every object, rate limits and input validation must be designed in. The REST API development services page covers security testing against the OWASP API Security Top 10.
Designing for your consumers
Different consumers need different things. Your own mobile app wants compact responses tuned to its screens; a partner's system wants complete records and reliable change feeds; a customer's developer wants clear examples and a sandbox. Talk to representative consumers about the tasks they will perform, and design endpoints around those tasks rather than mirroring your internal database tables. An API that exposes internal structure directly is hard to change later and confusing to use.
Consistent naming across endpoints makes the whole API easier to learn.
Performance and limits
Set rate limits to protect your systems and return 429 responses with guidance when they are exceeded. Keep responses reasonably sized, support filtering so consumers request only what they need, and monitor slow endpoints. Publishing your limits lets consumers design their integrations to stay within them.
Questions about REST API development
What is a REST API?
An interface that lets other software work with your data over HTTP using resources and standard methods.
What does idempotent mean?
Repeating the request has the same effect as sending it once; RFC 9110 defines PUT, DELETE and safe methods this way.
How should errors be returned?
With the right status code and a consistent body explaining what to fix.
Why version an API?
So breaking changes do not stop existing consumers' integrations working.
What is OpenAPI?
A standard, language-agnostic way to describe HTTP APIs, used for documentation and tooling.
Should the API be designed before it is built?
Yes; agreeing the design first is much cheaper than changing it later.
Sources referenced
Platform features, guidance and rules change. We check the current versions before committing to an approach. This page is general information, not legal advice.
- IETF: RFC 9110: HTTP Semantics (opens in a new tab) — reviewed 2026-10-23
- IETF: RFC 6585: Additional HTTP Status Codes (opens in a new tab) — reviewed 2026-10-23
- OpenAPI Initiative: OpenAPI Specification (opens in a new tab) — reviewed 2026-10-23
Request a Custom Quote
Ask about REST API development
Thank you — your enquiry has been sent.
We have received your message and will reply by email. If you need to add anything, email info@letgetgrow.com.