Skip to content
routebase
API Governance10 chapters

API Governance: A Complete Guide

What API governance is when it is not a committee. Style guides, automated checks, reusable components, quality scores and a rollout that does not stop the team.

Somebody decided two years ago that your errors return a problem details body. The question governance answers is whether that decision still holds on the API a different team ships next quarter.

Most organisations answer it with a document, a review meeting, or both. This guide is about why those two are the weakest half of the answer, and what the other half looks like.

Governance is three parts, and a committee is none of them

The word carries a lot of baggage, so it helps to say what the work actually consists of.

Three mechanisms, ordered by what they cost and what they catch. Writing a convention down costs one afternoon and prevents nothing on its own. A shared component makes a whole class of violation impossible for anything that references it. An automated check catches the rest, and only where it runs in front of the person making the decision.

A decision has to exist somewhere other than in the heads of the people who made it. That is the part everybody builds, because it is cheap, and it is also the part that does nothing by itself.

Then something has to apply the decision without anyone remembering it. Sometimes that is a check, and more often it should be a reusable building block, since a shape you reference cannot be violated.

Finally somebody has to be able to see where the standard does not hold yet. Without that you cannot tell the difference between an organisation that is compliant and one that has never looked.

The two ways it fails

Governance failures are not subtle, and they come in two shapes that look like opposites.

The first is the review board. Every new API goes through a group of experienced people, the queue grows, and teams start scheduling around it. Within a year the board approves almost everything it sees, because rejecting work that is already built is expensive and unpopular. The reviews cost real time and change almost nothing.

The second is the standards document. It is thorough, it is correct, and it sits in a wiki. Nobody reads it at the moment a decision is being made, which is the only moment it could have helped. Two quarters later it describes an API that no longer exists, so people stop trusting it, and a standard nobody trusts is worse than none.

Both failures end in the same place. The APIs diverge while everyone believes there is a standard.

Rules are the cheap half

Writing rules is genuinely easy, because the OpenAPI specification suggests most of them and your last argument about plurals supplies the rest.

The expensive question is what happens when one fires. A finding that changes nobody's behaviour is not governance, it is a line number in a report. Deciding which rules stop a release, which leave a note, and which you will never enforce is where the actual work sits. The style guide post is the short argument for that, and severity and enforcement is the long one.

Consistency is cheaper to build than to inspect

The most underused lever in governance is not a rule at all.

If every API references one error schema, no rule has to check that ten teams wrote compatible error bodies, because there is one body. The same applies to pagination envelopes, authentication schemes and the headers that carry rate limit state. Inspection scales with the number of copies, and reuse removes the copies.

That is why reuse beats inspection sits early in this guide rather than at the end.

The rollout is the part people skip

Switch a complete style guide on over APIs that already exist and the first run returns a large number. What happens in the hour after that number appears decides whether governance survives in your organisation.

Turning everything into a blocker stops work immediately and teaches people to route around the tool. Leaving everything advisory forever means the count only grows, because nothing ever has to be fixed. There is an order that works, and it is the subject of rolling governance out.

The short answer

Write the decisions down, make as many of them as possible impossible to violate, check the rest where the work happens, and turn on blocking last and for very few rules.

The rest of the guide is that sentence taken apart.

ChapterAnswers
What belongs in an API style guideThe subjects a guide has to cover, and how a rule stays applicable to an API you already shipped
From a document to a checkWhat a checker can see, what it never will, and what a review is for once it has the rest
Severity and enforcementThree severities as three promises, and where a block is fair
Rules of your ownWhen a house rule earns a check, and how to write one that does not cry wolf
Reuse beats inspectionShared components as governance, and the distribution problem underneath them
Consistent headers across every APIThe place consistency dies first, and why a policy beats a rule there
Measuring API qualityWhat a weighted score is made of, and what happens when a team is measured by it
Rolling governance outMeasure, then warn, then block, and who grants an exception
Governing changeThe rules and alerts that apply after the first release
Choosing a governance toolThe criteria that separate a linter from a governance workflow

Three neighbouring subjects live elsewhere. The decisions themselves are covered in the API design guide, and the mechanics of running a linter over a document are covered in validating and linting OpenAPI. What to do when a decision has to change is covered in API versioning.

