Download this template free
No sign-up needed. Word and Excel files also open in Google Docs, Google Sheets and Apple Pages/Numbers. Letter size (8.5 × 11 in).
[API Name] Documentation
Version [v1] · Last updated [date]
Overview
[What the API does and who it is for.]
Authentication
[Describe how to get and use credentials, e.g. send your API key in the Authorization header.]
Authorization: Bearer [YOUR_API_KEY]
Endpoint: [List items]
GET /[items]
[Short description of what the endpoint returns.]
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | [Number of results to return (default 20, max 100)] |
| cursor | string | No | [Cursor for the next page of results] |
Example request
curl https://api.example.com/v1/[items]?limit=2 \ -H "Authorization: Bearer [YOUR_API_KEY]"
Example response (200 OK)
{
"data": [
{ "id": "itm_123", "name": "[Example]", "created_at": "2027-03-01T12:00:00Z" }
],
"next_cursor": "[abc123]"
}Endpoint: [Create item]
POST /[items]
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | [Description] |
Errors
| Status code | Meaning | What to do |
|---|---|---|
| 400 | Bad request | Check required fields and formats |
| 401 | Unauthorized | Check your API key |
| 403 | Forbidden | Your key lacks permission for this action |
| 404 | Not found | Check the resource ID or URL |
| 429 | Too many requests | Slow down; retry after the time in the Retry-After header |
| 500 | Server error | Retry later; contact support if it continues |
Rate limits
[e.g. 100 requests per minute per API key. Limits are returned in X-RateLimit headers.]
Changelog
| Date | Version | Change |
|---|---|---|
Preview of the template. Highlighted [brackets] show text to replace.
How to document your API
- Start with a quick overview of what the API does, plus the base URL.
- Explain authentication first. It is the first thing every developer needs.
- Document each endpoint consistently: method and path, description, parameters, an example request and an example response.
- Use realistic examples that developers can copy and run.
- List every error code with guidance on what to do.
- State rate limits and versioning clearly.
- Keep a changelog so integrators know what has changed.
Tips for great API docs
- Show, don’t just tell. Copy-and-paste
curlexamples help developers get a first successful call in minutes. - Document edge cases, such as empty results, pagination and maximum values.
- Be consistent in naming, date formats (ISO 8601) and response shapes.
- Never include real API keys or customer data in examples.
- Test your examples to make sure they actually work.
Pair your API docs with a clear README for the repository.
Frequently asked questions
What should API documentation include?
An overview, base URL, authentication instructions, a reference for each endpoint (method, path, parameters, example request and response), error codes, rate limits, versioning and a changelog. Quick-start guides and SDK examples are valuable extras.
Should I use OpenAPI instead of writing docs by hand?
For larger APIs, an OpenAPI (formerly Swagger) specification is the standard. It can generate interactive reference docs automatically. This template is ideal for small APIs, internal services or as a structure for the human-written guides that accompany an OpenAPI reference.
How do I keep API docs up to date?
Keep docs in the same repository as the code, update them in the same pull request as API changes, and record changes in a changelog.
Related templates and guides
README Template
A clear README.md for any software project, with the sections developers look for first, ready to download as Markdown and drop into your repository.
TemplateProduct Requirements Document (PRD) Template
A lean PRD that aligns product, design and engineering on the problem, goals, users, requirements, scope and how success will be measured.
TemplateBug Report Template
A clear bug report format that gives developers everything they need to reproduce and fix a problem the first time.
TemplateWebsite Launch Checklist
Over 60 checks to run before, during and after launch, covering content, functionality, SEO, performance, accessibility, security and legal pages.