Software Development
Coding
Documentation

Write API Endpoint Documentation

Generate clear developer-facing documentation for an API endpoint from its code or spec.

Universal

Use case

Use when shipping a new endpoint and you need docs before other developers (internal or external) can consume it.

Customize

Preview

Write developer documentation for this API endpoint:

```
{endpoint_code_or_spec}
```

Include: a one-sentence summary, the HTTP method and path, request parameters (name, type, required/optional, description), a sample request, possible response codes with what each means, and a sample success response. Use a level of detail appropriate for internal team (e.g. internal team vs. public API consumers). Do not invent parameters or behavior not present in the code/spec.

Usage guidance

The audience field changes a lot — internal docs can assume shared context that public API docs can't.

Example input

Endpoint: POST /api/orders — code creating an order from a cart. Audience: public API consumers (third-party integrators).

Example output

## Create Order\n\n`POST /api/orders`\n\nCreates a new order from the items in a cart...

Last updated Jan 1, 2026

Related prompts