telnyx-edge ship deploys and declares the bindings the runtime resolves onto env. Everything below is a block in that file.
There are two forms:
func.toml(classic) — a single function. Written bytelnyx-edge new-func, which also registers the function server-side, so the UUIDfunc_idis already filled in. Declares[env_vars],[telnyx],[[secrets]],[storage.kv.<NAME>], and[storage.cloudstorage.<NAME>].telnyx.toml(umbrella) — a TypeScript project with a top-levelmainentry, bundled client-side onship. 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. Configuration changes take effect on the next telnyx-edge ship — there is no live update; re-run telnyx-edge types after changing a binding declaration so telnyx-env.d.ts matches the manifest.
The binding blocks — [telnyx], [[secrets]], [storage.kv.<NAME>], [storage.cloudstorage.<NAME>], and [[actors]] (umbrella only) — each resolve to a typed handle on env. This page documents their manifest keys; the bindings catalogue lists every binding at a glance — declaration and env surface — and each block below links to its full documentation.
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:
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] — identity
[env_vars] — environment variables
Free-form key-value pairs injected as process environment variables on each deploy. All values are strings; changes take effect on the nextship; values are plaintext in git — put credentials in secrets instead.
Dive in: Environment Variables.
[[secrets]] — secret bindings
The binding is the typed TypeScript surface; independently of it, every secret is injected as an environment variable into all functions in your organization.
Dive in: Secrets.
[telnyx] — Telnyx API binding
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.
Documented in Telnyx API binding.
[storage.kv.<NAME>] — KV namespace binding
Multiple blocks are allowed — each becomes its own
env property. telnyx-edge types generates KvNamespace types for these blocks since CLI v0.2.4.
Documented in the KV quick start.
[storage.cloudstorage.<NAME>] — Cloud Storage bucket binding
Multiple blocks are allowed — each becomes its own
env property. The runtime injects the credential, so no access key or secret key appears in your code.
Documented in Cloud Storage binding.
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.
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.
Documented in Stateful Actors — the configuration reference covers the [[actors]] block in full.
Configured outside the manifest
The manifest references resources that exist outside it by name or ID — you create each one separately, and the block only points at it:- Secret values — stored server-side with
telnyx-edge secrets;[[secrets]]and the injected environment variables only reference the key. See Secrets. - KV namespaces — created with
telnyx-edge storage kv create;[storage.kv.<NAME>]only references the namespaceid. See the KV quick start. - Cloud Storage buckets — created in the Mission Control portal or over the S3-compatible API;
[storage.cloudstorage.<NAME>]only references an existing bucket bybucket_name. See Cloud Storage binding.
Ship-time validation
Binding handles and[env_vars] names share one env namespace. ship (and types) enforce two hard rules and warn on a third:
- Duplicate
[[secrets]]handles are rejected —shipfails, becauseenv.SECRETS.get("<handle>")would be ambiguous. - A binding (or actor) named
SECRETSis rejected when a[[secrets]]block is declared — it conflicts with theenv.SECRETSnamespace. - A name collision between
[env_vars]and a binding — including an[env_vars]entry namedSECRETS— only warns. Both land onenv, so one shadows the other andshipproceeds; rename one.
Related
- Bindings catalogue — every binding at a glance: declaration and
envsurface for Telnyx API, Secrets, KV, Object storage, and Actors - Environment variables — everything that lands in the container’s environment
- Secrets — both access surfaces for
[[secrets]] - Telnyx API binding — the
[telnyx]block and theenv.<binding>client - KV quick start — the
[storage.kv.<NAME>]block andKvNamespace - Cloud Storage binding — the
[storage.cloudstorage.<NAME>]block andCloudStorageBucket - Stateful Actors configuration — the
[[actors]]block in full - CLI reference —
new-funcwrites the manifest;shipandtypesread it