curl. A function is a container running your own HTTP server on Telnyx infrastructure, reachable at a public URL.
The code steps below are shown for every supported language — pick a tab. TypeScript is the default and the only one with the typed binding SDK today; the rest are fully supported for plain HTTP.
Prerequisites
- A Telnyx account — sign up if you don’t have one.
- The toolchain for your language: Node.js ≥ 18 (TypeScript/JavaScript), Go, Python 3, or Java with Maven.
1. Install the CLI
Thetelnyx-edge CLI ships as binaries on the GitHub releases page. Assets are version-stamped, and each tarball extracts into a versioned directory containing the binary.
macos-amd64 asset; Windows zips are on the same releases page. Verify the install:
2. Authenticate
Authenticate before creating a function —new-func registers the function with the platform, which requires credentials.
~/.telnyx-edge/config.toml. The CLI does not read a TELNYX_API_KEY environment variable — in CI, run auth api-key set as a setup step.
3. Create a function
new-func creates the function server-side, writes the assigned UUID into func.toml, and scaffolds a working project. Pass -l to pick the language:
func.toml that ties the directory to the registered function:
4. Ship
ship uploads the project, builds it, deploys it, and monitors the rollout (default timeout 5 minutes; --timeout to change). The output ends with the live URL:
{func-name}-{org-nickname}.telnyxcompute.com — see Routes & Domains.
5. Call it
Use the URLship printed. Every scaffold answers a GET with the same default response:
telnyx-edge ship again — each successful ship creates an immutable revision you can roll back to.
Next Steps
- Bindings — pre-authenticated Telnyx client, secrets, and KV on
env. - KV quick start — persist data across requests from your function.