October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

The API Is a Promise: Designing for Systems You No Longer Control

Consumers build code against your API's observable behavior, and you cannot upgrade them on your schedule. Designing the contract, versioning, retries, and security so they hold up over years of independent use.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An API becomes a promise the moment another team, a partner, or a script writes code against it. After that, you can deploy your servers whenever you like, but you cannot set your consumers’ release schedules. Designing for that means modelling the API around business concepts rather than storage, keeping change additive by default, versioning and retiring the rare breaking change on a published timeline, and treating retries, operations, and security as part of the contract. An interface that cannot be diagnosed, safely retried, or protected is incomplete, even if its success responses look clean.

What the promise actually covers

Consumers rarely build against a document alone. They build against whatever they can observe: field names, the meaning of values, status codes, error shapes, pagination behaviour, and timing. Once that code ships, it stays fixed until its owner decides to change it.

As an Amazon Associate I earn from qualifying purchases.

Two kinds of control are easy to conflate. You control when your server is released. You usually do not control when a client is released. Your own mobile app can be force-updated; a partner’s nightly batch job, an embedded device, or an integration written several years ago cannot. Microsoft’s Web API design best-practices guidance makes the same point: the provider typically has less control over partner-built clients than over the API itself, so it recommends continuing to support existing clients while enabling new features.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The practical rule follows. Design so the server can change without requiring a client change, and treat any change that does require one as a rare event with its own process.

#1 Best Overall
API Design Patterns
  • API Design Patterns
  • ABIS BOOK
  • Manning Publications

Put the boundary at domain concepts, not storage

Microsoft’s Azure Architecture Center advises against exposing internal implementation details or mirroring a database schema. The reason is coupling. If an endpoint returns table rows, every consumer now depends on your column names, your internal status codes, and your join logic. The following illustrative fragments show the same order in two designs:

Design Illustrative response fragment What clients come to depend on What you can change later without breaking them
Mirror the table {"ord_sts_cd": "S", "cust_fk": 8812} Column names, the meaning of code “S”, the foreign-key layout Very little. Renaming a column, splitting the table, or recoding “S” is a breaking change.
Model the domain {"status": "shipped", "customer": {"id": "cus_8812"}} The business meaning of “shipped” and the customer reference Storage layout, indexes, internal services, and how status is derived, as long as the meaning holds

The same guidance says to change an API primarily when you add functionality, not when you refactor or change storage. A storage migration that leaves responses unchanged should not produce a new API version. If it does, the boundary is in the wrong place.

Make compatibility a release discipline

Compatibility is decided per change, not per release. The first three rows below follow Microsoft’s guidance on compatible and breaking changes. The last two follow from the same principle: a change that alters what a client observes is breaking even when the schema diff looks harmless.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Change Effect on existing clients Handling
Add a response field Compatible only if clients ignore unknown fields Ship in the current version, and state in your documentation that clients must ignore fields they do not recognise
Add a new operation or resource Existing clients never call it Ship in the current version
Remove a field Breaks clients that read it New version; keep the old one running through the deprecation window
Rename a field Breaks clients that read the old name Treat as a removal plus an addition, so the same as removal
Change what an existing value or default means Can break clients silently, with no schema change Treat as breaking; a new value or a new version is safer
Refactor storage with identical responses No effect No version change

A release gate that follows this table can be short:

  1. Classify each change before merge as additive, breaking, or behavioural. Behavioural changes are the ones teams most often miss, because no schema diff shows them.
  2. Ship additive changes in the current version. Make the tolerance rule for unknown fields part of the published contract; without it, a new field is not a safe change.
  3. Route every breaking change to a new version rather than altering the old one.
  4. Publish the end date of the old version’s support before you announce the change, not after the first complaint.
  5. Retire the old version only after your own call data shows it is no longer used and the announced date has passed.

Versioning needs a lifecycle, not just a number

Choose where the version lives

Home Office engineering guidance on designing and maintaining an API, updated 14 October 2024, identifies URI paths, query parameters, and headers as places a version can be carried. It asks teams to choose a strategy and apply it consistently rather than naming one universal best option. The trade-offs look like this:

Location Illustrative form Consumer clarity Provider trade-off
URI path /v2/orders/123 Visible in logs, documentation, and copied URLs The version appears in every route, and old and new routes both need maintenance
Query parameter /orders/123?version=2 Easy to add to an existing URL Easy to drop by accident; the behaviour when the parameter is omitted must be defined and documented
Header API-Version: 2 Keeps URLs stable Invisible in a browser address bar and in many logs, and harder to test by hand

Scope the strategy to the whole API or to each endpoint

Home Office guidance calls for consistency, whether the version applies per endpoint or across the whole API. Mixed schemes are where lifecycle plans fail: a consumer who upgrades one endpoint and finds another still on an older scheme has to track two calendars. A single API-wide version is simpler to explain, at the cost that a breaking change in one resource moves every resource. Pick one approach and document it.

For UK government services, GOV.UK’s API technical and data standards (last updated 30 September 2026) recommend designing, building, and operating APIs consistently so they work across platforms and services. The page includes a recent token-exchange update in its access-control section. Treat it as current guidance for government APIs, not as a universal rule for every provider.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run deprecation as a timeline

Home Office guidance says to consider how a version will be deprecated and how that will be communicated to consumers. In practice that means four stages: announce the change with a date; publish a migration guide that maps old behaviour to new; track which clients still call the old version; and retire it on the stated date. The third stage depends on the call-level telemetry described in the operations section below.

