The types in this reference are exported from
@telnyx/edge-runtime (TypeScript) and require version ≥ 0.2.1. They describe the env binding — the in-function surface. To read or write KV from another language or outside a function, use the REST API.[storage.kv.<NAME>] in func.toml resolves on env.<NAME> as a KvNamespace.
| Surface | Where it lives | What it’s for |
|---|---|---|
KvNamespace | env.<BINDING> | The binding handle — get, put, delete, list. |
KvGetTextOptions / KvGetJsonOptions | get() options | Select the raw-text read or a JSON.parsed read. |
KvPutOptions | put() options | expirationTtl / metadata — accepted for forward compatibility, not yet applied. |
KvListOptions / KvListResult / KvKeyInfo | list() options + result | Prefix, pagination cursor, and the returned key entries. |
Getting the Binding
func.toml, but the released CLI doesn’t yet generate KV types — declare env.<NAME> as a KvNamespace yourself with a .d.ts augmentation (shown in the Quick Start) until KV type generation ships.
Related Resources
KvNamespace— the method-by-method reference- Bindings — how bindings resolve on
env - REST API — the same operations over HTTP
- Key Expiration — application-level TTL, since
expirationTtlis not yet applied