API Documentation
API documentation describes how developers interact with an API: its endpoints, parameters, authentication, error codes, and usage patterns. Good documentation reduces integration time and support load by making the contract discoverable and self-explanatory.
itTechnical communication and collaboration | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — API Documentation
An API is a contract: here is what you can ask for, here is what you get back. API documentation is everything that helps a real person turn that contract into a working request without emailing a stranger for help. That "everything" is the whole problem. It is tempting to believe the contract explains itself.
It doesn't, and the evidence is what people fall back on when nobody wrote anything better: a generated endpoint list, straight from the code, plus a support queue full of the questions the list didn't answer. A list of methods and paths names the operations. It does not tell you what permission each one needs, what its parameters actually accept, or how to tell when you've read the last page of a paginated result. Generating that list is nearly free. Everything that makes it usable is not.
The course organizes that "everything" around the reader's situation rather than around the API's own shape, because different readers arrive with different jobs. Someone evaluating the API wants to know if it fits. Someone starting out wants one safe success. Someone already working wants one exact fact, fast.
Four kinds of writing answer those jobs, and each has its own name: a guided first success, task-focused steps for someone who already has context, precise lookup material, and the "why" behind a design choice. Keep them apart and link between them. Collapse them into one page and you've built something that serves nobody well — the Cheatsheet tab lays out which one does which job.
Here's the part that surprises people who assume more automation solves this: an OpenAPI description — the machine-readable file that can generate your reference pages — is a source, not a finished product. It cannot decide what a new evaluator needs to know, write a safe getting-started path, or notice that an example stopped working.
The fix people reach for instead makes it worse, not better. Handing consumers a generated client library so they never touch raw HTTP doesn't remove the documentation burden; it relocates it. Now you're maintaining a wrapper's own method names and failure modes, in every language you shipped one for, on top of the API it wraps — one of several places the Field Notes tab shows the standard advice quietly costing more than it saves.
The second surprise is where failure documentation belongs. It is not a footnote after the happy path. 401, 403, 429, and friends are outcomes just as real as 200, and a reader who only sees the success case learns the failure modes by triggering them in production instead.
From here, the Practice Session turns the reference-page checklist into something you write yourself, against a small scenario with a right answer. The Quiz checks whether the reader-situation model actually stuck.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://diataxis.fr/start-here/
Supports
- Tutorials, how-to guides, reference, and explanation as four documentation types with distinct purposes
- Tutorials and explanation for study, with how-to guides and reference for work
- Reference structure reflecting the structure of the documented system
- https://diataxis.fr/tutorials/
Supports
- Tutorials as practical learning experiences with managed steps and a successful conclusion
- https://google.aip.dev/192
Supports
- Clear, complete, and unambiguous public API descriptions
- CommonMark formatting, cross-references, external links, and deprecation guidance for API comments
- Public comments for API components in the protocol buffer context covered by the standard
- https://developers.google.com/style/api-reference-comments
Supports
- Complete reference coverage for public types, members, methods, parameters, return values, and exceptions
- Concise purpose statements, usage guidance, prerequisites, pitfalls, and related APIs
- Short code samples near reference descriptions as a general recommendation
- https://developers.google.com/style/procedures
Supports
- Numbered, imperative, ordered steps for multi-step procedures
- Explicit context, goals, results, justifications, and optional-step labeling
- Referencing repeated procedures instead of duplicating them
- https://developers.google.com/style/code-samples
Supports
- Code sample formatting and introductory statements
- Language comments to indicate omitted code
- Language-specific style guidance and readable line length
- https://spec.openapis.org/oas/v3.2.0.html
Supports
- OpenAPI 3.2.0 as a language-independent description format for HTTP APIs
- Metadata, servers, paths, operations, parameters, request bodies, responses, schemas, examples, and security requirements
- External documentation links and tooling uses such as documentation generation, testing, routing, and client generation
- Specification text as authoritative when an informational schema disagrees or misses a violation
- https://spec.openapis.org/oas/
Supports
- Published OpenAPI specification versions and current schema revision guidance
- https://www.rfc-editor.org/rfc/rfc9110.html
Supports
- HTTP method, status code, representation, authentication challenge, validator, and conditional request semantics
- Meanings of 200, 201, 202, 204, 400, 401, 403, 404, and 409 status codes
- https://www.rfc-editor.org/rfc/rfc6585.html
Supports
- 429 Too Many Requests semantics and optional Retry-After guidance
- https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
Supports
- A maintained first-use path connecting authentication, headers, requests, responses, and follow-on tasks
- Complete request examples with token placeholders and API version headers
- https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
Supports
- Token acquisition choices, Authorization header placement, endpoint permissions, and authentication failures
- Explicit token placeholders in request examples
- https://docs.github.com/en/rest/authentication
Supports
- A canonical authentication collection linking credential use, credential security, and permission references
- https://docs.github.com/en/rest/authentication/keeping-your-api-credentials-secure
Supports
- Appropriate credential selection, limited permissions, secure storage, and remediation planning
- https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api
Supports
- Paginated result subsets, Link response headers, page-size controls, and traversal examples
- Endpoint-specific pagination query forms and link-driven navigation
- https://docs.github.com/en/rest/using-the-rest-api
Supports
- A real documentation collection connecting getting started, authentication, rate limits, pagination, best practices, and troubleshooting
- https://www.w3.org/TR/WCAG22/
Supports
- WCAG 2.2 as testable, technology-independent accessibility criteria for web content
- Text alternatives, programmatic structure, meaningful sequence, descriptive headings and labels, link purpose, keyboard access, and language identification
- https://swagger.io/open-source/swagger-ui/download/
Supports
- Swagger UI as an open-source renderer for interactive documentation generated from an OpenAPI description
- https://redocly.com/docs/redoc
Supports
- Redoc Community Edition as an open-source tool that builds web-ready documentation from OpenAPI descriptions
- https://scalar.com/products/api-references/getting-started
Supports
- Scalar API Reference as a renderer for OpenAPI and Swagger documents
- https://scalar.com/pricing
Supports
- Scalar API References as open-source MIT software and Scalar’s API documentation offering
- https://redocly.com/docs/cli/v1/api-docs
Supports
- Redocly API reference options for hosted documentation and open-source self-hosted documentation
- https://redocly.com/pricing
Supports
- Redocly paid documentation plans and their hosted documentation features
- https://bump.sh/pricing/
Supports
- Bump.sh documentation portal plans, OpenAPI support, documentation versioning, and release-management features
- https://docs.bump.sh/help/getting-started/concepts/
Supports
- Bump.sh processing of API definitions into documentation releases and changelogs
- https://www.w3.org/standards/history/wsdl
Supports
- WSDL 1.1 publication as a W3C Note on 15 March 2001
- https://www.w3.org/TR/wsdl
Supports
- WSDL 2.0 publication as a W3C Recommendation on 26 June 2007 and its abstract and concrete service-description model
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md
Supports
- Swagger Specification 1.0, Swagger 2.0, OpenAPI 3.0, and OpenAPI 3.1 release dates
- Swagger 2.0 donation to the OpenAPI Initiative
- https://www.openapis.org/blog/2016/07/11/you-can-get-involved-in-creating-the-openapi-specification-and-heres-how
Supports
- Swagger 2.0 donation, its OpenAPI name, and the neutral governance model for evolving the specification
- https://hilton.org.uk/blog/api-documentation-mistakes
Supports
- Documentation generated from an implementation can only restate current behavior and cannot state design intent, so implementation and documentation disagreements have no way to be resolved
- A client library is a second API that needs its own documentation and typically leaks the HTTP layer it wraps instead of hiding it
- Structuring reference documentation as a deeply nested hierarchy of URLs, paths, methods, and parameters optimizes for maintenance effort over reader usability
- https://kenneth.io/post/insights-from-building-stripes-developer-platform-and-api-developer-experience-part-1
Supports
- Request logs are an underrated developer-platform feature that let a developer compare an intended action against the request it actually produced
- Embedding links to request logs and the relevant documentation page directly in API error responses improves resource discoverability
- Inconsistent method names and return signatures across abstraction layers such as REST, a backend SDK, and a frontend SDK are a common and costly mistake
