What Are API Design Principles?
API design principles are the architectural and naming conventions that determine whether an Application Programming Interface remains intuitive, stable, and evolvable as it is adopted by developers and modified over time.
Every decision built into an API contract either builds up to a system developers trust or one they resent and stop using, as an API is a formal contract between software systems that specifies what requests are accepted, what responses come back and what guarantees the producer gives to the consumer.
Resource modeling, versioning strategy, error communication, authentication and consistency are among the principles that govern good API design. They all come together to decide whether an API becomes a durable platform or an expensive liability that needs constant migration.
Think back to when Twitter opened its API to third-party developers in 2006. In the years that followed, an entire application ecosystem appeared. Twitterrific, TweetDeck, HootSuite and dozens more clients came out that took the platform far beyond what Twitter's engineers alone could have built.
As a force multiplier, the API turned what was a simple microblogging service into the backbone of a communication infrastructure.
Then think back to what happened in 2012 when Twitter cut that same API off and again in 2023 under new owners, thousands of apps broke overnight and developers who had put years into the platform lost what they had built.
Poor design choices along with unstable contracts had turned the API that used to be an asset into a liability. Millions were wasted on developer investment in the economy and the once-vibrant ecosystem collapsed as a result of the economic fallout that could be measured.
Both the power of a well-designed interface as well as the terrible price of getting it wrong appear in Twitter's API story.
Software systems use an Application Programming Interface (API) as a formal contract between them. That means a specification of what requests get accepted, what responses come back and what guarantees the producer gives to the consumer.
Each decision built into that contract, for naming conventions, versioning strategies, error formats, authentication mechanisms as well as others, goes on to make a system that developers love or one they resent and stop using.
This article examines the principles that determine which outcome you get.
Resource-Oriented Design: The Noun-Verb Distinction
The architectural style that dominates modern web API design is REST (Representational State Transfer), articulated by Roy Fielding in his 2000 doctoral dissertation at the University of California, Irvine.[1]
Deceptively simple was Fielding's insight. Build APIs around resources as things instead of operations as actions and use HTTP's existing verb set to say what you want to do with those things.
The practical implication: your URLs should identify resources, not actions.
A common anti-pattern treats URLs as remote procedure calls:
GET /getUser?id=123
POST /createUser
POST /updateUserEmail
GET /deleteUser?id=123The RESTful equivalent treats URLs as addresses and HTTP methods as the vocabulary:[8]
GET /users/123 (retrieve user 123)
POST /users (create a new user)
PATCH /users/123 (update specific fields of user 123)
DELETE /users/123 (remove user 123)The resource-oriented approach carries three distinct advantages.
First, predictability: once a developer understands that your API uses resources, they can construct URLs correctly for entities they have not seen before. If GET /users/123 retrieves a user, they can reasonably guess that GET /orders/456 retrieves an order.
Next comes HTTP semantics alignment. Caches, proxies, load balancers and monitoring tools all see GET requests as safe (non-mutating) and idempotent. They can pre-fetch, cache and safely retry GETs in ways that are not possible for custom action verbs.
Next comes discoverability. The URL structure reflects the data model, which makes the API self-documenting at its structural level.
HTTP Methods as a Semantic Vocabulary
HTTP defines methods with particular semantics that mean something all the way through the whole web stack:
| Method | Semantic | Idempotent | Safe |
|---|---|---|---|
| GET | Retrieve a resource | Yes | Yes |
| POST | Create a new resource (or trigger an action) | No | No |
| PUT | Replace an entire resource completely | Yes | No |
| PATCH | Update specific fields of a resource | Yes* | No |
| DELETE | Remove a resource | Yes | No |
Idempotent means calling the operation multiple times gives the same result as calling it once. Retry logic depends on that a great deal. When a client sends a DELETE request and gets no reply (network timeout), the client can retry safely because deleting a resource that has already been deleted brings about the same final state.
When a client sends a POST to create a user and the response gets lost, blindly retrying will create duplicate users. Idempotency keys or some other mechanism are needed for safe retry on non-idempotent operations.
Safe is the term for an operation that does not change server state. Caches can give out cached GET responses automatically. Monitoring tools can send GET requests to health-check endpoints with no side effects.
Hierarchical URL Design for Relationships
Nested URLs express containment relationships between resources:[10]
GET /users/123/orders (all orders belonging to user 123)
GET /users/123/orders/456 (specific order 456 of user 123)
POST /users/123/orders (create a new order for user 123)
DELETE /users/123/orders/456 (cancel order 456 of user 123)The practical rule: limit nesting to two or three levels maximum.[9]
When nesting gets too large, flatten deeply nested URLs such as /departments/5/teams/12/projects/88/tasks/234/comments/7. That design treats too many things as hierarchically necessary when direct access would work and /comments/7 is usually a cleaner choice than the deep path shown.
The Discipline of Consistency
Consistency is the culture that makes resource orientation livable as the architecture of good API design. Every endpoint forces developers to relearn conventions under an inconsistent API. Does this one use snake_case or camelCase and is the date format ISO 8601 or Unix timestamp?
Does this list endpoint paginate with page/per_page or offset/limit? Every inconsistency adds cognitive load that builds up through an entire integration project.
Naming Conventions
Choose conventions and apply them without exception:
- Plural nouns for collections:
/usersnot/user. Plural is standard because collections contain multiple items, and it removes the ambiguity of whether a singular endpoint returns one item or a collection.[6] - Consistent casing: Use either kebab-case (
/order-items) or snake_case (/order_items) throughout.[5] Avoid camelCase in URLs (case sensitivity in URLs is a source of bugs). - Lowercase only. URLs are technically case-sensitive. That means
/Usersand/usersare different paths so enforce lowercase across the board. - No file extensions:
/users, not/users.json. Use theAcceptheader and content negotiation for format selection. - Consistent trailing slash policy: Either always include trailing slashes or never include them. Redirect the opposite to the canonical form with a 301.
Response Structure
Every response should follow the same envelope format, whether successful or failed:[11]
{
"data": {
"id": "usr_abc123",
"email": "developer@example.com",
"created_at": "2026-01-15T10:30:00Z"
},
"meta": {
"request_id": "req_xyz789",
"timestamp": "2026-03-15T14:22:00Z"
}
}For list responses:
{
"data": [...],
"pagination": {
"total": 1250,
"page": 2,
"per_page": 20,
"total_pages": 63,
"next": "/users?page=3&per_page=20",
"prev": "/users?page=1&per_page=20"
},
"meta": {
"request_id": "req_abc456"
}
}Example: Twilio wraps every API response, success or error, in a consistent envelope.[7]
After integrating their first Twilio endpoint, developers find that parsing any subsequent response follows the same pattern. Integration takes much less time than with APIs that send each endpoint responses of different shapes.
Field Naming
Pick one convention for JSON field names and enforce it everywhere. The dominant conventions are:
- snake_case (
created_at,user_id): Standard in Python ecosystems, PostgreSQL, most RESTful APIs - camelCase (
createdAt,userId): Natural in JavaScript contexts - PascalCase (
CreatedAt,UserId). This is unusual for field names but can be found now and then in older JSON APIs.
Whatever you choose, a created_at field should never appear as createdAt or CreatedAt on a different endpoint of the same API.
Error Handling: The Quality Test
How much the designers thought about the people who will use it shows through in the quality of an API's error messages. Error messages that are excellent teach and those that are poor frustrate. The cost of this asymmetry is high. Developers spend as much time in error states as in success states and often more.
HTTP Status Codes: Use Them Correctly
Status codes are a vocabulary that every HTTP client understands. Using them correctly means clients can handle errors generically without reading the response body:
- 200 OK: Request succeeded, response body contains requested data
- 201 Created: Resource created successfully (typically follows POST). Include a
Locationheader pointing to the new resource. - 204 No Content: Success but no response body (DELETE, some PUTs)
- 400 Bad Request: Client sent a malformed or invalid request
- 401 Unauthorized: Authentication is required or the credentials provided are invalid
- 403 Forbidden: Authenticated but not authorized to perform this operation
- 404 Not Found: The resource does not exist (or does not exist for this requester)
- 409 Conflict: The request conflicts with the current state (duplicate creation, version mismatch)
- 422 Unprocessable Entity: Request is syntactically correct but semantically invalid (validation failures)
- 429 Too Many Requests: Rate limit exceeded; include
Retry-Afterheader - 500 Internal Server Error: Server-side failure (never expose implementation details)
- 503 Service Unavailable: The service is temporarily down; include
Retry-Afterif known
One big mistake is returning 200 OK with an error payload. That makes clients have to parse the response body always to tell success from failure and that defeats what status codes were meant to do.
Actionable Error Responses
Every error response should tell the developer what went wrong, which specific inputs caused the problem, and where to learn more:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.
See details for specific issues.",
"details": [
{
"field": "email",
"issue": "Value 'notanemail' is not a valid email address",
"provided": "notanemail"
},
{
"field": "age",
"issue": "Age must be a positive integer between 1 and 150, received -5",
"provided": -5
}
],
"request_id": "req_def456",
"docs_url": "https://api.example.com/docs/errors#VALIDATION_ERROR"
}
}Compare this to: {"error": "Invalid input"}.
Developers get told precisely what to fix from the first response. From the second they have to guess and hours, not minutes, measure the difference in debugging time.
Example: Stripe's error format has been widely cited as the gold standard. Each error includes a type (card_error, api_error, invalid_request_error), a human-readable message, a machine-readable code string, and a doc_url linking to documentation specific to that error.
Dozens of payment and infrastructure APIs have copied this design on purpose. It is that effective at reducing the burden on developers.
Error Codes as a Contract
Machine-readable error codes (VALIDATION_ERROR, RESOURCE_NOT_FOUND, RATE_LIMIT_EXCEEDED) allow clients to handle specific error conditions programmatically, even when the human-readable message changes.
When a client has to deal with rate limits specially by backing off and retrying, it looks out for RATE_LIMIT_EXCEEDED. It does not look for an English message string that could change from one API version to the next.
| API Design Element | Good Practice | Common Anti-Pattern |
|---|---|---|
| URL structure | Noun-based resources (/users/123) | Verb-based actions (/getUser?id=123) |
| HTTP methods | Use GET/POST/PUT/PATCH/DELETE semantically | Use POST for all operations |
| Error responses | Structured error object with code and message | Return 200 with error in body |
| Versioning | /v1/ URL prefix or Accept header | No versioning until breakage occurs |
| Pagination | Cursor-based or offset with metadata | Return all results without limits |
| Authentication | OAuth 2.0 or API keys with scopes | Username/password in every request |
Versioning: The Evolution Contract
Evolution happens to all APIs. Product requirements change. Data models grow more mature and security vulnerabilities call for new approaches. API versioning is what lets evolution continue without breaking integrations already in place.
What Constitutes a Breaking Change
Understanding which changes are breaking is prerequisite to versioning strategy. Breaking changes require a version bump:
- Removing a field from a response
- Renaming a field (even if a redirect is provided)
- Changing a field's data type (string to integer, array to object)
- Making a previously optional request field required
- Adding required validation to a previously unvalidated field
- Removing an endpoint
- Changing URL structure
Non-breaking changes do not require a new version:
- Adding new optional fields to responses
- Adding new endpoints
- Adding new optional query parameters
- Adding new values to an enumeration that clients should treat as unknown
- Relaxing validation rules (accepting more values than before)
- Adding new optional request fields
Versioning Strategies
URL path versioning (/api/v1/users, /api/v2/users) is the most common method and the one developers find easiest to work with. The version appears right away, tests easily in a browser and leaves no ambiguity. Caching systems work with it too. As versions add up, the main drawback is that URLs multiply.
Header versioning (Accept: application/vnd.yourapi.v2+json) keeps URLs clean but makes versioning invisible without inspecting headers. Harder to test in a browser, less cache-friendly, and often surprising to developers who expect versions to be visible.
Query parameter versioning (/api/users?version=2) is the least preferred approach, it clutters query strings and creates caching ambiguity (is this the same resource as without the parameter?).
Most APIs call for a good rule that uses URL path versioning (/v1/, /v2/). At least two major versions should be kept going at once, there has to be 12 months notice before retiring a version and deprecation must be signaled in both docs and response headers.
Deprecation Protocol
When a version or endpoint is approaching retirement:
- Announce 6-12 months in advance through email, documentation banners, and changelog entries
- Add deprecation headers to responses:
Deprecation: Sat, 31 Dec 2027 23:59:59 GMTandSunset: Sat, 31 Dec 2028 23:59:59 GMT - Log usage of deprecated endpoints to identify remaining consumers
- Publish migration guides with concrete before/after code examples
- Reach out directly to high-volume users of deprecated endpoints
- Monitor continuously after transition to catch stragglers
Developers put real time and money into building on your API and that is why respect for their investment is at the heart of deprecation. Give developers enough transition time and you protect their investment and keep trust.
As functionality evolves, stable API contracts have to be maintained and that requires the same disciplined approach used to manage technical debt in codebases. Managing both means handling what has built up while still being able to move forward.
Authentication and Authorization Architecture
Authentication Mechanisms
API keys are the simplest authentication mechanism: a long, random string passed in a request header that identifies a specific client application. They are appropriate for server-to-server communication where a specific application needs to be identified.
X-API-Key: sk_live_1234567890abcdefBest practices for API keys:
- Use long, cryptographically random values (32+ characters)
- Differentiate test and production keys by prefix (
sk_test_vssk_live_) - Never log API keys in application logs
- Support key rotation without service interruption
- Allow scoped keys with limited permissions
OAuth 2.0. This is the standard for user-delegated authorization. Without giving out their credentials, a user lets a third-party application access their data. The flow generates short-lived access tokens along with longer-lived refresh tokens.
Any situation where users grant third-party access to their accounts calls for OAuth 2.0.
JSON Web Tokens (JWT) are stateless tokens holding claims that can be checked without any database queries. Services in microservices architectures that need to trust identity details without calling authentication can use JWTs. These tokens should have short lifetimes of 15 to 60 minutes and come with refresh token systems.
Security Fundamentals
HTTPS everywhere, always. Do not accept API requests over unencrypted HTTP ever. Without TLS encryption there is no legitimate reason to transmit API credentials or data.
Rate limiting protects your API from abuse that is accidental or intentional. Put limits on each API key and not on each IP address because IP addresses are shared by NAT and VPNs and give errors that mean something and show how to retry:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit of 1000 requests per hour exceeded",
"retry_after": 1847
}
}Include rate limit information in response headers on every successful request: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 47, X-RateLimit-Reset: 1741827600.
This lets clients implement proactive rate limit management rather than reacting to 429 errors.
Input validation is a security issue as well as a quality one. Every input must be validated against explicit allowlists. Use parameterization in all database queries to guard against SQL injection. Check file types and sizes for any file upload and do not accept unexpected fields instead of letting them slip by.
Principle of least privilege. Tokens should give only the permissions needed for what they do. Reading user profiles calls for a token that does not have permission to delete accounts and scope systems let clients ask for only the permissions their operation requires.
When they grasp the principles of authentication versus authorization, API designers can put in place security layers that are both secure and easy for developers.
Pagination, Filtering, and Data Shaping
Pagination Approaches
Offset-based pagination is the simplest approach:
GET /posts?limit=20&offset=40Starting from the 41st, this brings in 20 posts. Offset-based pagination is simple but it has a major flaw. Items get skipped or duplicated if something is inserted or deleted between page fetches. When a user goes through pages one after another, that gives the user a confusing experience.
Cursor-based pagination. It uses an opaque cursor that encodes the position in the dataset to solve this.
GET /posts?limit=20&after=eyJpZCI6MTAwfQMost often the cursor is a base64-encoded value that points to the last item viewed. It points to a particular item instead of a position and that is why insertions and deletions anywhere else in the dataset do not make any items get skipped.
This is the preferred approach for any dataset that changes while users are paginating through it.
Keyset pagination is a variant that uses visible fields as the cursor:
GET /posts?limit=20&created_before=2026-01-15T10:30:00Z&id_before=10045Careful index design is needed on the database side but the result is stable, human-readable pagination parameters that come out of this.
Filtering and Sorting
Support filtering through intuitive query parameters:
GET /orders?status=shipped&created_after=2026-01-01&customer_id=123For more complex filtering needs, use bracket notation:
GET /products?price[gte]=10&price[lte]=100&category[in]=electronics,booksAlways provide sensible defaults and document what happens when filter parameters are omitted.
For sorting:
GET /posts?sort=created_at&order=desc
GET /posts?sort=-created_at (minus prefix for descending, plus or default for ascending)Support multiple sort fields when necessary: GET /posts?sort=author_name,created_at&order=asc,desc.
Sparse Fieldsets
Give clients the ability to ask for only the fields they need and that cuts payload size as well as improves performance for mobile clients.
GET /users/123?fields=id,name,emailMobile clients benefit most from APIs that use selective field retrieval and doing this cuts payload size by 60 to 80%. That gives a big boost to performance on connections that are constrained.
Documentation: The API's Face to the World
An API without documentation is a puzzle. An API with poor documentation is an obstacle. An API with excellent documentation is an accelerant, it enables developers to succeed quickly without contacting support, and success converts developers into advocates.
The OpenAPI Specification
OpenAPI (formerly Swagger) is the industry-standard machine-readable API description format.[4] An OpenAPI specification in YAML or JSON defines every endpoint, parameter, request body, response schema, and error format. From this specification, tools can automatically generate:
- Interactive documentation (Swagger UI, Redoc)
- Client SDKs in dozens of languages
- Mock servers for development
- Contract tests that verify implementations match specifications
- API gateways configurations
Compounding the value, write the specification once and let everything else come out automatically. A test failure comes of any inconsistency between what is documented and what is implemented instead of a user complaint.
What Complete Documentation Includes
Getting started guide: A developer should be able to make their first successful API call within five minutes of opening your documentation. Provide the minimal path from zero to working request.
Authentication instructions: Show exactly how to obtain credentials, how to include them in requests, and what to do when they expire. Include code examples in multiple languages.
Endpoint reference: Every endpoint documented with its method and URL, all path and query parameters with types and constraints, request body schema with examples, response schema for all status codes, and example requests and responses.
Error reference: Every error code with its meaning, common causes, and resolution steps. Link error codes in API responses directly to their documentation pages.
Code examples: In at least three languages (typically cURL, Python, and JavaScript/Node.js). Examples should be copy-paste-ready and actually work.
Changelog. What changed between versions is organized by version with dates, with breaking changes highlighted prominently.
Rate limiting documentation: Your limits, the headers you provide, and how to handle rate limit errors.
Example: Stripe's documentation includes an interactive console where developers can make real API calls from the documentation page using test credentials, see the exact HTTP request sent and response received, and copy the working code in their preferred language.[3]
This "try it now" capability eliminates the gap between reading documentation and making a first successful request. It has been time after time cited as the main driver behind how fast developers adopt Stripe.
The Longevity Principles
Great APIs live longer than the teams that built them. The Twitter v1 API served developers for over a decade before being sharply cut back, even though Twitter had many problems.
Designed in 2011, Stripe's core API has grown to cover thousands of features and it has kept backward compatibility with integrations built through the first years.
The APIs that endure share identifiable properties:
Simplicity in common cases: The most common operations should require minimal code. Complexity is reserved for complex operations, not imposed uniformly. Joshua Bloch, designer of the Java Collections API, articulated this as: "APIs should be easy to use and hard to misuse."
Stability as a commitment: Every feature you add to an API becomes a commitment. The best APIs constrain themselves, they add features when there is clear demand and proven design, not speculatively. "When in doubt, leave it out" describes this discipline.
Consistency as a multiplier. An API that is consistent teaches itself. One developer who learns one endpoint has learned something about all endpoints. Developers have to check their assumptions over and over again instead of counting on them when inconsistency destroys this multiplier.
Error quality as respect. Error handling that tells users clearly and concisely shows how much respect designers have for anyone who uses the API. Every API team can make the largest improvement simply by putting in place clear, actionable error messages.
Documentation as a product: The documentation is the first version of your API that most developers interact with. Teams that treat documentation as an afterthought signal that they do not respect developer time. Teams that invest in documentation signal that they take their contract seriously.
What Research Shows About API Design
The systematic study of API design quality has grown into a major research field driven by the economic value of APIs as integration infrastructure.
Philipp Leitner and colleagues at Chalmers University of Technology did research on web API design anti-patterns. They found that structural choices in API design time after time went with more developer errors, more support requests and less adoption.
Across the analyzed APIs, the most damaging anti-patterns were inconsistent naming conventions that appeared in 68%, missing or unhelpful error messages that appeared in 71% and absent pagination on collection endpoints that appeared in 45%.
Cleaner APIs had 2.4 times fewer integration errors than APIs that had more than three anti-patterns in these categories and those errors were measured by HTTP 400-class error responses in API logs.
Joshua Bloch, the designer of the Java Collections API and author of Effective Java, has articulated the most cited principles of API usability in his 2007 Google Tech Talk "How to Design a Good API and Why It Matters." Bloch's central claim, based on his experience designing APIs used by millions of developers, is that API design quality is measurable through a single criterion: how hard is it to misuse the API?
Good APIs, Bloch argues, should make correct usage the path of least resistance.[2]
Research on API versioning stability was conducted by Erik Wittern, Annie Ying, and colleagues at IBM Research, published in the 2017 IEEE International Conference on Software Architecture.
Over a four-year span, the team looked at 213 public web APIs and discovered that the median API saw at least one breaking change within 18 months of its first release.
When there was no versioning strategy in place, APIs changed 2.7 times more often than APIs that had formal versioning policies.
REST conventions were followed by APIs that the research also found to have lower breaking change rates than RPC-style APIs. The reason is REST's resource-oriented model that builds more stable URL structures than verb-oriented action endpoints.
David Schmelter and colleagues at the University of Stuttgart looked at how API documentation quality affects developer experience in a 2019 study. They ran a controlled experiment in which 48 professional developers integrated with two APIs that offered the same functionality but had different documentation quality.
Integration tasks were completed by developers using the well-documented API (that has working code examples in three languages, a full error reference and an interactive console) in an average of 23 minutes.
Developers working with the poorly documented API (that has only references and no examples) took an average of 67 minutes. That was a 2.9x difference in how long it took to integrate successfully.
Error rates in production integrations were 35% lower for the well-documented API as the study also showed. That points to the conclusion that documentation quality affects not only how fast initial integration goes but also how correct integration stays over the long term.
In a report based on 3,964 survey responses from 100 countries, the SmartBear 2023 State of the API Report found that 58% of API consumers make ease of use their top criterion for adopting an API. That comes ahead of functionality breadth (31%) and performance (28%).
And the same report showed that 49% of developers have abandoned an API integration mid-project. Of poor documentation or an inconsistent design and that 34% have picked a technically inferior API over a better one just on the strength of better documentation.
The results demonstrate how much of a competitive edge goes to a company that puts money into API design quality. How clearly an API is designed turns out to matter more than how technically capable it is for getting developers to adopt it.
Real-World Case Studies in API Design
Stripe's API design has set the benchmark by which other payment APIs are judged and detailed docs explain why. When Stripe launched in 2011, payment APIs were run by complex SOAP interfaces that called for detailed XML requests to be built up.
Stripe's founders Patrick and John Collison made a deliberate decision to design an API that a developer could integrate in a single day, with a test key and curl commands as the primary interface.
Developers who had pain points with current payment APIs found that the new API has a consistent resource-oriented design and supports an idempotency key for safe retries. Full error messages with machine-readable codes and documentation links address what developers experienced across the board.
Stripe processed over $817 billion in total payment volume in 2022 and part of that figure comes from developer adoption drawn in by API quality.
Through the same API patterns set up in 2011, their engineering blog shows that new payment methods are now built in. This gives proof that the original design has kept its consistency through a decade of growth.
Twilio's API growth from 2008 to 2023. This shows how API design quality gets translated into effects on the developer ecosystem. When Twilio started out, its voice API needed just three lines of code to begin a phone call and CEO Jeff Lawson has called that a foundational design principle by making it deliberately simple.
Every year the company surveys its developers and among API users it measures Net Promoter Score. Twilio's developer relations team has credited its consistent NPS scores above 60 (in an industry where 30 is seen as strong) mainly to API consistency and error quality.
When Twilio expanded from voice to SMS, email (through the SendGrid acquisition), and video, each new product was integrated with the same authentication patterns, error format, and resource-oriented URL structure. Developers who learned the Twilio API for one product could integrate new products in hours rather than days.
From 10,000 in 2011 the developer base at Twilio grew to over 10 million by 2022. The company's founders attribute the compound annual growth rate directly to their investment in API design.
Amazon's AWS API design evolution. The story shows the cost of inconsistency at scale. There was no unified design standard when AWS put out its first public APIs in 2006 and that led each service team to develop its own conventions independently.
By 2012, AWS had dozens of services with meaningfully different API patterns. EC2 used query-string parameters, S3 used REST conventions with different authentication and DynamoDB used JSON bodies. Different services each used different date formats, error structures and pagination mechanisms.
Lack of consistency was cited by developers as both a main friction point and a documented barrier to using what they had in surveys.
The AWS SDK and a gradual rollout of a unified API Gateway that standardized some patterns was Amazon's answer. Yet as a legacy of the early period when there were no design standards, the API inconsistencies that remain today still show up in AWS documentation.
Developer satisfaction surveys show the difference with Azure and Google Cloud that came out after the REST consistency standards were set up.
GitHub's REST-to-GraphQL transition that started in 2016 gives a case study of how to manage API design evolution without breaking existing consumers. The company put out a GraphQL API (v4) along with its existing REST API (v3) and did not replace it. That let consumers move over on their own schedule.
Specific documented limitations of the REST API were addressed by the GraphQL API. These were cutting the number of round-trips needed to get full data, letting clients ask for only the fields they needed and giving a strongly typed schema that was machine-readable documentation.
This approach cut both client bandwidth and server load by reducing over-fetching. Parallel APIs with no forced cutover is the migration strategy that is now cited in API lifecycle literature as a model for handling the transition between incompatible API designs.
Sources & Further Reading
- Fielding, Roy Thomas. "Architectural Styles and the Design of Network-based Software Architectures." Doctoral Dissertation, University of California, Irvine, 2000. View source
- Bloch, Joshua. "How to Design a Good API and Why It Matters." Google Tech Talks, 2007.
- Stripe. "Stripe API Reference." stripe.com.
- OpenAPI Initiative. "OpenAPI Specification 3.1.0." openapis.org. View source
- Microsoft. "Microsoft REST API Guidelines." GitHub.
- Google. "Google API Design Guide." cloud.google.com.
- Twilio. "API Design Guidelines." Twilio.
- Richardson, Leonard and Amundsen, Mike. RESTful Web APIs. O'Reilly Media, 2013.
- Masse, Mark. REST API Design Rulebook. O'Reilly Media, 2011.
- Klabnik, Steve. "Designing Hypermedia APIs." .
- Zalando. "Zalando RESTful API and Event Guidelines." opensource.zalando.com.








