Skip to content

Create an API key

POST /api-keys

Create a new API key. The full token is returned once in the response — store it immediately.

FieldTypeRequiredDescription
namestringyesHuman-readable name (max 255 chars).
permissionenumyesfull_access or sending_access. See Authentication.
domain_iduuidnoScope the key to a single domain.
Terminal window
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"
}'
{
"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"
}