API Reference
Complete reference for the REST API
The REST API provides programmatic access to all platform features.
Base URL
https://api.example.com/v1
Authentication
All API requests require a Bearer token:
curl https://api.example.com/v1/users \
-H "Authorization: Bearer YOUR_API_KEY"
Endpoints
Response Format
All responses return JSON:
{
"data": { ... },
"meta": {
"requestId": "req_abc123"
}
}
Error Handling
Errors include a code and message:
{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}
| Status | Description |
|---|---|
| 200 | Success |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Server error |
