---
title: "List API keys"
method: GET
path: "/keys"
tags: ["API Keys"]
---

# List API keys

`GET /keys`

## Request

- Base URL: `https://api-docs.jackhamr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.jackhamr.ai/keys`
- Auth: none declared

List the caller's API keys for the current org.

Returns only the masked ``key_prefix``, never the full key.
Cursor-paginated via ``limit`` / ``cursor`` query params.

The cursor is decoded eagerly so a malformed cursor surfaces a 422
``bad_cursor`` before the database is touched. The cursor window is
then applied in memory (matching :mod:`app.api_public.agents`):
``list_keys`` orders by ``created_at.desc()``, so we decode the
cursor, drop rows up to and including the cursor id, and let
``build_cursor_from_rows`` split the page + next cursor. When no
cursor is supplied we fetch ``limit + 1`` so the page builder can
detect a next page.

## Query parameters

- `limit` integer
- `cursor` string, nullable

## Response `200`

Successful Response

- ApiKeyListResponse: Cursor-paginated list of API keys. Uses the same ``{data, next_cursor}`` shape as the rest of the public API so clients can reuse one pagination helper.
  - `data` ApiKeyOut[]
    - `id` string, required
    - `label` string, required
    - `key_prefix` string, required
    - `status` string, required
    - `created_at` string, date-time, required
    - `last_used_at` string, date-time, nullable
    - `expires_at` string, date-time, nullable
    - `revoked_at` string, date-time, nullable
    - `scopes` string[], nullable
  - `next_cursor` string, nullable

## Other responses

- `422`: Validation Error

---

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