---
title: "Get a specific API key by ID"
method: GET
path: "/api/api-keys/{api_key_id}"
tags: ["API Keys"]
---

# Get a specific API key by ID

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

# Errors
Returns error if API key not found, access denied, or database connection error

## Path parameters

- `api_key_id` string, uuid, required

## Response `200`

API key retrieved

- ApiKeyResponse — API response model for API keys (excludes sensitive hash)
  - `createdAt` string, date-time, nullable — When this API key was originally created
  - `expiresAt` string, date-time, nullable — Expiration timestamp after which key becomes invalid
  - `id` string, uuid, required — Unique identifier for this API key in responses
  - `isActive` boolean, required — Current activation status of this API key
  - `keyPrefix` string, required — Key prefix for visual identification in API key lists
  - `lastUsedAt` string, date-time, nullable — Timestamp when the key was last used
  - `name` string, required — Descriptive name for this API key
  - `permissions` string[], required — Permissions granted to this API key for resource access
  - `updatedAt` string, date-time, nullable — API key last update timestamp
  - `userId` string, uuid, required — Owner user identifier

## Other responses

- `401` — Authentication required to view API keys
- `403` — Access denied - API key belongs to different user
- `404` — API key not found or access denied
- `500` — Server error during API key retrieval

---

[API](https://skmtc.net/patroninc/apis/patron-api.md) · [All operations](https://skmtc.net/patroninc/apis/patron-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/patroninc/patron-api/versions/1583b1f4c97d/schema)
