Skip to content
Content Strategy

How to Get Writing API Documentation Right

Documentation that explains how developers use an API, including reference material, guides, examples and error handling.

MediaScaleUp Editorial Team 2 min read 14 views
How to Get Writing API Documentation Right

Why does it matter?

Developers judge APIs by their documentation, and incomplete docs slow adoption and increase support load.

What are the numbers?

  • Reference docs describe endpoints, parameters and responses
  • Guides explain tasks and concepts
  • Code samples should be tested and copyable
  • OpenAPI a standard format for describing HTTP APIs

What should I do?

  1. Document authentication first
  2. Provide working code samples
  3. Explain error codes and fixes
  4. Keep reference docs generated from source where possible
  5. Test docs with new developers
What to do and what to avoid with writing API documentation, side by side
Good practice against the usual mistakes, from the sources listed below.

What should I avoid?

Avoid:

  • Untested code samples
  • Missing error documentation
  • Reference docs without context
  • Outdated examples

When should I get help?

Short answer Bring in help when launching or opening an API.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Content Strategy work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading