Skip to main content
Deploy your first function end-to-end: install the CLI, authenticate, scaffold, ship, and prove it with 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

The telnyx-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.
For Intel Macs use the 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.
Credentials persist to ~/.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:
Every scaffold contains a func.toml that ties the directory to the registered function:
The entrypoint file and its contract differ by language — TypeScript and JavaScript run their own server; Go, Python, and Java hand you a handler and run the server for you. Here is the scaffolded entrypoint, condensed to a health check plus a default JSON response:
These are trimmed for the quickstart. HTTP handler has the full scaffold for each language, the exact entrypoint contract, and how request bodies and health probes work.

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:
Every function gets a URL of the form {func-name}-{org-nickname}.telnyxcompute.com — see Routes & Domains.

5. Call it

Use the URL ship printed. Every scaffold answers a GET with the same default response:
Sending request bodies differs by contract — the TypeScript, JavaScript, Go, and Python scaffolds read the raw body, while the Java (Funqy) scaffold is JSON-in, JSON-out. See HTTP handler for each. The function is live. Iterate by editing the entrypoint and running 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.