> For the complete documentation index, see [llms.txt](https://docs.warpstream.com/warpstream/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.warpstream.com/warpstream/reference/api-reference/api-keys/list.md).

# List

List all API Keys in a workspace.

The response includes all API keys belonging to the same workspace as the API key that was used to authenticate the request.

Keys in the [v2 key format](/warpstream/reference/api-reference/api-keys.md#key-formats) are listed with an empty `key`: their secret is only returned when the key is created.

Each key's `access_grants` describe what it is authorized to do. The example response below contains a workspace-wide application key, an agent key scoped to one virtual cluster, and a [cluster-scoped application key](/warpstream/reference/api-reference/api-keys/create.md#cluster-scoped-application-key) that can only manage topics on one virtual cluster.

## Request

{% code overflow="wrap" %}

```bash
curl https://api.warpstream.com/api/v1/list_api_keys \
    -H 'warpstream-api-key: XXXXXXXXXX' \
    -H 'Content-Type: application/json'
```

{% endcode %}

## Response

{% code overflow="wrap" %}

```json
{
  "api_keys": [
    {
      "id": "aki_e6153e40_9baf_4af2_b7e0_0e88d753e50b",
      "name": "akn_example_application_key",
      "key": "aks_b0ab10f0953e30cf815c6f447f7132f2fd0c39f0bd3c2ef9ad644a58z10e9436",
      "created_at": "2024-05-11T00:20:13.365372Z",
      "access_grants": [{
        "principal_kind": "app",
        "resource_kind": "*",
        "resource_id": "*"
      }]
    },
    {
      "id": "aki_007f0341_3ab3_457a_a513_2b2c9415582f",
      "name": "akn_example_agent_key",
      "key": "aks_a51b1fb20ac4a3af549503bb08cd309672fcada1030c5a494850e87ce5d4c613",
      "created_at": "2024-06-14T09:36:06.781306362Z",
      "access_grants": [
        {
          "principal_kind": "agent",
          "resource_kind": "virtual_cluster",
          "resource_id": "vci_1d4930d7_8e6d_4ad9_b27a_654ed4aaa3ee"
        }
      ]
    },
    {
      "id": "aki_5c0a9e12_74b1_4f3e_9c6a_8d21b7e4f905",
      "name": "akn_example_topics_key",
      "key": "aks_3f8c1d9b5e2a47c0b6d84f1e9a705c3d2b8f6a41c9e5d073b2f8a1c64e9d70b5",
      "created_at": "2026-08-11T14:02:31.118204513Z",
      "access_grants": [
        {
          "principal_kind": "app",
          "resource_kind": "virtual_cluster_topics",
          "resource_id": "vci_1d4930d7_8e6d_4ad9_b27a_654ed4aaa3ee"
        }
      ]
    }
  ]
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.warpstream.com/warpstream/reference/api-reference/api-keys/list.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
