> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Feature Flags

> Read feature flags on the request path from Telnyx KV and flip them without redeploying.

Read flags on the request path — no expiry needed, so use the [KV binding](/docs/edge-compute/kv/quick-start#path-a-the-function-binding) (`env.MY_KV`) directly.

```ts theme={null}
import { env } from "@telnyx/edge-runtime";

export async function handler(request: Request): Promise<Response> {
    const newUiEnabled = await env.MY_KV.get("flag/new-ui");

    // Swap in whatever each branch should serve.
    return newUiEnabled === "true"
        ? new Response("new UI")
        : new Response("old UI");
}
```

Flip a flag without redeploying — from the CLI:

```bash theme={null}
telnyx-edge storage kv key put <namespace-id> flag/new-ui true
```
