Customers & growth · Developer marketing
API documentation framework
Best for Early Startup to Startup
Use it when
Your API design is settled and developers need a reference that tells them exactly how to call every endpoint and handle what comes back.
Skip it when
- The resources, errors and versions are still being decided. Use API design principles first, since the reference documents those choices.
- You are planning the whole docs set, its page types and navigation. Use Documentation framework.
- The reference is live and you need to judge how good it is. Use Documentation quality framework.
- Developers call the API through your client libraries. Use SDK documentation framework, which builds on this.
- New users need a guided path to their first working call. Use Quick start framework.
What to apply first and what to use instead are listed below.
Approaches
Design-first
The team writes the API description, such as an OpenAPI file, before the code and generates the reference from it.
- Pro Writers and testers can work alongside developers from one precise definition, which keeps the docs consistent.
- Con It takes more time upfront, and the team must agree the design before building.
Code-first
Developers annotate the code, and the API description and reference are generated from those annotations.
- Pro It is faster to start and suits early or fast-changing APIs and small teams.
- Con Writers lack a precise definition until code exists, and limits in what the description can express surface late.
Inputs
- API descriptionThe OpenAPI file or equivalent for the current release, from the API repository.
- Design documentResources, error format and version scheme, from API design principles.
- Test accessA sandbox, test keys and the current release, so every example can be run.
- Developer questionsSupport tickets, forum posts and docs searches about the API from the last 90 days.
- Style rulesYour docs style guide and a linter for the API description, from the docs team.
Steps
- Make one API description in source control the single source of the reference, checked in continuous integration, and generate the reference pages from it.
- Give every operation a short summary, a description, its method and path, the permissions it needs and its lifecycle status, such as beta or deprecated.
- Document every path, query, header and body parameter with its data type, whether it is required, its default, its allowed values or limits, and what it changes in the response.
- Add a realistic request example and its matching response example to each operation, with a schema that gives every response property a type, a description and whether it is always present.
- Write the shared pages for authentication, rate limits, versioning and one list of status and error codes, and link each endpoint to the codes it most often returns.
- Run every example against the sandbox, test missing and out-of-range values, lint the description, check links and publish with the release.
Output
An API reference generated from one description, with shared pages for authentication, errors, rate limits and versions.
- Operation summary, method and path
- Permissions and lifecycle status
- Parameters with type, required, default and limits
- Request example
- Response example and schema
- Common errors, linked to the error code page
- Authentication, rate limit and versioning pages
- Lint, link and example test results, with the release tested
Done when
- Every operation in the description has a summary, a description, its permissions and a lifecycle status.
- Every parameter states its type, whether it is required, and its default where one exists.
- Every request and response example was run against the current release, and the result is recorded.
- The error code page lists every custom code with its meaning and how to fix it, and every endpoint links to it.
- The description passes the linter, and every link resolves.
Measure
For 90 days after publishing, track support tickets and forum questions about the API, docs searches with no result, and the time new keys take to make a first successful call. Compare with the 90 days before. It worked when tickets per active developer and time to first call both fall. Recheck after each release that adds or changes operations.
Hypothetical example
Tallyport offers a shipping rates API with 24 operations, and a quarter of its support tickets ask what an error means. The team moves the hand-written pages into its OpenAPI file and generates the reference from it. Each operation gains permissions, parameter limits and a tested example. Testing missing parameters uncovers five custom error codes no one had documented, which now sit on one error page linked from every endpoint. The linter runs on every merge. Ninety days later, error tickets have dropped by about half and median time to first call is down from two days to under one.
Common mistakes
- Keeping hand-written reference pages beside the API description. Generate the reference from one description so the two cannot drift.
- Documenting only successful calls. Send missing, wrong and out-of-range values and document every error you get back.
- Using placeholder values in examples. Use realistic values that run, and never real customer data.
- Repeating the full error list on every endpoint. Keep one error page and highlight each endpoint's likely codes.
- Leaving retired operations unmarked. Mark lifecycle status and link to the versioning page.
Sources
- Best Practices (OpenAPI Initiative) · OpenAPI Initiative, 2026
- Code-First vs. Design-First: Eliminate Friction with API Exploration · McKenzie Tucci, 2023
- API docs checklist (Elastic Docs) · Elastic
Show all 6 sources
- Step 3: Parameters (API reference tutorial) · Tom Johnson, 2026
- Step 5: Response example and schema (API reference tutorial) · Tom Johnson, 2026
- Status and error codes (I'd Rather Be Writing) · Tom Johnson, 2026
By company stage
Apply first
- API design principlesCustomers & growth · Developer marketing
Documenting endpoints, parameters, errors and versions well requires understanding the API design concepts behind them.
Use instead
- API design principles
The resources, errors and versions are still being decided. Use API design principles first, since the reference documents those choices.
- Documentation framework
You are planning the whole docs set, its page types and navigation. Use Documentation framework.
- Documentation quality framework
The reference is live and you need to judge how good it is. Use Documentation quality framework.
- SDK documentation framework
Developers call the API through your client libraries. Use SDK documentation framework, which builds on this.
- Quick start framework
New users need a guided path to their first working call. Use Quick start framework.
Where it sits
Open the developer marketing roadmapRecommended resources
No sponsored resources on this framework yet. Sponsored listings would be labelled here, never in search.
Progress is not saved until you have an account. Create a free account