---
title: KV
description: "A key-value store bound to env.NAME, backed by a single SQLite table."
---

## Configuration

```jsonc
"kv_namespaces": ["SESSIONS"]
```

Bare names are auto-provisioned on deploy — see [Storage resources](/storage).

## Usage

```js
env.SESSIONS.put("k", "v");          // value is stringified
env.SESSIONS.get("k");               // -> "v" or null
env.SESSIONS.delete("k");
env.SESSIONS.list("prefix");         // -> string[] of keys, up to 1000
```

## Methods

| Method | Signature | Returns |
| --- | --- | --- |
| `put` | `(key: string, value: string)` | `void` — value is stringified |
| `get` | `(key: string)` | `string \| null` |
| `delete` | `(key: string)` | `void` |
| `list` | `(prefix?: string)` | `string[]` — up to 1000 keys |

## Related

- [Storage resources and auto-provisioning](/storage)
- [Manage and export KV data](/storage/manage-kv-data) — CLI-driven key listing, bulk get/put/delete, and export
