List API keys
Returns all API keys for the authenticated account. The full key secret is never included; only the `key_prefix` is shown.
Authorization
BearerAuth AuthorizationBearer <token>
API key passed as a Bearer token. Production keys start with
am_live_ and sandbox keys start with am_test_.
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://secureagentmail.com/api/v1/api_keys"{
"api_keys": [
{
"id": "key_a1b2c3",
"name": "Production Backend",
"key_prefix": "am_live_sk_abc1...",
"scopes": [
"inboxes:read",
"inboxes:write"
],
"last_used_at": "2026-02-25T14:30:00Z",
"created_at": "2026-02-25T08:00:00Z"
}
]
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key.",
"status": 401
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Please retry after 30 seconds.",
"status": 429
}
}List audit entries
Returns a paginated, reverse-chronological list of security and operational audit events. Results can be filtered by inbox, event type, severity, and time range.
Create API key
Creates a new API key with the specified name and scopes. The full key value is returned **only once** in the response; subsequent requests will only show the `key_prefix`.