Telnyx Storage: KV — Documentation Index
KV documentation within the Storage section of the Telnyx developer docs (https://developers.telnyx.com). This file: https://developers.telnyx.com/development/llms/storage-kv-llms-txt.md · Root index: https://developers.telnyx.com/llms.txt
Get Started
- KV: Telnyx KV is globally distributed key-value storage for low-latency reads from edge functions. Use it through the function binding or the REST API.
- Quick Start: Create a KV namespace, bind it to your edge function, and read or write data — through the function binding or the REST API.
Concepts
- How KV Works: The Telnyx KV data model: path-like keys, opaque byte values, optional server-side TTL, no per-key metadata, and a single global store with read-your-writes consistency.
- Key Expiration: Telnyx KV supports server-side TTL — set it when writing through the binding, as a REST parameter, or with a CLI flag — so keys expire automatically.
Examples
- Session Storage: Store user sessions at the edge with Telnyx KV and expire them with a server-side TTL.
- API Response Caching: Cache expensive upstream API responses at the edge with Telnyx KV and a short server-side TTL.
- Feature Flags: Read feature flags on the request path from Telnyx KV and flip them without redeploying.
Reference
- Overview: The KV runtime API — the methods available on a bound namespace, plus their option and result types.
- KvNamespace: The KV binding’s runtime API — read, write, delete, and list on a bound namespace, with option and result types and their behavior.
- CLI: Manage Telnyx KV namespaces and keys from your terminal with the CLI — create, list, put, get, and delete.
- Best Practices: Practical guidance for Telnyx KV: naming keys, serializing values, and handling missing keys.
Platform
- Pricing: Pricing for Telnyx KV: free tier limits and per-million-operation rates for reads, writes, deletes, and lists, with free egress.
API Reference (KV)
kv namespaces
- List KV namespaces: Lists the KV namespaces for the authenticated user’s organization. Results use page-based pagination (
page[number]/page[size]). - Create a KV namespace: Creates a new KV namespace. Provisioning is asynchronous: the namespace is returned with status
pendingand becomes usable once it reachesprovision_ok. - Get a KV namespace: Retrieves a KV namespace by its ID, including its provisioning status.
- Delete a KV namespace: Deletes a KV namespace and all of the keys it contains. Deletion is asynchronous: the namespace is returned with status
deleting. Deleting a namespace whose…
kv keys
- List keys: Lists the keys in a namespace. Returns key names and metadata only, never values. Results are paginated with
limitand an opaquecursor. - Get a key’s value: Returns the raw stored value for a key. The response body is the value exactly as it was written; the
Content-Typeheader echoes the value’s stored content t… - Set a key’s value: Creates or replaces the value for a key. The request body is stored verbatim as the value — no base64, no JSON envelope — up to 1 MiB. The request’s `Content-T…
- Delete a key: Deletes a key. Idempotent: deleting a key that does not exist still succeeds. The namespace itself must exist and be provisioned.
cloudfs filesystems
- List CloudFS filesystems: Lists the CloudFS filesystems for the authenticated user’s organization. Results use cursor-based pagination: fetch the next page by passing `meta.cursors.afte…
- Create a CloudFS filesystem: Creates a CloudFS filesystem. Provisioning is synchronous — typically a few seconds, up to a few minutes — and the filesystem is returned with status
ready,… - Get a CloudFS filesystem: Retrieves a CloudFS filesystem by its ID. The returned
meta_urlomits the credential — the metadata token is only ever returned by create and rotate-meta-tok… - Update a CloudFS filesystem: Updates a CloudFS filesystem. Only
namecan be changed; other fields are immutable and unknown fields are rejected with a400. Renaming to a name that alre… - Delete a CloudFS filesystem: Permanently deletes a CloudFS filesystem, removing its S3 bucket and its metadata database. Deletion is synchronous: the response returns the filesystem’s fina…
- Rotate the metadata token: Issues a new metadata access token for the filesystem and returns the full filesystem, including the new
meta_tokenand credential-bearingmeta_url. The pr…