For the complete documentation index, see llms.txt. This page is also available as Markdown.

List API tokens

Returns all API tokens visible to the current API token.

get
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Responses
200

List of API tokens

application/json
idinteger · int64Optional

API token ID

namestringOptional

Token display name

last_4_digitsstringOptional

Last 4 characters of the token (full token is only shown on create or reset)

created_bystringOptional

Name of the user or token that created this token

expires_atstring · date-time · nullableOptional

When the token expires (ISO 8601); null if the token does not expire

get/api/api_tokens
curl -X GET https://mailtrap.io/api/api_tokens \
  -H 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "id": 12345,
    "name": "My API Token",
    "last_4_digits": "x7k9",
    "created_by": "user@example.com",
    "expires_at": null,
    "resources": [
      {
        "resource_type": "account",
        "resource_id": 3229,
        "access_level": 100
      }
    ]
  }
]

Last updated

Was this helpful?