Good API Documentation:
Good API documentation allows any developer considering the API to quickly understand the purpose of the API, the data it works with, and how to send requests and parse the responses. Some documentation, particularly for large projects, even host samples you can run within the documentation to see the API in action.
The components are typically included in good API documentation:
- Introduction
- What is your API doing?
- What is it about?
- Why did you create it?
- Getting Started
- Base URL
- API Keys / Authentication (if applicable)
- Errors
- Response codes
- Messages
- Error types
- Resource endpoint library
- Organized by resource
- Include each endpoint
- Sample request
- Arguments including data types
- Response object including status codes and data types