---
title: "Get API key"
method: GET
path: "/api/v1/api-keys/{api_key_id}"
tags: ["api-keys"]
---

# Get API key

`GET /api/v1/api-keys/{api_key_id}`

Get an API key by ID.

Returns the API key with masked key_prefix (never the full key).

RLS: Filtered to current client (ClientRLSDB).

Raises:
    ApiKeyNotFoundError: If key doesn't exist (404)

## Path parameters

- `api_key_id` string, uuid, required

## Response `200`

Successful Response

- ApiKeyResponse — Response model for API key (masked).
  - `created_at` string, date-time, required — Creation timestamp
  - `description` string, nullable, required — Optional description
  - `expires_at` string, date-time, nullable, required — Expiration datetime
  - `id` string, uuid, required — API key UUID
  - `key_prefix` string, required — Key prefix for display (e.g., kat_live_7kD9...)
  - `last_used_at` string, date-time, nullable, required — Last usage timestamp
  - `name` string, required — API key name
  - `scopes` string[], required — Granted scopes
  - `status` 'active' | 'revoked' | 'expired', required — Status of an API key.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error

## Changes

- **2026-01-29** `5f4f08ff6556` — 1 warning, 4 info
  - removed the optional property `detail` from the response with the `422` status
  - added the optional property `errors` to the response with the `422` status
  - added the required property `code` to the response with the `422` status
  - added the required property `message` to the response with the `422` status
  - …1 more

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

---

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