---
title: "List API Keys"
api: "GET /v1/api/keys"
description: "Retrieve all API keys for the authenticated user."
---

## Headers
<ParamField header="x-workspace-id" type="string" required>
The unique identifier of the workspace being accessed.
</ParamField>

## Response Fields

<ResponseField name="keys" type="array">
Array of API key objects.

<ResponseField name="_id" type="string">
Unique identifier for the API key.
</ResponseField>

<ResponseField name="key" type="string">
The API key (partially masked for security).
</ResponseField>

<ResponseField name="userId" type="string">
User ID associated with the API key.
</ResponseField>

<ResponseField name="metadata" type="object">
Metadata associated with the API key.
</ResponseField>

<ResponseField name="createdAt" type="string">
Timestamp when the API key was created.
</ResponseField>

</ResponseField>

<ResponseExample>
```json
[
  {
    "_id": "665a1b2c3d4e5f6a7b8c9d0e",
    "key": "tk_a1b2****o5p6",
    "userId": "664a1b2c3d4e5f6a7b8c9d0e",
    "metadata": {},
    "createdAt": "2024-06-01T09:00:00.000Z"
  }
]
```
</ResponseExample>
