# List API keys

```javascript JavaScript theme={null}
// Requires Node.js SDK v8.2.0 or later
import { AdminClient } from '@pinecone-database/pinecone';

// Reads PINECONE_CLIENT_ID and PINECONE_CLIENT_SECRET from the environment
const admin = new AdminClient();

const { data: apiKeys } = await admin.apiKeys.list('YOUR_PROJECT_ID');
console.log(apiKeys);
```

```go Go theme={null}
// Requires Go SDK v6.0.0 or later
package main

import (
    "context"
    "fmt"
    "log"
    "os"

    "github.com/pinecone-io/go-pinecone/v6/pinecone"
)

func main() {
    ctx := context.Background()

    adminClient, err := pinecone.NewAdminClientWithContext(ctx, pinecone.NewAdminClientParams{
        ClientId:     os.Getenv("PINECONE_CLIENT_ID"),
        ClientSecret: os.Getenv("PINECONE_CLIENT_SECRET"),
    })
    if err != nil {
        log.Fatalf("Failed to create AdminClient: %v", err)
    }

    apiKeys, err := adminClient.APIKey.List(ctx, "YOUR_PROJECT_ID")
    if err != nil {
        log.Fatalf("Failed to list API keys: %v", err)
    }
    for _, apiKey := range apiKeys {
        fmt.Printf("API key: %v (%v)\n", apiKey.Name, apiKey.Id)
    }
}
```

```bash curl theme={null}
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_PROJECT_ID="YOUR_PROJECT_ID"

curl -X GET "https://api.pinecone.io/admin/projects/$PINECONE_PROJECT_ID/api-keys" \
    -H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
    -H "X-Pinecone-Api-Version: 2026-04"
```

```json curl theme={null}
{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "roles": [
        "ProjectEditor"
      ]
    }
  ]
}
```

**GET** `/admin/projects/{project_id}/api-keys`

:::code-group
```bash title="cURL"
curl --request GET \
  --url https://api.pinecone.io/admin/projects/{project_id}/api-keys \
  --header 'Authorization: Bearer <token>'
```

```json title="200"
{
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "project_id": "<string>",
      "roles": [
        "ProjectEditor"
      ]
    }
  ]
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Path Parameters

- `project_id` (path, string, required) — Project ID

## Headers

- `X-Pinecone-Api-Version` (header, string, required) — Required date-based version header

## Response

- `200` — A list of API keys.
- `401` — Unauthorized. Possible causes: Invalid API key.
- `500` — Internal server error.
- `4XX` — Unexpected error on request.

## Related pages

- [List API keys](./admin-2-2026-07-admin-api-keys-list-api-keys.md)
- [Create an API key](./admin-2-2026-07-admin-api-keys-create-an-api-key.md)
- [Get API key details](./admin-2-2026-07-admin-api-keys-get-api-key-details.md)
- [Delete an API key](./admin-2-2026-07-admin-api-keys-delete-an-api-key.md)
- [Update an API key](./admin-2-2026-07-admin-api-keys-update-an-api-key.md)
- [Create an API key](./admin-2-2026-04-admin-create-api-key.md)
- [Create an API key](./admin-2-2026-04-admin-assistant-create-api-key.md)
- [Get API key details](./admin-2-2026-04-admin-assistant-fetch-api-key.md)
- [Update an API key](./admin-2-2026-04-admin-assistant-update-api-key.md)
- [Delete an API key](./admin-2-2026-04-admin-assistant-delete-api-key.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
