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

# Get API key

`GET /api-keys/{api_key_id}`

## Request

- Base URL: `https://api.aspect.inc`
- URL: `https://api.aspect.inc/api-keys/{api_key_id}`
- Auth: API key in header `Authorization`

Get details of a specific API key by ID.

Returns key metadata without the actual key value.

## Path parameters

- `api_key_id` string, uuid, required: The ID of the API key to retrieve

## Response `200`

Successful Response

- ApiKeyGetResponse: API response schema for getting API key metadata (no sensitive key value).
  - `id` string, uuid, required
  - `name` string, required
  - `key_prefix` string, required
  - `created` string, date-time, required
  - `last_used` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

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