SecureAgentMail

List API keys

Returns all API keys for the authenticated account. The full key secret is never included; only the `key_prefix` is shown.

GET
/api_keys

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
  }
}