Retries: a timeout does not tell you what happened

When a request times out, the client knows only that it received no response. Three different situations produce that same symptom:

  • The request never reached the server, so nothing happened.
  • The server applied the change, and the response was lost on the way back.
  • The server is still processing, so the outcome is not yet settled.

A client cannot distinguish these from the timeout alone, which is why retry behaviour is part of the promise.

RFC 9110 explains why HTTP distinguishes idempotent methods: a client can repeat them automatically after a communication failure, before it has read a response. RFC 9110 lists GET, HEAD, OPTIONS, TRACE, PUT, and DELETE as idempotent. POST is not, and it is the method most often used to create orders, payments, and messages. The standard is direct about the risk:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“A client SHOULD NOT automatically retry a request with a non-idempotent method unless it has some means to know that the request semantics are actually idempotent, regardless of the method, or some means to detect that the original request was never applied.”

That is RFC 9110, Section 9.2.2, from the RFC Editor’s HTTP Semantics standard. Retrying every failed POST is therefore the wrong reading of “retry.” A safe retry needs a method that is idempotent by definition, a mechanism that makes the mutation idempotent, or a way to check whether the original request was applied.

Make mutations safe to repeat with an idempotency token

AWS Well-Architected guidance (REL04-BP04, “Make all responses idempotent,” versioned June 27, 2024) describes a pattern in which the client sends an idempotency token and reuses the same token when it repeats the request. The service returns the original result instead of creating a duplicate record or triggering a second side effect. Microsoft’s API design guidance makes a related point: side-effecting operations can be designed idempotently to enable safer retries and better resiliency.

This is a design pattern, not a guarantee of exactly-once execution. The guidance does not settle the details, so your contract has to:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Scope: Is the token unique per client, per account, or per operation?
  • Retention: How long does the service remember a token? A retry that arrives after that window will be treated as new.
  • Replay: Does a repeated request receive the stored response, or only a status?
  • Conflict: What happens if the same token arrives with a different payload? Reject it with a clear error rather than silently applying the second payload.

Asynchronous work: 202 means accepted, not finished

Microsoft’s API design guidance notes that an HTTP 202 response indicates the request was accepted for processing, not that processing is complete. Make that distinction explicit in the contract. Specify the states a resource can report (for example, pending, succeeded, and failed), where the client checks for them, how long the status remains available, and whether the client learns the result by polling or by notification. A 202 with no documented way to learn the outcome leaves the client guessing, and guessing is how duplicates get created.

A retry decision order for client code

  1. Is the method idempotent by definition (GET, HEAD, OPTIONS, TRACE, PUT, or DELETE)? If so, retry with backoff.
  2. Does the mutation accept an idempotency token? If so, generate the token before the first attempt and reuse it on every retry.
  3. Can the client check whether the operation was applied, for example by fetching the created resource or its status? If so, check before resending.
  4. None of the above? Surface the failure to the user or to a queue. Do not resend.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Operations and security are part of the promise

A consumer who cannot tell why a call failed will open a support ticket, and a provider who cannot see traffic cannot know which old version is still in use. Home Office guidance calls for a way to observe API health and trace activity, recommending aggregated application logs and metrics, with care where request or response data may be sensitive.

Observability that consumers can use

  • Return appropriate HTTP status codes so the class of failure is clear before anyone reads the body.
  • Give each error a request identifier that a consumer can quote in a support request. This is an engineering recommendation of this article, not a requirement of the guidance cited here.
  • Count calls by API version and by client, so deprecation decisions rest on measured usage.
  • Redact or exclude request and response bodies that carry personal or payment data before they reach shared logs.

Validation, authentication, and authorization

Home Office guidance also calls for input validation, security practices, authentication and authorization, testing, and consideration of scalability. Validate at the boundary so malformed input never reaches the domain model. Reject bad requests with a 4xx status and a message that names the failing field, so the consumer can fix the request without contacting you.

Assess risk across development and runtime

NIST’s SP 800-228 update, “Guidelines for API Protection for Cloud-Native Systems – March 2026 Update” (SP 800-228-upd1, published March 13, 2026), addresses API risk factors across both development and runtime. It recommends basic and advanced protection controls and frames each implementation choice with its advantages and disadvantages, so teams can take an incremental, risk-based approach. Its scope is cloud-native systems and API protection; apply it to other architectures by analogy rather than as a direct requirement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choosing interface styles for public and internal APIs

Microsoft’s guidance separates public APIs from service-to-service APIs. Public interfaces often need client compatibility and broad interoperability. Internal calls may put more weight on payload size and serialization performance. The table summarises the trade-offs the guidance raises; it does not rank them for every context.

Option Where it tends to fit Trade-offs to weigh
REST over HTTP Public and partner APIs Broadest client and tooling support; payloads can be larger and chattier than binary formats
RPC Internal calls organised around operations Operation-oriented calls map cleanly to internal workflows; client support outside your own stack is narrower
Binary serialization High-volume internal traffic Smaller payloads and faster serialization; harder to inspect by hand and needs shared schema tooling

Microsoft advises performance and load testing early. Measure your own workload before choosing, because a payload-size advantage on paper may not matter at your traffic levels.

What this guidance does not measure

None of the guidance cited here measures how often breaking changes cause outages, or how often clients retry safely. This article therefore quotes no incident counts or percentages. Its recommendations are engineering practice. Where a standard binds you, as with a UK government service following GOV.UK’s API standards, follow the standard itself rather than this article’s reading of it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.