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

# List API Keys

> Lists the API keys of your team

```
GET /openapi/memorylake/admin/v1/api-keys
```

Lists the API keys of your team. Callers holding only own-scope read permission see just the keys they created.

<Note>
  **Permission required:** `service_account:read` (all keys) or `service_account:read` (your own keys only)

  * When `owner_principal_id` names another member: `service_account:read` (all keys)
</Note>

### Query Parameters

<ParamField query="page_size" type="integer" default="20">
  Number of items per page (1–100)
</ParamField>

<ParamField query="continuation_token" type="string">
  Token from the previous page. Opaque — do not construct or parse it.
</ParamField>

<ParamField query="name_fuzzy" type="string">
  Case-insensitive substring match on the key name
</ParamField>

<ParamField query="status" type="string">
  Only keys in this state (the status field). One of: `enabled`, `disabled`, `expired`.
</ParamField>

<ParamField query="owner_principal_id" type="string">
  Only keys owned by this member (owner.principal\_id). With permission to read only your own keys, any principal\_id other than yours is refused (403).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/api-keys' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### Response

<ResponseField name="data" type="object">
  <Expandable title="Load More Response API Key object">
    <ResponseField name="items" type="array">
      List of items in the current page

      <Expandable title="API Key object">
        <ResponseField name="allowed_ips" type="array">Client IPs or CIDR ranges this key may be used from. Empty array = no restriction.</ResponseField>
        <ResponseField name="created_at" type="integer">Creation time, Unix seconds</ResponseField>
        <ResponseField name="id" type="string">Stable identifier of this API key</ResponseField>
        <ResponseField name="is_system" type="boolean">true for keys the platform created for its own use (for example the console playground)</ResponseField>
        <ResponseField name="key_prefix" type="string">First 8 characters of the key body. The full key is never returned by read endpoints.</ResponseField>
        <ResponseField name="name" type="string">Display name</ResponseField>
        <ResponseField name="status" type="string">Current state of the key. One of: `enabled`, `disabled`, `expired`.</ResponseField>
        <ResponseField name="backup_group" type="string">Fallback model-routing group. Omitted = none.</ResponseField>
        <ResponseField name="expires_at" type="integer">Expiry time, Unix seconds. Omitted when the key never expires.</ResponseField>
        <ResponseField name="group" type="string">Model-routing group the key's requests use. Omitted = the owner's own group.</ResponseField>
        <ResponseField name="key_suffix" type="string">Last 4 characters of the key, to match a key someone holds without returning it. Omitted for keys whose plaintext is not retained.</ResponseField>
        <ResponseField name="last_used_at" type="integer">Time this key was last used, Unix seconds. APPROXIMATE — updates are throttled and may lag by up to one hour. Omitted when the key has never been used.</ResponseField>

        <ResponseField name="owner" type="object">
          Member this key acts as — its requests carry this member's permissions and usage is attributed to them. For a key issued to a virtual member, that member. Omitted when the account no longer exists.

          <Expandable title="API Key Owner object">
            <ResponseField name="display_name" type="string">Display name of the member</ResponseField>
            <ResponseField name="member_type" type="string">human = joined via invitation, virtual = managed identity created by an owner/admin</ResponseField>
            <ResponseField name="principal_id" type="string">principal\_id of the member (see GET /members)</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="continuation_token" type="string">Token to fetch the next page; absent on the last page</ResponseField>
    <ResponseField name="total" type="integer">Total number of items matching the filter across all pages; omitted when the count is unavailable</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Operation completed successfully",
    "data": {
      "items": [
        {
          "allowed_ips": [
            "example"
          ],
          "created_at": 1760000000,
          "id": "40c8c8eba1dca6d1ba4bd63384a16d3c",
          "is_system": true,
          "key_prefix": "f6e5d4c3",
          "name": "Example name",
          "status": "enabled",
          "backup_group": "example",
          "expires_at": 1760000000,
          "group": "example",
          "key_suffix": "b2a1",
          "last_used_at": 1760000000,
          "owner": {
            "display_name": "Alice",
            "member_type": "human",
            "principal_id": "61083f9552ae2ae6bd9105e4e2763c7b"
          }
        }
      ],
      "continuation_token": "eyJvZmZzZXQiOjIwfQ",
      "total": 1
    }
  }
  ```
</ResponseExample>

### Errors

Errors answer with `success: false`, a `message` and an `error_code`. See [Error Codes](/features/memorylake/api-reference/errors) for every code.

| Status | Meaning |
| - | - |
| `400` | A parameter or the body is invalid |
| `401` | The API key is missing, invalid, disabled or expired |
| `403` | The key is not allowed to do this |
| `422` | The body or a parameter failed validation |
| `429` | Too many requests. Wait for the time in `Retry-After` |
| `500` | Server-side error |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.