---
title: "Retrieve (metadata about) a key"
method: GET
path: "/keys/{keyId}"
tags: ["keys"]
---

# Retrieve (metadata about) a key

`GET /keys/{keyId}`

Retrieve (metadata about) a key. Only the key prefix is returned when you retrieve a key. Due to security reasons, only the create endpoint returns the full API key.

## Path parameters

- `keyId` integer, required

## Response `200`

The key referenced by the ID

- ApiKey
  - `value` string
  - `description` string, required
  - `actions` string[], required
  - `collections` string[], required
  - `expires_at` integer
  - `id` integer
  - `value_prefix` string

## Other responses

- `404` — The key was not found

## Changes

> 9 revisions in range; 1 could not be searched.

- **2024-02-13** `14b1d3553228` — 3 breaking, 3 info
  - the response property `allOf[subschema #2]/id` became optional for the status `200`
  - the response property `allOf[subschema #2]/value_prefix` became optional for the status `200`
  - removed the required property `allOf[subschema #2]/value` from the response with the `200` status
  - added the non-success response with the status `404`
  - …2 more
- **2022-08-04** `6c2fe01b69bc` — 1 breaking, 1 warning, 4 info
  - the response property `allOf[#/components/schemas/ApiKeySchema]/description` became optional for the status `200`
  - removed the optional property `allOf[#/components/schemas/ApiKeySchema]/value` from the response with the `200` status
  - removed the non-success response with the status `404`
  - the response property `allOf[subschema #2]/id` became required for the status `200`
  - …2 more

[Change history](https://skmtc.dev/typesense/apis/typesense-api/changes/keys/:keyId/get.md)

---

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