04.1.3 · Skill in Software development

API design

Designing interfaces between systems that are clear and stable.

An API is a contract other code depends on, so it is hard to change once used. Good APIs have consistent naming, clear errors, sensible pagination and versioning. For developer products the API is the product.

Your status · API design

Saved in this browser. Sign in to keep it on every device.It colours this skill's tile on your map.

Why it matters for a product engineer

An API is a contract that other people’s code depends on. Once it is used, every change can break someone, so the first design matters more than in most code. For a developer product the API is the product: its names, errors and limits are the user experience.

How to do it

  1. Start from what the caller wants to do, and model the resources they think in, not your database tables.
  2. Use a few standard methods on each resource (list, get, create, update, delete) and the same naming everywhere.
  3. Return errors that say what went wrong and how to fix it, with a stable code a program can read.
  4. Add pagination, rate limits and idempotency keys from the start. They are hard to add later.
  5. Plan for change: add fields instead of changing them, and version only when you must.
  6. Write the documentation and one working example before you ship, and try them as a new user.

Common mistakes

  • Exposing the database schema as the API.
  • A different shape for each endpoint, so callers learn every one separately.
  • Errors like “Something went wrong” with no code.
  • Breaking changes without warning or a migration period.
  • Building features in the dashboard first and adding the API later.

Example

Zernio is an API first. “Most features we no longer build for the UI, only for the API”, Miquel Palet said, and the site states the rule: if it is not in the API, it does not ship. One posts endpoint covers every network. Analytics are stored and refreshed on Zernio’s side, so one call returns a week across all of a user’s accounts. (Zernio in In practice)

Flow

One call from a customer's product, and the events that come back

Customer productZernioPlatformsYour productOne API keyYour webhookOne event shapeZernio APIOne posts endpointApproved appsReviews, quotas, tokensQueuesOn Cloudflare16 networksInstagram, TikTok, X...9 ad networksMeta, Google...WebhooksMessages, commentsCustomer productZernioPlatformsYourproductOne API keyYourwebhookOne eventshapeZernioAPIOne postsendpointApprovedappsReviews,quotas…QueuesOnCloudflare16networksInstagram,TikTok…9 adnetworksMeta,Google...WebhooksMessages,comments

The customer's code sees one endpoint and one event shape. The differences between 25 platforms stay behind the API.

ReportedMiquel Palet on the Itnig podcast, and zernio.com, read 15 Nov 2026

Sources: AIP-121: resource-oriented design (Google) ↗

In practice

Real products

Resources

1
  • docsGo deeper
    AIP-121: resource-oriented design ↗
    Google API Improvement Proposals · 7 min

    How Google designs APIs around resources and a few standard methods, and why not to mirror your database.