In Routebase

Governance in Routebase is a set of organisation-level settings rather than a separate product, so the standard lives next to the specifications it applies to.

The style guide rules table with columns for category, rule, target, severity and convention, listing naming and completeness rules with Warning and Info severities, and the convention dropdown for the URL path rule open on Default, kebab-case, camelCase, PascalCase and lowercase.
The shared standard is one table, and each row is a decision somebody made once for the whole organisation instead of once per pull request.

Three surfaces carry the three mechanisms. The style guide holds the rules and their severities, and the shared library holds the schemas and responses that make a shape reusable across projects. Header policies apply a set of response headers wherever the status codes match. All three cascade from the organisation to the project, and the quality score aggregates what is left over into a number per specification.

Start with the Style Guide guide in the product documentation, or read on. The API governance page has the short version of the three surfaces and the rollout, and the API design feature page shows how governance fits into the rest of the lifecycle.

Frequently asked questions

What is API governance?

API governance is how an organisation makes the same design decisions apply to every API it ships. It has three working parts rather than one. The decisions are written down somewhere people can argue with them, a machine checks the ones that can be checked, and somebody can see where the standard does not hold yet. A review board is one way to arrange the first part and it does nothing about the other two.

Why does API governance fail?

It fails in two opposite ways. A review board becomes a queue that teams learn to route around, so it slows delivery without improving consistency. A written standard with no check decays quietly instead, because nobody reads it at the moment a decision is made. Both failures produce the same result, which is a set of APIs that drift apart while everyone believes they agreed.

What should an API governance framework include?

Four things carry almost all of the value. A style guide records the decisions, automated checks enforce the machine-checkable ones where the work happens, shared components make the agreed shape the easiest one to build, and a measurement shows which APIs need attention. A rollout plan is the fifth, and skipping it is the most common way the other four get switched off.

Do you need an API governance team?

You need someone who owns the standard, and that is a smaller job than a team. The work is deciding what goes in the guide, choosing what blocks a release, and handling exceptions when a rule meets an API it cannot fit. Everything mechanical belongs to a tool, because a person reviewing naming conventions by hand is the slowest and least reliable way to catch them.

Last reviewed by The Routebase Team.

Chapters in this guide

  1. Chapter 01

    What Belongs in an API Style Guide

    The subjects a style guide has to cover, the difference between a decision and a preference, and how to write rules that apply to an API you already shipped.

  2. Chapter 02

    From a Document to a Check

    What an automated check can see in an API description, what it will never see, and what a design review is for once the machine has taken the mechanical half.

  3. Chapter 03

    Severity and Enforcement

    Error, warning and info as three different promises to the people who hit them, where a block is fair, and why an escape hatch is what keeps a guide switched on.

  4. Chapter 04

    Rules of Your Own

    When a house convention earns an automated check, what a condition-based rule can express, and how to write one that does not fire on half your endpoints.

  5. Chapter 05

    Reuse Beats Inspection

    Why a shared definition removes a class of violation instead of reporting it, what belongs in an organisation-wide library, and how to distribute a change without breaking twelve services.

  6. Chapter 06

    Consistent Headers Across Every API

    Headers are the first place consistency decays. The four families worth standardising, why a policy beats a rule here, and what a policy in a contract does not do.

  7. Chapter 07

    Measuring API Quality

    What a weighted quality score is made of, why coverage is not quality, what the number cannot see, and what happens to it the moment a team is measured by it.

  8. Chapter 08

    Rolling Governance Out Without Stopping the Team

    The order that works is measure, then warn, then block. Why the reverse order gets governance switched off, how to treat existing APIs differently from new ones, and who grants an exception.

  9. Chapter 09

    Governing Change

    Governance does not end at the first release. Which rules can check a change, what only a comparison between versions can tell you, and the alerts worth having.

  10. Chapter 10

    What to Look for in an API Governance Tool

    Eight criteria that decide whether a governance tool is still running in a year, written as questions to ask rather than as a list of vendors.

Ready to ship on it?

Routebase is live. Design your API once — docs, mocks, tests, and monitoring all follow from the same source.

14-day Pro trial — no credit card required.