ESTAGE Support
IdeasMy tickets

Functions & secrets

Updated October 15, 2026

Server-side code for your project — write or AI-generate edge functions, deploy them, watch their logs, and store API keys as encrypted secrets.

Some things can't (or shouldn't) happen in the visitor's browser: sending emails, talking to third-party APIs with secret keys, processing data on a schedule. That's what Functions are for — small pieces of server-side code that run in your Dedicated Cloud.

The Functions tab

The left rail lists your functions with a status dot (green = live, gray = draft). Select one — or click New function — to open the editor.

Writing a function

  • Name it (lowercase letters, digits, dashes — e.g. send-welcome-email).
  • Functions are TypeScript and can span multiple files — tabs across the top, index.ts is the entry point, Add File for more.
  • Don't write code? Use the Ask AI to write a function bar: describe the job ("send a welcome email when a user signs up") and it generates the code.

Deploying and testing

  • Deploy (top-right) pushes the function live.
  • The Invoke card shows the one-liner your site uses to call it.
  • Recent invocations at the bottom shows the function's logs — every run with its timestamp and output — with a Refresh button. Your first stop when a function isn't doing what you expect.

Tip

As with tables, you usually don't create functions by hand — just describe the backend feature you want in the chat (building with AI) and it deploys what the feature needs. The editor is there for inspecting, tweaking, and building your own.

Secrets

Functions often need API keys — for an email service, a payment provider, an external API. Never paste keys into code; store them in the Secrets tab:

  • Add name/value pairs (names auto-uppercase, e.g. RESEND_API_KEY) and Save secrets.
  • Values are encrypted and never shown again after saving — the list displays masked values only. To change one, save a new value under the same name; to remove it, delete it.

Inside a function, a secret is read by name — the Functions editor's Secrets card shows the exact snippet and how many secrets you have defined.

Was this helpful? Still stuck? Write to the team