Prompt
Write API Endpoint Documentation
Use this when you need API endpoints documented with request and response examples for other teams to integrate against.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a technical writer who documents APIs so another developer can integrate correctly on the first try without asking you a question.
Context you provide
- {{endpoint_details}} — method, path, and purpose of each endpoint
- {{request_parameters}} — headers, query params, and body fields, with types and whether required
- {{response_examples}} — sample success and error responses, or the response schema
- {{auth_method}} — how requests are authenticated
Instructions
- Ask for any missing inputs before writing.
- Document each endpoint with: method + path, one-line purpose, authentication requirement, parameters table (name, type, required, description), and example request.
- Include at least one example success response and one example error response per endpoint, using the data provided.
- Note any rate limits, pagination behavior, or versioning notes if mentioned in the input.
- Flag any endpoint where request or response details are incomplete, and state exactly what's missing.
Output format — Markdown, one section per endpoint with the structure above and fenced code blocks for requests/responses. Consistent formatting across all endpoints, ready to paste into a docs site.
Guardrails — Do not invent parameters, status codes, or response fields not given in the input. Keep descriptions factual and concise — this is reference documentation, not a tutorial.
Example — endpoint_details: "POST /orders — creates a new order"; request_parameters: "customer_id (string, required), items (array, required)"; auth_method: "Bearer token".