---
title: "Get a value by key"
method: POST
path: "/kv/get"
tags: ["KV Store"]
---

# Get a value by key

`POST /kv/get`

## Request

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

## Request body

- GetRequest: Request to get a value by key
  - `key` string, required: The key to retrieve
  - `project_id` integer, nullable: Project ID (required for API key/session auth, optional for deployment tokens)

## Response `200`

Value retrieved

- GetResponse: Response for get operation
  - `exists` boolean, required: Whether the key exists, so a stored JSON `null` is not mistaken for a missing key
  - `value` unknown

## Other responses

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

## Changes

- **2026-11-26** `ec9326f3080e`: 1 info
  - added the required property `exists` to the response with the `200` status
- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/kv/get/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)
