> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idem.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# List All API Keys and Their Scopes for Your Tenant

> GET /api/v1/api-keys — lists all API keys for your tenant. Raw key values are never returned. Requires ADMIN scope to protect key management.

Use this endpoint to retrieve all API keys that have been issued for your tenant. The response includes metadata for each key — such as its unique ID, assigned scopes, and creation timestamp — but never exposes the raw key value or its hash. If you need the raw key, you must create a new one and store it at creation time.

## Endpoint

```
GET /api/v1/api-keys
```

## Authorization

Requires an API key with `ADMIN` scope.

## Request Example

```bash theme={null}
curl --request GET \
  --url https://api.your-domain.com/api/v1/api-keys \
  --header 'Authorization: Bearer <api-key>'
```

## Response

A successful response returns an array of API key metadata objects. Raw key values and key hashes are never included.

<ResponseField name="id" type="string" required>
  Unique identifier (UUID) for the API key.
</ResponseField>

<ResponseField name="prefix" type="string" required>
  The first 12 characters of the raw key, shown once at creation time. Use this to identify which key is which without ever exposing the full value.
</ResponseField>

<ResponseField name="scopes" type="string[]" required>
  The list of permission scopes assigned to this key.
</ResponseField>

<ResponseField name="createdAt" type="string (datetime)" required>
  ISO 8601 timestamp of when the key was created.
</ResponseField>

<ResponseField name="revokedAt" type="string (datetime)">
  ISO 8601 timestamp of when the key was revoked. `null` for active keys.
</ResponseField>

## Response Example

```json theme={null}
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "prefix": "sk_live_a1b2",
    "scopes": ["TRANSACTIONS_READ", "ACCOUNTS_READ"],
    "createdAt": "2024-11-01T09:00:00Z",
    "revokedAt": null
  },
  {
    "id": "f9e8d7c6-b5a4-3210-fedc-ba9876543210",
    "prefix": "sk_live_f9e8",
    "scopes": ["ADMIN"],
    "createdAt": "2024-11-15T14:32:00Z",
    "revokedAt": null
  }
]
```

## Error Codes

| Code  | Meaning                                           |
| ----- | ------------------------------------------------- |
| `401` | Missing or invalid API key.                       |
| `403` | The provided API key does not have `ADMIN` scope. |
