Engineering API Documentation Documentation

API Documentation Prompt

Overview, Authentication, Endpoints, Error Handling, Rate Limits — endpoint docs in an identical structure, with parameter tables and runnable examples forced.

Overview

API docs are the strictest documentation discipline: callers script against them, so structure drift is breakage. This setup documents API areas in five pinned sections under Strict consistency, with Required Tables (parameters and error codes as real tables, never prose) and Require Code Examples (every usage section carries a fenced, language-tagged, usable-as-written request example). Authentication gets its own section with an example — the part every integrator hunts for first.

How to use this resource

  1. One prompt per API area

    Feed each endpoint group below the prompt; every area returns the same skeleton.

  2. Check the tables

    Method, path, parameters, error codes — Required Tables keeps them scannable and diffable.

  3. Keep examples runnable

    "Usable as written" means an integrator can paste the example and get a response — the doc's real test.

Why This Works

  • Identical area docs let integrators navigate by habit
  • Parameter tables resist the prose-collapse that kills scanability
  • Strict mode treats structure as API surface — which, for docs, it is

Best for

  • APIs documented by many hands
  • Reference docs that integrators script against
  • Teams generating docs from endpoint descriptions

Not for

  • Machine-readable API specs (OpenAPI) — this writes human docs, not schemas
  • Defining the API's response format itself — that's the JSON Output Prompt Builder

Use cases

  • Documenting every API area in the same five sections
  • Forcing parameter lists into real tables
  • Giving authentication its own example-bearing section

FAQ

Which sections does the API documentation prompt lock in, and can I reorder or drop them?

The prompt pins exactly five '## ' sections in fixed order: Overview, Authentication, Endpoints, Error Handling, and Rate Limits, under a single '# ' title. Its consistency rules forbid reordering, merging, omitting a heading (even a short one), or rewording the exact heading text. If you need a different skeleton, edit the prompt in the Markdown Output Builder before you run it in ChatGPT, Claude, or Gemini.

How does the prompt stop endpoint parameters and error codes from turning into prose paragraphs?

The table rules force any comparison of items, options, or features into a real markdown table with a header row, separator row, and one row per item, so parameters and error codes stay diffable rather than collapsing into prose. Same columns apply to every row, with '—' filling cells that have no value. You still eyeball the generated tables for accuracy after running the prompt.

Why does the code rule reject '...' placeholders in the request examples it generates?

The code rules demand every behavior or usage section carry a fenced, language-tagged example that is 'usable as written' — no pseudo-code and no '...' placeholders — so an integrator can paste the Authentication or Endpoints example and get a real response. That is the doc's actual test. The prompt structures the request; you confirm the example truly runs against your live API.

More resources from Markdown Output Builder

Resources that pair well

Related tools

Projects that use this resource

Guides for this resource

Tip: Save time by exploring related resources and tools that integrate with this resource.