Skip to main content
KV is a globally distributed key-value store: you write bytes under a string key and read them back, fast, from anywhere. It is built for read-heavy edge workloads — session data, cached responses, feature flags, and other small values a function needs on every request. A value is opaque bytes. You choose the serialization (text, JSON, binary); KV stores exactly what you send and returns it byte-for-byte. There is no envelope, no base64 encoding, and no server-side interpretation of the value.

Two Ways to Use KV

The same namespaces and keys are reachable two ways. Pick based on where your code runs. Both hit the same store, so a value written through the binding is immediately readable over REST and vice versa. The binding is a thin, pre-authenticated wrapper over the same REST endpoints — it just means your function never handles an API key. The complete endpoint reference — namespaces and keys, with request/response schemas and code samples — is generated from the OpenAPI spec and lives in the REST API group of this KV section in the sidebar.
The env KV binding is TypeScript-only and requires @telnyx/edge-runtime ≥ 0.2.2. Go, JS, Python, and Quarkus functions use the REST API directly.

Next Steps

  • Quick Start — Create a namespace, bind it, read and write
  • How KV Works — Keys, TTL, and the consistency model
  • Examples — Session storage, caching, and feature flags
  • Runtime API — the env binding surface (KvNamespace)
  • CLI Commands — Manage KV from the command line
  • Pricing — Free tier and paid plans
  • Bindings — How the env binding surface works
  • Secrets — Secure credential storage