API Documentation and Developer Guide Writer
Write clear, developer-friendly API documentation with endpoints, code examples, authentication guides, and error handling references.
Prompt Template
You are a senior technical writer specializing in developer documentation. Create comprehensive, developer-friendly API documentation for the following API. **API name:** [e.g., Acme Payments API] **API type:** [e.g., REST, GraphQL, gRPC] **Base URL:** [e.g., https://api.acme.com/v2] **Authentication:** [e.g., API key in header, OAuth 2.0, JWT bearer token] **Primary use cases:** [e.g., process payments, manage subscriptions, handle refunds] **Target developers:** [e.g., full-stack devs integrating payments, mostly Node.js and Python] **Endpoints to document:** [list 3-5 key endpoints with brief descriptions] Create documentation that includes: 1. **Getting Started Guide** — from zero to first successful API call in under 5 minutes 2. **Authentication Section** — step-by-step auth setup with code examples in 3 languages 3. **Endpoint Reference** — for each endpoint: HTTP method, path, description, parameters, request/response examples, rate limits 4. **Error Reference** — complete error code table with HTTP status, error code, message, and resolution 5. **Webhooks Section** — event types, payload schemas, verification, retry logic 6. **Code Examples** — complete working examples in Node.js, Python, and curl 7. **Best Practices** — idempotency, pagination, rate limit handling, error retry strategies Use a clear, scannable format with code blocks, tables, and callout boxes.
Example Output
# Acme Payments API Documentation
Getting Started
1. Get your API key
Sign up at dashboard.acme.com and copy your test API key from Settings > API Keys.
2. Make your first call
curl https://api.acme.com/v2/payments \
-H "Authorization: Bearer sk_test_abc123" \
-H "Content-Type: application/json" \
-d '{"amount": 2500, "currency": "usd", "customer_id": "cus_001"}'
Response (201 Created):
{
"id": "pay_1a2b3c",
"amount": 2500,
"currency": "usd",
"status": "succeeded",
"created_at": "2026-03-15T10:30:00Z"
}
Endpoint Reference
POST /payments
Create a new payment.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| amount | integer | Yes | Amount in cents |
| currency | string | Yes | ISO 4217 currency code |
| customer_id | string | Yes | Customer identifier |
| idempotency_key | string | No | Unique key to prevent duplicate charges |
> Warning: Always send an idempotency_key for payment creation.
Error Reference
| HTTP Status | Error Code | Message | Resolution |
|------------|-----------|---------|------------|
| 400 | invalid_amount | Amount must be positive integer | Check amount is > 0 and in cents |
| 401 | invalid_api_key | API key not recognized | Verify key in dashboard |
| 429 | rate_limited | Too many requests | Wait and retry with exponential backoff |
Tips for Best Results
- 💡Lead with a working curl example — developers want to see a successful call before reading anything
- 💡Use realistic data in examples, not foo and bar — it helps developers understand expected formats
- 💡Document error responses as thoroughly as success responses — that is where developers spend most time
- 💡Include idempotency key guidance for any endpoint that creates or modifies resources
Related Prompts
Technical Blog Post for Developer Audience
Write a technical blog post with code examples, architecture diagrams, and practical implementation details that developers will actually read and share.
Blog Post Outline & Draft
Generate a structured blog post with SEO-optimized outline, compelling intro, and complete first draft.
Cover Letter Tailored to Job Posting
Create a personalized cover letter that matches your experience to the specific job requirements.