Amarsia
API Reference

API Reference

Complete reference for the Amarsia REST API — every endpoint, parameter, and response schema.

Base URL

https://api.amarsia.com/v1

All 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/json on POST, PUT, and PATCH requests

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

CodeMeaning
200OK
201Created
204No content (successful delete)
400Bad request
401Authentication failed
403Forbidden
404Not found
422Validation error
429Rate limit exceeded
500Internal 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.

In this section