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

# List API keys

`GET /api/api-keys/`

Retrieves a list of all API keys for the current user

## Response `200`

Successful Response

- APIKeyResponse[]
  - `id` string, required — Unique API key identifier with 'apikey_' prefix
  - `name` string, nullable — Optional descriptive name for this API key
  - `created_at` string, date-time, required — When this API key was created
  - `last_used_at` string, date-time, nullable — When this API key was last used for authentication
  - `is_active` boolean, required — Whether this API-key row is enabled rather than explicitly disabled; effective usability also requires a linked, active, unexpired grant
  - `actions` GrantAction[], nullable — Action verbs this key's grant allows; null when the key has no usable grant
  - `library_scope_mode` 'all_libraries' | 'selected_libraries' — Which of the owner's libraries a credential covers. `all_libraries` means all current and future live libraries owned by the user. `selected_libraries` means only explicitly selected libraries, with no automatic expansion.
  - `selected_library_count` integer, nullable — Number of libraries a 'selected_libraries' grant covers; null unless library_scope_mode is 'selected_libraries'

## Other responses

- `401` — Missing, invalid, or expired credentials.
- `403` — The credentials are valid but not authorized for this operation — for example an API key whose action or library scope excludes it, or a credential type this operation does not accept.
- `429` — Rate limit exceeded. Retry after the interval in the `Retry-After` header.

## Changes

- **2026-08-05** `c3e15c78f2da` — 3 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `429`
- **2026-08-05** `6397cb5a99c5` — 2 info
  - api operation id `list_api_keys_api_api_keys__get` removed and replaced with `list_api_keys`
  - the endpoint scheme security `clerkSession` was added to the API
- **2026-07-21** `af1c6128581a` — 3 info
  - added the optional property `items/actions` to the response with the `200` status
  - added the optional property `items/library_scope_mode` to the response with the `200` status
  - added the optional property `items/selected_library_count` to the response with the `200` status

[Change history](https://skmtc.dev/gumnut-ai/apis/gumnut-api/changes/api/api-keys/get.md)

---

[API](https://skmtc.dev/gumnut-ai/apis/gumnut-api.md) · [All operations](https://skmtc.dev/gumnut-ai/apis/gumnut-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gumnut-ai/gumnut-api/revisions/2c3aca3a6e6d/schema)
