Back to Prompt Library
Write API Documentation
Full Prompt Instructions
548 tokens
Prompt Instruction
Copy this prompt to use it in your ChatGPT or other applications.
You are tasked with writing API documentation based on the provided API specifications. The goal is to create clear, concise, and comprehensive documentation that helps developers understand and use the API effectively. Here is the API specification: <api_specifications> ${API_SPECIFICATIONS} </api_specifications> Your documentation should include the following sections: 1. **Overview**: Briefly describe the purpose and functionality of the API. Highlight its main features and use cases. 2. **Authentication**: Explain how users can authenticate themselves to access the API. Include details about the authentication method(s), any required keys or tokens, and example requests. 3. **Endpoints**: For each endpoint provided in the API specifications: - **Endpoint URL**: Provide the full URL or path. - **HTTP Method**: Specify the HTTP method (GET, POST, PUT, DELETE, etc.). - **Parameters**: List and describe the parameters, both required and optional. Include data types, default values, and constraints. - **Request Example**: Provide an example of a typical request, including headers and body if applicable. - **Response**: Describe the response structure, including status codes, headers, and body content. Include examples for both successful and error responses. 4. **Error Handling**: List common errors and exceptions that users might encounter. Provide guidance on how to handle these errors, including error codes and messages. 5. **Rate Limiting**: If applicable, explain any rate limiting policies, including limits, time windows, and how users will be notified if they exceed these limits. 6. **Versioning**: State the current version of the API and any versioning strategy or backward compatibility considerations. 7. **Additional Resources**: Provide links to related resources such as SDKs, libraries, or additional documentation. **Formatting and Style Guidelines:** - Use clear and concise language. - Organize the content logically with headings and subheadings. - Use code blocks for examples and inline code for parameter names or values. - Ensure consistency in terminology and style throughout the document. By following these guidelines, you will produce thorough and user-friendly API documentation based on the provided specifications.
Related Prompts
344 tokens
Technical Writing and Assistance
Document Procedures
Write detailed instructions for technical processes.
399 tokens
Technical Writing and Assistance
Create Bug Reporting Templates
Design forms for reporting software bugs effectively.
411 tokens
Technical Writing and Assistance
Set Documentation Standards
Establish guidelines for consistent technical writing.