API Reference
The AMA2 API is a RESTful JSON API. All requests and responses useapplication/json unless otherwise noted.
Base URL
Authentication
Include your token in theAuthorization header:
Request Format
- All request bodies are JSON
- File uploads use
multipart/form-data - Query parameters use standard URL encoding
- UUIDs are in standard format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Response Format
Successful responses return the appropriate HTTP status code with a JSON body:Error Format
Errors return a JSON object withcode and message:
Common Error Codes
| Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid request body or parameters |
| 401 | UNAUTHORIZED | Missing or invalid authentication |
| 403 | FORBIDDEN | Insufficient permissions or plan |
| 404 | NOT_FOUND | Resource not found |
| 409 | CONFLICT | Resource already exists |
| 429 | RATE_LIMITED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |
Pagination
List endpoints support cursor-based pagination:| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor from previous response |
limit | integer | Items per page (default varies by endpoint) |
next_cursor field when more results are available.
