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

# List API keys

> GET /v1/api-keys — list the active API keys in your account. Secrets are never returned.

Return your account's active keys. Secrets are never included — only the prefix, last four characters, scope, and last-used time.

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

Keys are listed account-wide, so any valid key can enumerate the account's keys. Revoked keys are hidden, as are internal service keys (including the one authenticating this request) — you can't list or delete the credential you're currently using.

## Query parameters

<ParamField query="limit" type="integer">
  Page size, `1`–`100`.
</ParamField>

<ParamField query="cursor" type="string">
  The `nextCursor` from a previous response. See [Pagination](/api-reference/pagination).
</ParamField>

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.drin.run/v1/api-keys \
    -H "Authorization: Bearer $DRIN_API_KEY"
  ```

  ```typescript Node.js theme={null}
  import { DrinClient } from "@drin00/sdk";

  const drin = new DrinClient({ apiKey: process.env.DRIN_API_KEY });

  const { data } = await drin.apiKeys.list({ limit: 50 });

  for (const key of data) {
    console.log(key.name, key.keyPrefix, key.lastUsedAt);
  }
  ```
</CodeGroup>

## Response

A cursor page of key objects. `senderId` / `senderExternalId` are `null` for account-wide keys; `lastUsedAt` is `null` until the key has authenticated a request.

```json 200 OK theme={null}
{
  "data": [
    {
      "id": "ak_7Yq3Lm",
      "name": "production",
      "keyPrefix": "drin_a1b2c3d4e5f6",
      "last4": "1a2b",
      "senderId": null,
      "senderExternalId": null,
      "scopes": ["emails:send"],
      "lastUsedAt": "2026-06-02T09:41:00.000Z",
      "revokedAt": null,
      "createdAt": "2026-06-02T10:00:00.000Z"
    }
  ],
  "nextCursor": null
}
```

<Note>
  **Secrets stay secret.** The `secret` is only ever returned by [create](/api-reference/api-keys/create). The list shows `keyPrefix` and `last4` so you can identify a key without exposing it.
</Note>
