# Key-value

List, group and delete a project's key-value entries with the REST API.

```http
GET    /api/projects/:id/storage/kv?prefix=todo:&limit=50&cursor=...
GET    /api/projects/:id/storage/kv/collections
DELETE /api/projects/:id/storage/kv?key=todo:42
```

## List entries

`GET /storage/kv` returns entries in key order:

```json
{ "items": [{ "key": "todo:42", "value": { "title": "Ship it" }, "expiresAt": null }], "cursor": "..." }
```

| Query | Description |
| --- | --- |
| `prefix` | Only keys starting with it |
| `limit` | Entries per page, default 50 |
| `cursor` | From the previous page |

## Collections

`GET /storage/kv/collections` groups keys by their prefix (the part before the first `:` or `/`), with counts — the same grouping the console shows.

## Delete an entry

`DELETE /storage/kv?key=…` deletes one key. Scope: `storage:write`.

```bash
curl -X DELETE "https://wispfn.com/api/projects/$PROJECT/storage/kv?key=todo:42" \
  -H "Authorization: Bearer $WISP_API_KEY"
```

From your functions, use the [`kv` SDK](/api/sdk-kv).
