---
title: "List the workspace's API keys"
method: GET
path: "/api/v1/account/keys"
tags: ["Account"]
---

# List the workspace's API keys

`GET /api/v1/account/keys`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/account/keys`
- Auth: HTTP bearer

Lists the active workspace's API keys, with each key's secret, so a key can be copied again later. Needs an `admin` key, or a signed-in workspace Owner or Admin.

Without `limit`, every key comes back, newest first. With `limit`, keys come back oldest first so a page never shifts while you read it, and `nextCursor` says whether more remain.

## Query parameters

- `limit` integer
- `cursor` string

## Headers

- `X-Dotsy-Workspace` string

## Response `200`

The keys.

- ApiKeyList
  - `keys` ApiKey[], required
    - `id` string, required
    - `label` string, nullable, required
    - `scope` 'read' | 'write' | 'admin', required
    - `siteSlugs` string[], nullable, required: The sites the key is limited to, or null for all sites.
    - `createdAt` number, required: Creation time, Unix ms.
    - `secret` string, nullable, required: The key itself (`pga_…`). Null for an old key whose secret was never stored.
  - `nextCursor` string, nullable: Present only when the request sent `limit`. Pass it as `cursor` (with the same `limit`) for the next page; null on the last page.

## Other responses

- `400`: `invalid_cursor`: the `cursor` is not one this API returned. Restart the listing without it.
- `401`: Missing or invalid credentials.
- `403`: `admin_required`: the key's scope is not `admin`. `workspace_admin_required`: you are a workspace Member, and only an Owner or Admin can manage keys. `guest_only`: this account can't create keys. `guest_requires_account`: a guest token can't manage keys.
- `500`: `auth_secret_missing`: the server has no signing secret configured, so stored secrets can't be read.

---

[API](https://skmtc.dev/dotsy/apis/dotsy-api.md) · [All operations](https://skmtc.dev/dotsy/apis/dotsy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dotsy/apis/dotsy-api/revisions/4272ed3b85d7?raw)
