Write API Documentation
Workflow for documenting REST API endpoints
CLAUDE.md
When documenting an API endpoint:
- State the endpoint: HTTP method, path, and a one-line description of what it does.
- Document request parameters: path params, query params, and request body with types and required/optional status.
- Provide a complete request example with realistic data.
- Document the success response: status code and response body with field descriptions.
- Document error responses: what status codes are returned and under what conditions.
- Provide a complete response example.
- Note any authentication or permission requirements.
- Note rate limits if applicable.
Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.