func.toml to an authenticated resource handle, resolved by the runtime — the credential is injected for you and never appears in your code, bundle, or logs.
Each binding resolves on the env object (from @telnyx/edge-runtime) — env.MY_TELNYX, env.SECRETS, and so on.
The
[telnyx] API binding and telnyx-edge types are TypeScript-only. They rely on the telnyx Node SDK and a generated .d.ts; other runtimes (js, go, python, quarkus) don’t get a typed env handle.Every binding works the same way
MY_TELNYX) is yours to choose; it becomes the property on env.
The SDK types
.data as T | undefined for list calls. Under tsc --strict, indexing into data (e.g. data.length) fails with TS18048: 'data' is possibly 'undefined'. Coalesce before use: const arr = list.data ?? [];.Manifest: func.toml or telnyx.toml
Bindings are declared in your project manifest. telnyx-edge types reads either form and writes telnyx-env.d.ts, typing env.<binding> for each declared binding.
func.toml(classic) — the standard[edge_compute]project file. Declare[telnyx]and[[secrets]]bindings in it.telnyx.toml(umbrella) — a manifest with top-levelnameandmainthat declares the same[telnyx]and[[secrets]]bindings.
Catalogue
| Binding | Declare | For |
|---|---|---|
| Telnyx API | [telnyx] | Voice, Messaging, Numbers — the Telnyx API |
| Secrets | [[secrets]] | Your own credentials and config |
| Key-Value | [storage.kv.<name>] | Low-latency key/value storage |
Bindings vs secrets
- Binding — a Telnyx or platform resource, authenticated for you (
env.MY_TELNYX). - Secret — a value you supply (
env.SECRETS.get("STRIPE_KEY")).