Software engineering

API design and development

APIs other teams can build on without a meeting and rely on to stay compatible.

How we do it

Overview

Once another team, a partner or a customer writes code against an API, every field name and error code becomes a commitment that you either keep working or retire with notice, and many of the people relying on it are ones you will never meet. Most enterprise APIs came into being when a project needed a database table or an internal service to be reachable that month, so somebody gave it a URL, and that longer commitment was never considered.

The cost of this tends to appear later, when consumers work out the behavior by trial and error because the documentation describes an earlier version, or when a renamed field breaks a mobile app that the owning team did not know was calling it. Three teams each build their own customer endpoint with a different identifier, and partners take months to integrate because every one of them needs a call with the engineer who wrote the service.

We treat an API as a product that has users, a contract and a life cycle. The contract is written and reviewed before any code, and the delivery pipeline checks compatibility on every change so that it does not depend on anyone's memory. Versioning and deprecation follow a published policy, which tells consumers how long they have to move, and the design starts from what a consumer is trying to accomplish, which is often quite different from the way your tables happen to be laid out.

Challenges we address

The failures we are usually called in to fix
  1. The API mirrors the database

    Endpoints map one to one onto internal tables and expose internal column names and status codes. A consumer has to understand your schema just to place an order, and you cannot restructure a table without breaking every system that calls the API.

  2. Documentation that is out of date

    The reference was written by hand at one point and the service has changed since, so developers learn how it really behaves by reading responses and asking questions in chat. Every new consumer then costs the owning team days spent answering the same questions again.

  3. Breaking changes found in production

    A field is renamed or made mandatory as part of a routine release, and the tests pass because they only exercise the provider side. A partner's integration then fails in production, and the incident is how the owning team finds out who its consumers are.

  4. Each team uses its own conventions

    One API paginates with page numbers and another with cursors, errors come back in four different formats, and some dates carry a time zone while others do not. None of these differences is large on its own, but together they mean every integration starts with a fresh round of research.

  5. Old versions that can never be retired

    Version one was supposed to be switched off a long time ago. Nobody knows who still calls it, because there is no usage data per consumer and no notice period was ever promised, so it keeps running indefinitely while still needing security patches.

Our approach

How the work runs, in order
  1. Start from the consumer

    We interview the teams and partners who will call the API and write down the tasks they need to get done. Resources and operations are then modeled on those tasks and on business terms, which keeps the interface stable when the systems behind it are changed.

  2. Write the contract first

    Before implementation begins, the interface is specified in OpenAPI, or in AsyncAPI for events. Consumers review the specification and build against a mock server while the real service is being written, so disagreements over what things are called and how they are shaped get settled while resolving them means editing a document, which costs far less than changing a release.

  3. Agree the rules of change

    Together with you we write a short policy that defines what counts as a breaking change, how versions are named, how long an old version stays supported and how consumers are notified. It is published alongside the documentation and applies to every API you run as well as this one.

  4. Build with checks in the pipeline

    Each change is linted against your style rules and compared with the previous contract, and the build fails if the difference would break a consumer. Contract tests confirm that the service behaves as the specification says, and security tests cover authentication and, most importantly, whether one customer can read another customer's records.

  5. Publish, measure, hand over

    The API goes live behind a gateway that issues credentials per consumer and applies rate limits and usage tracking. Your team receives the specification, the pipeline and a developer portal with working examples, along with the runbooks for rotating credentials and for retiring a version.

Technical capabilities

What we design, build and operate
  • Resource and contract design

    Interfaces in REST, GraphQL or gRPC, chosen to suit the consumers in question, with each one specified in a machine-readable contract that includes an example for every operation.

  • Event and webhook interfaces

    Asynchronous contracts described in AsyncAPI, with signed webhook deliveries and retries, and a mechanism that lets consumers replay the events they missed.

  • Versioning and deprecation

    A written compatibility policy and automated detection of breaking changes, with deprecations announced in the documentation and in response headers along with a retirement date.

  • Authentication and authorization

    OAuth 2.0 and OpenID Connect flows, mutual TLS for calls between systems and scoped tokens, together with an object-level permission check on each request.

  • Gateway configuration

    Routing, rate limits, quotas, request validation and per-consumer analytics defined as code, either on the gateway you already run or on one we help you choose.

  • Retry-safe interface design

    Idempotency keys that make a repeated request harmless, cursor pagination for large collections and a single error format, with timeouts and size limits documented.

  • Developer portal and documentation

    Reference documentation generated from the contract, so that it stays in step with the service, plus a getting-started guide, runnable examples, a sandbox and a changelog.

  • Contract and security testing

    Provider tests and consumer-driven contract tests, fuzzing based on the schema, and tests for the authorization failures listed in the OWASP API Security Top 10.

Where it applies

Business applications
  • Partner and customer integrations

    Distributors, brokers or customers connecting their systems to yours through a documented interface, with an onboarding process they can complete on their own.

  • Mobile and web back ends

    A stable interface between the front-end teams and the core systems, which means a new app can be built without starting a new integration project.

  • Shared internal capabilities

    Customer, product or pricing lookups provided once with a named owner, so that each project no longer rebuilds its own slightly different version.

  • Opening a legacy system safely

    A designed interface placed in front of an old system, so that consumers depend on the contract and the system behind it can later be replaced.

  • Tools for AI agents

    Narrow operations with clear descriptions, strict input validation and scoped permissions, which makes them suitable to expose to an AI agent as tools.

  • Tidying an API estate

    Bringing dozens of inconsistent internal APIs under a single style guide, gateway and catalog, and giving each of them a named owner.

