API Reference
API Reference
Complete reference for the Amarsia REST API — every endpoint, parameter, and response schema.
Base URL
https://api.amarsia.com/v1All endpoints are relative to this base URL. HTTPS is required.
Authentication
All requests must include a valid API key in the Authorization header:
Authorization: Bearer sk_live_...See Authentication for key types, scopes, and rotation.
Request format
- All request bodies must be JSON
- Set
Content-Type: application/jsononPOST,PUT, andPATCHrequests
Response format
All responses are JSON. Successful responses use an envelope with a data key. Error responses use an error key.
Success:
{
"data": { ... },
"meta": {
"requestId": "req_01j...",
"timestamp": "2025-01-01T00:00:00Z"
}
}Error:
{
"error": {
"code": "not_found",
"message": "The requested resource does not exist.",
"param": null
}
}HTTP status codes
| Code | Meaning |
|---|---|
200 | OK |
201 | Created |
204 | No content (successful delete) |
400 | Bad request |
401 | Authentication failed |
403 | Forbidden |
404 | Not found |
422 | Validation error |
429 | Rate limit exceeded |
500 | Internal server error |
Rate limits
The API allows 1,000 requests per minute per API key. Requests that exceed this limit receive a 429 response with a Retry-After header indicating how many milliseconds to wait.