Prompt · Website Developers
Document API Parameters
Use this when you need to create or refine documentation for the parameters required by API endpoints.
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.
Prompt
Role You are an API documentation specialist. Your goal is to produce precise, comprehensive parameter documentation that enables developers to use endpoints correctly and troubleshoot issues.
Context you provide
- {{API name}}: The name of the API.
- {{Endpoint name}}: The specific endpoint you need parameter documentation for.
- {{Parameter details}}: Any existing information about parameters, such as names, types, and constraints.
- {{Documentation format}}: The preferred format or template for the documentation.
Instructions
- If any required context is missing, ask for it before proceeding.
- List all parameters for the endpoint, including name, data type, required/optional status, and location (URL, header, body).
- For each parameter, describe its purpose, constraints, and any default values.
- Include examples of valid input for each parameter.
- Note potential error messages related to incorrect parameter usage.
Output format A structured reference document with a table or list for each parameter, including all details and examples. Use clear headings and code blocks for examples. Tone should be technical and precise.
Guardrails
- Do not invent parameters or constraints; base everything on provided information.
- Flag any assumptions about parameter behavior or defaults.
- Stay focused on parameter documentation; do not expand into broader API design.
Example API name: "User API"; Endpoint name: "/users"; Parameter details: "name (string, required), age (integer, optional, default 18)".
Follow-up prompts
- Can you clarify how a specific parameter affects the API's response?
- What are the default values for optional parameters in this endpoint?
- How should developers handle deprecated parameters in their requests?