Skip to main content
New: Deck Doctor. Upload your deck, get CPO-level feedback. 7-day free trial.
TemplateFREE⏱️ 90-120 minutes

API Design Specification Template

A structured API design spec template covering REST and GraphQL endpoints, versioning strategy, authentication, error handling, and pagination.

Updated 2026-03-04
API Design Specification
#1
#2
#3
#4
#5

Edit the values above to try it with your own data. Your changes are saved locally.

Get this template

Choose your preferred format. Google Sheets and Notion are free, no account needed.

Frequently Asked Questions

When should I use URL path versioning versus header-based versioning?+
URL path versioning (`/v1/resource`) is simpler for consumers to understand and easier to test in a browser or curl. Header-based versioning (`Accept: application/vnd.api+json; version=2`) is cleaner in URL design but harder to debug. For most product APIs with fewer than 1,000 consumers, URL path versioning is the practical choice. The [API-First Design glossary entry](/glossary/api-first-design) covers how versioning fits into the broader API design philosophy.
How do I decide between REST and GraphQL for a new API?+
Use REST when your consumers need simple CRUD operations on well-defined resources, when caching matters (REST uses HTTP caching natively), or when most consumers are external partners. Use [GraphQL](/glossary/graphql) when consumers need flexible queries across deeply nested relationships, when mobile bandwidth is a constraint (clients fetch exactly what they need), or when your internal frontend team is the primary consumer.
How detailed should error responses be?+
Detailed enough for the consumer to fix the problem without contacting support. Include a machine-readable code (for programmatic handling), a human-readable message (for debugging), field-level details (for form validation), and a documentation URL. Never expose internal stack traces or database errors in production responses.
Should list endpoints return total count?+
Include `total_count` only if your database can compute it efficiently. For large tables, `COUNT(*)` can be expensive. If you include it, document that the count may be approximate for large datasets. Always include `has_more` so consumers know whether to paginate, regardless of whether you include a total count.
How do I handle authentication for server-to-server versus user-facing API calls?+
Use API keys for server-to-server integrations where a specific user context is not needed. Use OAuth 2.0 with user tokens when the API call needs to act on behalf of a specific user. Document both flows clearly and ensure [rate limits](/glossary/rate-limiting) differ by auth type, since server-to-server integrations typically need higher throughput. ---

Explore More Templates

Browse our full library of PM templates, or generate a custom version with AI.