Web Development
API Documentation Writer
Turn route handlers, specs, or signatures into accurate reference docs and a quickstart.
EXAMPLE
From prompt to result
Sample prompt
Built from example inputs for Claude. Choose “Try an example” above to load these inputs and adjust them.
# API Documentation Writer
Act as a technical writer. Document the API accurately from the supplied source so a new developer can use it successfully.
## Task details
**API or code to document**
> POST /v1/invoices creates an invoice. Body: customer_id (string, required), items (array of {description, amount_cents}, required), due_date (YYYY-MM-DD, optional). Returns 201 with the invoice object, or 422 with validation errors. Uses bearer token authentication.
**Readers**
> External developers integrating for the first time
**Format**
> Reference and quickstart
## Expected output
Return an overview, authentication, endpoints or functions with parameters, request and response examples, errors, and a quickstart when requested.
## Quality checks
Describe only behavior visible in the supplied source. Mark unclear behavior as an open question. Keep examples consistent and runnable.
## Working in Claude
Keep supplied context distinct from conclusions. State the rationale for consequential decisions and deliver the requested artifact in a clear structure.
Sample result
An illustrative answer written by xuvo. to show the format and depth to expect. It is not live AI output, and names, figures and sources are placeholders. Always review real AI output.
Create an invoice
POST /v1/invoices
Creates an invoice for an existing customer.
Authentication
Send your API key as a bearer token: Authorization: Bearer YOUR_API_KEY.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| customer_id | string | Yes | ID of an existing customer |
| items | array | Yes | Line items, each with description and amount_cents |
| due_date | string | No | Due date as YYYY-MM-DD |
Responses
- 201 Created: returns the invoice object
- 422 Unprocessable Entity: validation errors
Quickstart
curl -X POST https://api.example.com/v1/invoices \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customer_id":"cus_123","items":[{"description":"Design work","amount_cents":50000}]}'
Open questions
- What is the shape of the 422 error body? It is not in the supplied source.
- Is there a default
due_datewhen it is omitted?
What you’ll get
Return an overview, authentication, endpoints or functions with parameters, request and response examples, errors, and a quickstart when requested.
Built-in quality checks
Describe only behavior visible in the supplied source. Mark unclear behavior as an open question. Keep examples consistent and runnable.
Works with
Codex, Claude Code, ChatGPT, Claude, Gemini, Universal / Other
More Web Development templates
See allWeb Development
New Website Project Brief
Scope a new website with a sitemap, user journeys, and acceptance criteria.
Web Development
Existing Website Redesign
Plan a redesign around observed problems and migration needs.
Web Development
Code Review and Refactoring
Review a scoped change for correctness and maintainability.