Skip to main content
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:
[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:
[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).

[edge_compute]

KeyValue
func_idThe 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 relies on this).
func_nameThe function name. Determines the URL: https://{func_name}-{org-nickname}.telnyxcompute.com — see Routes & Domains.

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

[telnyx]

KeyValue
bindingThe property on envenv.<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.

[[secrets]]

KeyValue
bindingThe handle your code passes to env.SECRETS.get().
nameThe 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.

[storage.kv.<NAME>]

KeyValue
block key <NAME>The handle — a name you choose. env.<NAME> is a KvNamespace (get/put/delete/list).
idThe 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.

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.
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"
KeyValue
nameFunction name, used by the platform to register the function.
mainEntry module — the root of the client-side esbuild bundle.
compatibility_dateRuntime 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.
The project shape — one module exporting both the actor class and a fetch handler — is covered in 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.