Prompt lesson · 22 prompts
API Documentation prompts for Technical Writers
22 ready-to-use prompts from our AI for Technical Writers course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
API Authentication Guide
Use this when you need to document the authentication methods for a specific API, including OAuth, API keys, JWT, or basic auth.
Role You are a technical writer specializing in API documentation. Your goal is to create clear, accurate guides for developers on how to authenticate with a given API.
Context you provide
- {{api_name}}: The name of the API (e.g., Stripe, GitHub API, Custom API).
- {{auth_methods}}: One or more authentication methods to cover (e.g., OAuth 2.0, API keys, JWT, Basic Auth). If not specified, cover the most common methods.
- {{programming_language}}: Optional – if you want code snippets in a specific language (e.g., Python, JavaScript, curl).
Instructions
- If the user hasn't specified the API name or preferred authentication methods, ask for them before starting.
- For each requested authentication method, provide a step-by-step explanation:
- What the method is and when to use it.
- How to obtain credentials (e.g., API keys, client ID/secret).
- How to include the credentials in requests (e.g., headers, parameters).
- A code snippet in the specified programming language (or generic HTTP examples if none specified).
- Highlight common pitfalls and best practices for each method (e.g., key rotation, token expiry, security).
- If multiple methods are covered, include a comparison table summarizing pros and cons.
Output format Present the guide in structured sections per method. Include a brief introduction, then method sections with headings. Use code blocks for snippets. Keep total length between 500–800 words. Write in a neutral, instructional tone.
Guardrails
- Only provide code snippets that follow official documentation; do not invent API endpoints or credentials.
- Flag any assumptions about the API (e.g., "This assumes the API supports OAuth 2.0 authorization code flow").
- Do not include security advice that could be misleading (e.g., storing keys in plaintext); always recommend secure storage.
Example
- api_name: "Acme Payments API"
- auth_methods: OAuth 2.0 (authorization code) and API keys.
- programming_language: Python.
Open this prompt Writing · Intermediate
API Authentication Guide
Use this when you need to create a comprehensive guide on API authentication methods and best practices.
Role You are a technical writer who creates clear, developer-focused documentation for API authentication.
Context you provide
- {{api_name}}: The name of the API you are documenting.
- {{auth_methods}}: The authentication methods to cover (e.g., OAuth 2.0, API keys, JWT, HMAC).
- {{examples}}: Any specific use cases or code examples to include.
Instructions
- If any required input is missing, ask for it before proceeding.
- Structure the guide with an introduction to authentication, then a section for each method, explaining how it works, when to use it, and step-by-step instructions.
- Include practical code examples for each method, using a common programming language (e.g., Python, JavaScript) unless specified otherwise.
- Add a section on best practices and common security pitfalls to avoid.
- Ensure the guide is accessible to developers with basic API knowledge.
Output format Provide a well-structured Markdown document with headings, subheadings, code blocks, and bullet points. Use clear, concise language. Include a table comparing the methods at the end.
Guardrails
- Do not invent API endpoints or credentials; use generic placeholders like 'your-api-key'.
- Flag any assumptions about the API's capabilities or the developer's environment.
- Stay focused on authentication and authorization, not broader API functionality.
Example API name: 'Acme API'; Auth methods: 'OAuth 2.0, API keys, JWT'.
Open this prompt Creating · Intermediate
API Change Log Creation
Use this when you need to document API updates and changes clearly for users and stakeholders.
Open this prompt Creating · Beginner
API Code Samples
Use this when you need to generate code examples in multiple programming languages to demonstrate API usage, including requests, error handling, authentication, and pagination.
Open this prompt Writing · Intermediate
API Data Model Documentation
Use this when you need to describe data models, request/response formats, and validation rules for an API.
Open this prompt Writing · Intermediate
API Documentation Template
Use this when you need a standardized, reusable template for API documentation across projects.
Open this prompt Creating · Intermediate
API Error Code Documentation
Use this when you need to create a comprehensive reference document for API error codes, including descriptions, causes, and troubleshooting steps.
Open this prompt Writing · Intermediate
API Error Handling Documentation
Use this when you need to document API error codes, messages, and troubleshooting steps for developers.
Open this prompt Creating · Intermediate
API Integration Guide Creation
Use this when you need to create a step-by-step integration guide for an API with a specific platform or framework.
Open this prompt Creating · Intermediate
API Overview and Introduction
Use this when you need to create a clear, audience-friendly introduction to an API, explaining its purpose, key features, and benefits.
Open this prompt Communication · Intermediate
API Performance Metrics Analysis
Use this when you need to analyze and document API performance metrics and provide optimization recommendations.
Open this prompt Analysis · Intermediate
API Security Best Practices Guide
Use this when you need to compile a comprehensive guide on securing API endpoints and data transmission.
Open this prompt Creating · Advanced
API Troubleshooting FAQ Compilation
Use this when you need to create a comprehensive FAQ and troubleshooting guide for common API issues.
Open this prompt Creating · Beginner
API Usage Examples Showcase
Use this when you need to provide real-world usage examples of an API across different industries or scenarios.
Open this prompt Creating · Beginner
API Versioning Guide
Use this when you need to create a comprehensive guide on API versioning, focusing on backward compatibility and change management.
Open this prompt Writing · Intermediate
Create API Support Documentation
Use this when you need to produce support and contact information materials for an API, including FAQs, troubleshooting guides, and escalation scripts.
Open this prompt Creating · Intermediate
Develop API Best Practices
Use this when you need to create a set of best practices for using an API effectively and efficiently.
Open this prompt Creating · Intermediate
Document API Rate Limits
Use this when you need to understand and document API rate limits, including monitoring, optimization, and error handling.
Open this prompt Writing · Intermediate
Document API Versioning Strategy
Use this when you need to document or create a comprehensive versioning strategy for an API, including handling changes, deprecation, and backward compatibility.
Open this prompt Writing · Intermediate
Endpoint Documentation
Use this when you need to create detailed documentation for API endpoints, including parameters, authentication, and example requests/responses.
Open this prompt Writing · Intermediate
Generate API Code Samples
Use this when you need to create code examples that demonstrate how to use an API in multiple programming languages.
Open this prompt Coding · Intermediate
Interactive API Documentation
Use this when you need to design or improve interactive API documentation that lets users test endpoints directly within the docs.
Open this prompt Planning · Advanced