The Prompt Library
CodingAPIs

Document Your API Endpoint

Write clear documentation for an API route including params and examples.

Select Model:

Prompt:

Please create comprehensive documentation for an API endpoint that follows best practices and is easy for developers to understand and implement. ENDPOINT DETAILS: - Path: [ENDPOINT_PATH] - Method: [HTTP_METHOD] - Purpose: [ENDPOINT_PURPOSE] - Version: [API_VERSION] REQUEST INFORMATION: - Path Parameters: [PATH_PARAMETERS] - Query Parameters: [QUERY_PARAMETERS] - Request Body: [REQUEST_BODY] - Headers: [REQUIRED_HEADERS] - Authentication: [AUTHENTICATION_REQUIREMENTS] RESPONSE INFORMATION: - Success Response: [SUCCESS_RESPONSE] - Error Responses: [ERROR_RESPONSES] - Status Codes: [RESPONSE_CODES] ADDITIONAL CONTEXT: - Rate Limits: [RATE_LIMITS] - Permissions: [PERMISSIONS] - Special Notes: [SPECIAL_CONSIDERATIONS] Please include: 1. ENDPOINT OVERVIEW - Clear description of functionality - Use cases and purpose - Key features and capabilities 2. REQUEST DETAILS - Complete URL format and structure - Parameter documentation: * Data types and formats * Required vs. optional * Validation rules * Default values - Request body schema with descriptions - Header requirements - Authentication details 3. RESPONSE DETAILS - Response structure and schema - Field descriptions and data types - Status codes and meanings - Error formats and codes - Pagination information (if applicable) 4. EXAMPLES - Request examples with multiple scenarios - Complete request examples with headers - Success response examples - Error response examples - Curl commands - Code snippets in common languages 5. ADDITIONAL INFORMATION - Rate limiting details - Security considerations - Performance notes - Common issues and solutions - Related endpoints Please format the documentation in a clean, structured way that could be included in API documentation systems like Swagger, Redoc, or a developer portal.

Related Prompts

Other prompts you might find useful

CodingAPIs

API Request Builder (GET/POST)

Generate example API requests with headers and parameters.

6 models availableView details
CodingAPIs

Explain API Response Structure

Interpret JSON or XML response and map it to data needs.

6 models availableView details
CodingAPIs

Write API Error Handling Logic

Create error handling logic for failed API responses.

6 models availableView details
CodingAPIs

Document Your API Endpoint

Write clear documentation for an API route including params and examples.

6 models availableView details