# API Documentation

> The guide to an API. It lists each endpoint, what to send and what comes back.

**Field:** Software Development  
**Category:** APIs  
**Also known as:** API Docs, API Reference, API Reference Docs

## Think of it like

Think of it like the menu in a cafe. It lists every dish, what is in it and what it costs.

## Definition

API documentation explains how to use an API. It lists each endpoint, what to send and what comes back. It shows the error codes and what each one means. Good docs have examples you can copy and try. Many are made from an OpenAPI file, so they stay in step with the code.

## Example

Jack reads the docs for a weather API. In ten minutes he finds how to get the forecast, and he copies the sample.

## Why it matters

An API is only as useful as its docs. If people cannot learn it, they will not use it.

## Common mistake

Writing docs once and never again. Out-of-date docs send people down wrong paths.

## Three principles

- **Every endpoint.** What to send and what returns.
- **Real examples.** Code people can copy and run.
- **Kept in step.** Generate it from the spec.

## Related terms

- [OpenAPI Specification](https://learn.benibix.com/term/development/openapi)
- [Application Programming Interface (API)](https://learn.benibix.com/term/development/api)
- [API Endpoint](https://learn.benibix.com/term/development/endpoint)
- [Third-Party API](https://learn.benibix.com/term/development/third-party-api)
- [API Error Response](https://learn.benibix.com/term/development/error-response)

## Told apart from

- [OpenAPI vs API Documentation](https://learn.benibix.com/compare/openapi-vs-api-documentation): People think OpenAPI is the docs page, and it is not. OpenAPI is one file that lists each path and reply in a fixed shape, so tools can read it. API docs are the guide people read. A docs page is often built from that file, plus words a person wrote.

![Your app on the left calls a third-party API on the right, run by another company, for example a weather service. Between them sits the API documentation, lit up, open like a book: it lists the endpoints, what to send, what comes back and the error codes. Under your app, an SDK box shows ready-made code that makes the calls for you.](https://learn.benibix.com/diagrams/dev3-api-use.svg)

---

Source: https://learn.benibix.com/term/development/api-documentation
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
