---
title: "List API tokens"
method: GET
path: "/api/api_tokens"
tags: ["API Tokens"]
---

# List API tokens

`GET /api/api_tokens`

Returns all API tokens visible to the current API token.

## Response `200`

List of API tokens

- ApiToken[]
  - `id` integer — API token ID
  - `name` string — Token display name
  - `last_4_digits` string — Last 4 characters of the token (full token is only shown on create or reset)
  - `created_by` string — Name of the user or token that created this token
  - `expires_at` string, date-time, nullable — When the token expires (ISO 8601); null if the token does not expire
  - `resources` ResourcePermission[] — Permissions granted to this token
    - `resource_type` 'account' | 'project' | 'sandbox' | 'domain' — Resource type for this permission
    - `resource_id` union — Resource identifier
      - integer
      - string
    - `access_level` 10 | 100 — 10 = viewer, 100 = admin.

## Other responses

- `401` — Returns unauthorized error message. Check your credentials.

---

[API](https://skmtc.dev/mailtrap/apis/account-management.md) · [All operations](https://skmtc.dev/mailtrap/apis/account-management/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mailtrap/account-management/revisions/eacf310ba121/schema)
