> ## 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.

# Configuration File

> Reference for the function and umbrella project manifests — the identity block, environment variables, and every binding declaration: Telnyx API, secrets, KV, object storage, and actors.

Every Edge Compute project has a TOML manifest at its root. It identifies the function `ship` deploys and declares the bindings the runtime resolves onto `env`. There are two forms:

* **`func.toml`** (classic) — one function. Written by `telnyx-edge new-func`; can declare `[env_vars]`, `[telnyx]`, `[[secrets]]`, and `[storage.kv.<NAME>]`.
* **`telnyx.toml`** (umbrella) — a TypeScript project with a top-level `main` entry, bundled client-side on `ship`. Declares the same binding blocks plus `[[actors]]`, which classic projects cannot.

`telnyx-edge types` reads either form and writes `telnyx-env.d.ts`, typing `env.<binding>` for each declaration.

## func.toml

`new-func` writes the minimal manifest — and because it registers the function server-side at scaffold time, the UUID `func_id` is already in it:

```toml theme={null}
[edge_compute]
func_id = "7819cf01-39a8-400e-9bce-3d792ffa4017"
func_name = "demo-ts"

# For environment variables and secrets:
# Use telnyx-edge secrets add <name> <value>
# Secrets are injected as environment variables into all your functions
```

A manifest using every available block:

```toml theme={null}
[edge_compute]
func_id   = "7819cf01-39a8-400e-9bce-3d792ffa4017"  # written by new-func — the function ship deploys
func_name = "demo-ts"                                # https://demo-ts-<org-nickname>.telnyxcompute.com

[env_vars]                     # plain string env vars, injected on each deploy
LOG_LEVEL   = "info"
MAX_RETRIES = "3"

[telnyx]                       # pre-authenticated Telnyx API client
binding = "MY_TELNYX"          # → env.MY_TELNYX (TS); also injects TELNYX_API_KEY

[[secrets]]                    # typed handle onto a stored secret
binding = "STRIPE_KEY"         # → env.SECRETS.get("STRIPE_KEY")
name    = "STRIPE_API_KEY"     # the key stored with `secrets add`

[storage.kv.MY_KV]             # KV namespace binding — block key is the handle
id = "550e8400-e29b-41d4-a716-446655440000"   # → env.MY_KV
```

There is no `language` key (the runtime comes from the project files the scaffold creates), no build block, and no timeout key — the request timeout is a platform property (default 30 s, maximum 60 s; see [Limits](/docs/edge-compute/platform/limits)).

### \[edge\_compute]

| Key         | Value                                                                                                                                                                                                                                                                                           |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `func_id`   | The function's UUID, written by `new-func` when it registers the function server-side. This — not the directory — is what `ship` deploys, so swapping `func.toml` files switches deploy targets (the [CI/CD staging pattern](/docs/edge-compute/deploy#staging-and-production) relies on this). |
| `func_name` | The function name. Determines the URL: `https://{func_name}-{org-nickname}.telnyxcompute.com` — see [Routes & Domains](/docs/edge-compute/configuration/routing).                                                                                                                               |

### \[env\_vars]

Free-form key-value pairs injected as process environment variables on each deploy. All values are strings; changes take effect on the next `ship`; values are plaintext in git — put credentials in secrets instead. See [Environment Variables](/docs/edge-compute/configuration/environment-variables).

### \[telnyx]

| Key       | Value                                                                                                     |
| --------- | --------------------------------------------------------------------------------------------------------- |
| `binding` | The property on `env` — `env.<binding>` is a pre-authenticated Telnyx SDK client in TypeScript functions. |

Declaring the block also injects a `TELNYX_API_KEY` environment variable into the container — this is how non-TypeScript runtimes call the Telnyx API over plain REST. See [Telnyx API binding](/docs/edge-compute/telnyx-api).

### \[\[secrets]]

| Key       | Value                                                                |
| --------- | -------------------------------------------------------------------- |
| `binding` | The handle your code passes to `env.SECRETS.get()`.                  |
| `name`    | The stored secret key, from `telnyx-edge secrets add <key> <value>`. |

The binding is the typed TypeScript surface; independently of it, every secret is injected as an environment variable into all functions in your organization. See [Secrets](/docs/edge-compute/configuration/secrets).

### \[storage.kv.\<NAME>]

| Key                | Value                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------- |
| block key `<NAME>` | The handle — a name you choose. `env.<NAME>` is a `KvNamespace` (get/put/delete/list). |
| `id`               | The KV namespace UUID, from `telnyx-edge storage kv create`.                           |

Multiple blocks are allowed — each becomes its own `env` property. `telnyx-edge types` generates `KvNamespace` types for these blocks since CLI v0.2.3. See the [KV quick start](/docs/edge-compute/kv/quick-start).

## telnyx.toml

The umbrella manifest replaces `[edge_compute]` with top-level keys and adds `[[actors]]`. On `ship`, the module graph rooted at `main` is bundled into a single file with esbuild (TypeScript/JavaScript only) and the manifest ships with it.

```toml theme={null}
name = "account-svc"           # function name
main = "src/index.ts"          # entry module — exports the fetch handler (and the actor class)
compatibility_date = "2026-05-01"

[[actors]]
binding = "ACCOUNT"            # the property on env — your handle
type    = "Account"            # the class to instantiate per name

[telnyx]                       # same binding blocks as func.toml
binding = "MY_TELNYX"

[[secrets]]
binding = "GREETING"
name    = "DEMO_GREETING"
```

| Key                  | Value                                                                                                                                                                                                                                                                                                       |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`               | Function name, used by the platform to register the function.                                                                                                                                                                                                                                               |
| `main`               | Entry module — the root of the client-side esbuild bundle.                                                                                                                                                                                                                                                  |
| `compatibility_date` | Runtime compatibility pin.                                                                                                                                                                                                                                                                                  |
| `[[actors]]`         | Actor bindings — `binding` is the `env` property, `type` the class to instantiate per name. Ship-time constraints (identifier rules, uniqueness, the 32-character type cap) are specified in the [Stateful Actors configuration reference](/docs/edge-compute/stateful-actors/api-reference/configuration). |

The project shape — one module exporting both the actor class and a `fetch` handler — is covered in [Project Structure](/docs/edge-compute/stateful-actors/guides/project-structure). `telnyx-edge new-func --actor` scaffolds it.

## Ship-time validation

Binding handles and `[env_vars]` names share one `env` namespace, and `ship` rejects manifests that break it:

* An `[env_vars]` entry with the same name as a declared binding fails validation.
* `SECRETS` is reserved whenever a `[[secrets]]` block is declared — no other binding or `[env_vars]` entry may use it.
* Duplicate `[[secrets]]` bindings with the same handle are rejected.

## Related

* [CLI reference](/docs/edge-compute/reference/cli) — `new-func` writes the manifest; `ship` and `types` read it
* [Bindings](/docs/edge-compute/runtime/bindings) — the declare → `types` → `env` pattern behind every block
* [Environment variables](/docs/edge-compute/configuration/environment-variables) — everything that lands in the container's environment
* [Secrets](/docs/edge-compute/configuration/secrets) — both access surfaces for `[[secrets]]`
* [Stateful Actors configuration](/docs/edge-compute/stateful-actors/api-reference/configuration) — the `[[actors]]` block in full
