Create an API key
POST /api-keys
Create a new API key. The full token is returned once in the response — store it immediately.
Body parameters
Section titled “Body parameters”| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Human-readable name (max 255 chars). |
permission | enum | yes | full_access or sending_access. See Authentication. |
domain_id | uuid | no | Scope the key to a single domain. |
Example
Section titled “Example”curl -X POST https://mail.3ava.com/api/api-keys \ -H "Authorization: Bearer am_ADMIN_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "production-api", "permission": "sending_access" }'Response
Section titled “Response”{ "id": "key_a1b2...", "name": "production-api", "permission": "sending_access", "key_prefix": "am_HSjf", "token": "am_HSjfgnCqQ_...", "domain_id": null, "rate_limit": 50, "created_at": "2026-04-22T22:30:00Z"}