---
title: "Get User Api Key"
method: GET
path: "/api/user/api-keys/{key_id}"
tags: ["User"]
---

# Get User Api Key

`GET /api/user/api-keys/{key_id}`

## Request

- Base URL: `https://api.agentstack.tech` (the document declares no server; this is the origin it was published from)
- URL: `https://api.agentstack.tech/api/user/api-keys/{key_id}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Get a specific user API key

Returns information about a specific API key.
Use reveal_secret=true to get the full API key (only available once after creation/rotation).
When reveal_secret=true, returns RevealedUserAPIKeyResponse with api_key field.

## Path parameters

- `key_id` string, required

## Query parameters

- `reveal_secret` boolean: Return full API key secret when true

## Response `200`

Successful Response

- UserAPIKeyResponse
  - `key_id` string, required
  - `name` string, required
  - `created_at` string, nullable, required
  - `last_used_at` string, nullable, required
  - `expires_at` string, nullable, required
  - `status` string, required
  - `key_preview` string, nullable
  - `actor_kind` string, nullable
  - `resource_scope` object, nullable
  - `service_caps` string[], nullable
  - `preset` string, nullable
  - `pat_kind` string, nullable
  - `oauth_client_id` string, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Too Many Requests
- `500`: Internal Server Error

---

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