---
title: "Get keys matching a pattern"
method: POST
path: "/kv/keys"
tags: ["KV Store"]
---

# Get keys matching a pattern

`POST /kv/keys`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/kv/keys`
- Auth: HTTP bearer

## Request body

- KeysRequest: Request to get keys matching a pattern
  - `pattern` string, required: Pattern to match (supports * and ? wildcards)
  - `project_id` integer, nullable: Project ID (required for API key/session auth, optional for deployment tokens)

## Response `200`

Keys retrieved

- KeysResponse: Response for keys operation
  - `keys` string[], required: List of matching keys

## Other responses

- `401`: Unauthorized
- `500`: Internal server error

## Changes

- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/kv/keys/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
