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

# Get API Keys

Use this API to retrieve a list of API keys for a workspace.

> [!NOTE]
>
> This endpoint uses **workspace-level auth**: pass `x-velt-workspace-id` and `x-velt-workspace-auth-token` (from the Create Workspace response) as headers.

# Endpoint

`POST https://api.velt.dev/v2/workspace/apikeys/get`

# Headers

**x-velt-workspace-id** `string` *required*

Your Workspace ID.

**x-velt-workspace-auth-token** `string` *required*

Your workspace [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

#### Params

**data** `object`

**properties**

**apiKeys** `string[]`

Filter results to specific API key IDs.

**pageSize** `number`

Number of results per page. Max `100`. Defaults to `100`.

**pageToken** `string`

Pagination token from a previous response to fetch the next page.

# Example Request

```JSON theme={null}
{
  "data": {
    "pageSize": 50
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "API keys retrieved successfully.",
    "data": [
      {
        "id": "velt_api_key_1",
        "apiKeyName": "Production Key",
        "type": "production"
      },
      {
        "id": "velt_api_key_2",
        "apiKeyName": "Testing Key",
        "type": "testing"
      }
    ],
    "nextPageToken": "eyJsYXN0SWQiOiJ2ZWx0X2FwaV9rZXlfMiJ9"
  }
}
```

> [!NOTE]
>
> If there are more results, the response includes a `nextPageToken` string. Pass this value as `pageToken` in your next request to fetch the next page. When no `nextPageToken` is returned, you have reached the last page.

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "PERMISSION_DENIED",
    "message": "Invalid workspace credentials."
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "API keys retrieved successfully.",
    "data": [
      {
        "id": "velt_api_key_1",
        "apiKeyName": "Production Key",
        "type": "production"
      },
      {
        "id": "velt_api_key_2",
        "apiKeyName": "Testing Key",
        "type": "testing"
      }
    ],
    "nextPageToken": "eyJsYXN0SWQiOiJ2ZWx0X2FwaV9rZXlfMiJ9"
  }
}
```


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