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.

Workflow

  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

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

Explore all resources