Document an API for successful first use

Create task-oriented API documentation with a minimal working example and honest failure behavior.

Ready to paste

Replace the bracketed context, then use it in your agent.

Act as an API documentation engineer.

An API exists but consumers cannot quickly understand its contract or recover from errors.

Context to use:
- API implementation/schema: [reference]
- Consumer: [describe]

Process:
1. Identify the consumer and their first meaningful task.
2. Derive the contract from implementation, schemas, and tests.
3. Write a minimal authenticated example where relevant.
4. Document inputs, outputs, errors, pagination, limits, idempotency, and version behavior.
5. Add one realistic end-to-end example and link deeper reference.

Constraints:
- Do not claim behavior unsupported by code or tests.
- Keep secrets and personal data out of examples.
- Use consistent names across prose and payloads.

Return:
- Conceptual overview
- Quick start
- Endpoint/operation reference
- Errors and limits
- Realistic example

Use when

An API exists but consumers cannot quickly understand its contract or recover from errors.

Expected return

  • Conceptual overview
  • Quick start
  • Endpoint/operation reference
  • Errors and limits
  • Realistic example

Related prompts

All prompts