---
title: "Get detail of one own API key (masked)"
method: GET
path: "/api/v1/api-keys/{key_id}"
tags: ["API Keys"]
---

# Get detail of one own API key (masked)

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

## Request

- Base URL: `https://api.hub-equity.com`
- URL: `https://api.hub-equity.com/api/v1/api-keys/{key_id}`
- Auth: HTTP bearer

Returns the metadata for one of your own API keys (prefix, scopes, plan override, environment, last-used, revocation status). The secret is never returned. Responds `404` if the key doesn't exist or isn't yours.

## Path parameters

- `key_id` string, uuid, required

## Response `200`

Successful Response

- ApiResponseApiKeyResponse
  - `success` boolean, required
  - `data` ApiKeyResponse: Masked view (no full_key) — used for list / detail / patch.
    - `id` string, uuid, required
    - `name` string, required
    - `key_prefix` string, required
    - `scopes` string[], required
    - `allowed_cidrs` string[], nullable
    - `plan_override` unknown, required
    - `environment` string, required
    - `last_used_at` string, date-time, nullable, required
    - `last_used_ip` string, nullable, required
    - `revoked_at` string, date-time, nullable, required
    - `revoked_reason` string, nullable, required
    - `expires_at` string, date-time, nullable, required
    - `created_at` string, date-time, required
    - `tos_version` string, nullable, required
  - `error` ApiError: API error details.
    - `code` string, required
    - `message` string, required
    - `details` object, nullable
  - `meta` ApiMeta: API response metadata. Pagination fields (``page`` / ``per_page`` / ``total``) are populated on collection endpoints only. They are omitted from the payload on single-resource endpoints.
    - `timestamp` string, date-time
    - `request_id` string, nullable
    - `page` integer, nullable
    - `per_page` integer, nullable
    - `total` integer, nullable
  - `links` ApiLinks: HATEOAS-style pagination cursors. Host-relative path + query links for a collection page. Present on collection endpoints, ``null`` fields where a page doesn't exist (``next`` on the last page, ``prev`` on the first). The whole ``links`` object is omitted from single-resource responses (see ``ApiResponse`` serializer).
    - `self` string, nullable
    - `first` string, nullable
    - `prev` string, nullable
    - `next` string, nullable
    - `last` string, nullable

## Other responses

- `404`: API key not found or not owned by current user
- `422`: Validation Error

---

[API](https://skmtc.dev/hub-equity/apis/hub-equity-api.md) · [All operations](https://skmtc.dev/hub-equity/apis/hub-equity-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hub-equity/apis/hub-equity-api/revisions/e8eeda5dc13e?raw)