In practice

Two situations this service is built for, and what we would do in each.

Financial services

A partner API that takes a quarter to integrate

The situation
A lender offers financing through retail partners, and each partner connects to the lender's origination system. Every integration turns into a project, because the documentation is a shared document, the test environment behaves differently from production and partners find out about validation rules when their applications are rejected, which leaves the partner team spending its time on support calls.
What we would build
We would interview developers at several partners about where they lost time and then redesign the interface around the life cycle of an application. That means an OpenAPI contract, error bodies that name the field that failed and a sandbox that applies the production validation rules, with documentation generated from the contract. We would also publish a versioning and deprecation policy and give existing partners a migration guide and a dated notice period.
What it is designed to change
The goal is for a new partner to reach a first successful test application using only the documentation. We would track the time from credentials being issued to the first production call, as well as the number of support questions each integration generates.
Logistics and supply chain

Shipment tracking exposed to customers without breaking them

The situation
A logistics operator lets large customers read shipment status through an API that started life as an internal service, so the status codes are internal abbreviations. A recent release changed a date format and broke the warehouse systems of two customers, and the operator has no record of which customers call which endpoints.
What we would build
We would place the API behind a gateway and issue a key to each customer, which makes usage visible by consumer and by endpoint. The contract would be written down to match how the service behaves today and checked in the pipeline, so a breaking difference blocks the release. Working with two customers, we would design a new version with documented statuses and webhooks for status changes, and give the old version a published retirement date.
What it is designed to change
Releases would no longer put customers' operations at risk. We would watch two figures, namely the number of consumer-facing breaking changes that reach production and the share of traffic that has moved to the new version before the retirement date.

Technologies

We work in your stack and recommend on fit. We resell nothing.
Specification and design
OpenAPI · AsyncAPI · JSON Schema · Protocol Buffers · GraphQL SDL · Spectral
API gateways
Kong · Apigee · Amazon API Gateway · Azure API Management · Envoy · Tyk
Security
OAuth 2.0 · OpenID Connect · mutual TLS · JSON Web Tokens · Keycloak · Microsoft Entra ID
Testing and mocking
Pact · Schemathesis · Postman · Prism · WireMock · oasdiff
Documentation and catalogs
Redoc · Swagger UI · Backstage

Business outcomes

What changes for the organization
  • Integrations that need fewer meetings

    A developer can get from the documentation and the sandbox to a working call without having to book time with the team that owns the service.

  • Releases that do not break consumers

    The pipeline catches unintended breaking changes before release, and intended ones follow a notice period that consumers were told about well in advance.

  • Systems behind the API can change

    Since consumers depend on the contract and never see your tables, the systems behind the API can be refactored or replaced without coordinating with every caller.

  • Old versions retired on schedule

    With usage data for each consumer and a published deprecation policy, a version can be switched off on a date that every consumer knew about beforehand.

What you hold at the end

  • An API contract in OpenAPI or AsyncAPI, reviewed by its consumers
  • The implemented service, covered by contract and security tests
  • A style guide whose lint rules are enforced in the pipeline
  • A versioning and deprecation policy that is ready to publish
  • Gateway configuration kept as code, with limits set per consumer
  • A developer portal with examples, a sandbox and a changelog
  • Runbooks for rotating credentials and retiring a version

Questions buyers ask

That depends on who is calling. REST over HTTP with JSON is the safe default for partner and public APIs, since every consumer can use it without special tooling. GraphQL makes sense when front-end teams need to shape varied queries over the same data, and gRPC suits high-volume calls between your own services. It is normal to run more than one style, so we choose for each interface and record the reason.

As seldom as you can manage. Most changes can be made in a compatible way by adding optional fields or new endpoints and by never changing what an existing field means. A new major version is for changes that cannot be made like that, and it should be signaled in the path or a header in the same way across the estate. The policy around the scheme matters more than the scheme itself, meaning a definition of what counts as breaking, a support period and a notice process that consumers can rely on.

A gateway handles traffic, which covers routing, authentication, rate limits and analytics. It cannot make an interface well designed, consistent or documented, and it has no way of knowing that a release removed a field someone depends on, because those qualities come from contract design, pipeline checks and a change policy. We work with the gateway you already have, since replacing it is seldom the most useful first step.

We test for it directly. Authentication establishes who is calling, but it does not establish whether they are allowed to read the record they asked for, and a missing object-level check is the flaw at the top of the OWASP API Security Top 10. Every operation that accepts an identifier gets an authorization rule and an automated test that repeats the request using another tenant's credentials, and those tests run on every build.

A named team, recorded in the catalog, that has the authority to accept or refuse change requests. That team owns the contract, reviews changes against the style guide and is accountable for the deprecation policy. We set this up during the engagement, and before we leave the team makes a contract change and releases it with us. Without a clear owner an API tends to drift as convenient exceptions are added one at a time.

Discuss API design and development with the people who would do the work.

Tell us what you are trying to do and where it is stuck. A principal reads every message and replies within one working day.

How we engage

Start a conversation.

A short paragraph is enough. A principal reads every message and replies within one working day.

Or email hello@farside.works. We use what you send only to reply. Privacy