Skip to content
Thally
Log inGet started
Guide

Published · 8 min read

Find which API doc pages a merged pull request made wrong, draft evidence-backed updates, and publish only what a person approves.

By Published Updated

Which pages went wrong when your last pull request merged? Could you list them without opening the ticket, reading the diff, and searching the docs repo by hand? If not, you have the same problem as most API teams. Working out how to keep API docs up to date is less about writing faster and more about knowing, at merge time, what just became untrue. This guide walks through one workflow: trace the change, draft the update, check the evidence, and publish only what a person approved.

Where an API reference drifts after a merge

Drift rarely happens because nobody cares. It happens because the change and the page live in different places, are owned by different people, and get reviewed at different times.

The scale of the problem is well documented. In Postman's 2025 State of the API Report, 55% of respondents reported struggling with inconsistent documentation. An older data point, from a secondary review of SmartBear's 2020 State of API report, found that 47% say their docs are out of sync with the API implementation, and 64% of participants named limited time as the biggest obstacle to keeping them current. That data is from a few years back, but the complaint will sound familiar.

It matters because docs are where developers go first. In the Stack Overflow 2025 Developer Survey, technical documentation was the top learning resource, with nearly 68% of respondents using it in the past year.

The spec covers less than you think

If your reference is generated from an OpenAPI file at build time, the endpoint tables can't fall behind the spec they ship with. That closes one gap and leaves several others open. After a merge that renames a field or changes a default, check for drift in these places:

  • Hand-written descriptions, parameter notes, and error explanations layered on top of the generated reference
  • Code samples in quickstarts and tutorials that hard-code the old request shape
  • Authentication, pagination, and rate-limit guides that describe behavior and aren't tied to any one endpoint
  • Help-center and troubleshooting articles that quote an old error message or response
  • Website and blog pages with a copyable example
  • Changelog and migration notes that should exist but don't

A single renamed field can leave the old name in the API reference, a quickstart, a troubleshooting article, and a blog post at the same time. Pages that mention a behavior without being the docs for that feature are the ones that get missed.

Trace the pull request to the reference pages it affects

Start from the merged pull request, not from the docs. The diff tells you what changed, so the job is to turn it into a list of affected pages.

Work through it in this order:

  • Identify the public surface that changed. Look for route definitions, request and response schemas, enums, defaults, error codes, auth scopes, and limits. Ignore internal refactors that don't alter behavior a caller can observe.
  • Write down the before and after. "Field customer_ref renamed to customer_id; old name accepted until the next major version" is a claim you can check pages against.
  • Search every content source for the old identifiers. Cover the docs repo, the marketing site, and the help center. Search for the endpoint path, the field name, the error string, and any example values.
  • Search for the concept as well as the string. A guide may say "requests are limited per minute" without naming the header you just changed.
  • Record each hit with a reason. Note the page, the line, and which part of the diff makes it wrong.

Done by hand, this takes time, and limited time is the obstacle teams cite most. This is the step to automate first. Thally's Automation runs on every merge: it analyzes the change, drafts the documentation updates it implies, and opens them as a pull request on your docs repo for review. Whether a tool or a person does the tracing, the output should be the same: a list of pages, each tied to a specific line in a specific pull request.

Illustration of Trace the pull request to the reference pages it affects

Draft the docs update instead of editing live

Once you know which pages are wrong, don't fix them in a live editor. Put the fix in a pull request.

The docs-as-code approach from Write the Docs describes it plainly: "Write and publish your docs with the same tools as your code: issue trackers, version control, plain text files, code review and automated tests." When docs live in a separate editor with its own workflow, keeping them current depends on someone remembering to go there. A docs pull request doesn't depend on memory. It sits in a queue with a diff, an author, and a reviewer.

A few rules keep drafts reviewable:

  • One code change, one docs pull request. Link it to the source pull request so the reviewer can see the cause.
  • Change what the diff supports and nothing else. Don't mix a tone rewrite into a field rename.
  • Update the examples along with the prose. A corrected description above a stale sample still fails the reader.
  • Add the migration note. If the old behavior still works for a while, say so and say until when.

Who writes the first draft is flexible. Write the Docs notes that developers will often write it, and in Postman's 2025 survey 41% of respondents said they rely on AI to generate API documentation. Either is fine, as long as the draft is a proposal that someone reviews before it goes anywhere.

Decide what triggers a draft, too. Not every commit deserves a documentation review. Reasonable triggers are a merge that touches the public surface, a release tag, a change to openapi.yaml or schema files on the default branch, and a scheduled weekly sweep to catch drift the event triggers missed.

Check the evidence before approval

A docs draft is a set of claims about your product. Before approving it, the reviewer should be able to confirm each claim from the code without trusting whoever wrote the draft.

For every changed line, ask:

  • Where does this come from? There should be a link to the pull request and the file or line that justifies the edit. Without that, you're reviewing a guess.
  • Does the new text match merged behavior? Check it against the spec or the code as it actually shipped, since the original ticket may describe something different.
  • Do the examples run? Execute the sample request against a staging environment, or at least validate it against the schema.
  • Is the version right? If you maintain versioned docs, confirm the change lands on the version that has the new behavior and leaves the older ones alone.
  • Is anything missing? Compare the list of affected pages from the trace to the files in the pull request. A page that was flagged but not edited needs an explanation.
  • Did the draft overreach? Reject edits that the diff doesn't support, even if they read well.

This step is why the trace is worth doing carefully. A reviewer can approve a twelve-file docs change in a few minutes when each edit points at its source. Without that evidence, the reviewer has to redo the trace or approve without checking.

Illustration of Check the evidence before approval

Publish only the human-approved reference change

The last step is a gate: nothing reaches the public reference without a named person approving it.

On GitHub, you can enforce this with code owners and branch protection. Assign owners to your reference and guide directories, then edit the branch protection rule and enable "Require review from Code Owners". Two details trip teams up. The GitHub docs state that "For code owners to receive review requests, the CODEOWNERS file must be on the base branch of the pull request." Code owners are also not automatically requested to review draft pull requests, so an automated draft has to be marked ready for review before the request goes out.

Publish from the merged branch, and publish everything that derives from it. If the same source feeds your HTML site, Markdown exports, and an llms.txt file, they should all update together. AI coding assistants can recommend outdated APIs when the documentation they read describes an older release, so a stale machine-readable copy sends wrong answers into your users' editors.

How to keep API docs up to date as a routine

Run the same loop on every merge:

  • Trace the merged pull request to every affected page across docs, website, and help center
  • Draft the fix as a docs pull request linked to the source change
  • Review each edit against its evidence
  • Require owner approval before merge
  • Publish all output formats from the approved source
  • Run a weekly sweep for whatever slipped through

If you want to see what the trace turns up on your own repositories before changing your process, Thally Track runs an impact analysis on your last five merged pull requests.

Sources

  1. 2025 State of the API Report (Postman)
  2. Postman's 2025 State of the API Report press release (Business Wire, via Yahoo Finance)
  3. SmartBear 2020 State of API report review (I'd Rather Be Writing)
  4. Stack Overflow 2025 Developer Survey: Developers
  5. Docs as Code (Write the Docs)
  6. About code owners (GitHub Docs)
  7. Keep Your Docs Site in Sync With Code Changes | Thally
  8. Why AI Coding Assistants Use Outdated API Docs | Thally
  9. Thally Automation: Ship the Code. Docs Follow. | Thally

Published under the Thally editorial policy. Technical conformance is defined in the agent-readiness methodology.

Build docs that stay close to your product.

Create a managed site, or use the open-source engine to run Thally yourself.