API Reference
Explore our comprehensive API documentation and code examples.
Authentication
API Token Authentication
All API requests must include a valid Authorization header with a Bearer token.
Authorization: Bearer YOUR_API_TOKEN
Token Management
- Generate new tokens at Account Settings
- Tokens expire after 30 days of inactivity
Endpoints
GET
Retrieve user list
/api/v1/users
Parameters
Parameter | Type | Description |
---|---|---|
page | integer | Results page number |
per_page | integer | Items per page (1-100) |
Example Request
curl -X GET 'https://api.docsplatform.com/api/v1/users?page=1&per_page=20' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
POST
Create new project
/api/v1/projects
Request Body
{ "name": "string", "description": "string", "environment": "development" }
Example Request
curl -X POST 'https://api.docsplatform.com/api/v1/projects' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{"name": "My Project", "environment": "development"}'
Error Responses
Status | Description | Solution |
---|---|---|
401 Unauthorized | Invalid or missing API token | Include valid Authorization header |
404 Not Found | Requested resource does not exist | Verify resource ID or endpoint path |
500 Internal Server Error | Server encountered unexpected condition | Retry request or contact support |