The types in this reference are exported from
@telnyx/edge-runtime (TypeScript) and describe version ≥ 0.2.2 — the first release where expirationTtl is applied and list() entries carry sizeBytes/updatedAt. 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 — server-side TTL in seconds (metadata is deprecated and ignored). |
KvListOptions / KvListResult / KvKeyInfo | list() options + result | Prefix, pagination cursor, and the returned key entries. |
Getting the Binding
func.toml; run telnyx-edge types (CLI ≥ v0.2.3) after editing the manifest to regenerate telnyx-env.d.ts, which types env.<NAME> as a KvNamespace.
Related Resources
KvNamespace— the method-by-method reference- Bindings — how bindings resolve on
env - REST API — the same operations over HTTP
- Key Expiration — server-side TTL via
expirationTtl,ttl_secs, or--ttl