---
title: "Store value in key-value store"
method: POST
path: "/api/{org_id}/kv/{key}"
tags: ["KV"]
---

# Store value in key-value store

`POST /api/{org_id}/kv/{key}`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/kv/{key}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/kv/:key/post.ts> (a function with typed inputs; its response is checked against the schema)

Stores a text value under the specified key in the organization's key-value store. Creates a new key if it doesn't exist, or updates the existing value. The key-value store is perfect for configuration settings, feature flags, application state, and other simple data that needs to persist across sessions.

## Path parameters

- `org_id` string, required
- `key` string, required

## Request body `text/plain`

- string

## Response `200`

Success

## Other responses

- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
