Skip to content

Functions

Tested with: Not yet available on Databasezy · describes the launch design

Functions run your TypeScript or JavaScript at /functions/v1/<name> on the project endpoint, in the region that runs the project, on the same open-source edge runtime Supabase uses.

  • A function is a Deno.serve handler with npm and JSR imports. The CLI bundles it and uploads the bundle; every deploy is a version you can roll back to.
  • Each invocation runs in its own isolate from a warm pool for your project, with memory, CPU-time and wall-clock limits from your plan (below).
  • Requests carry a project key or a user’s session token, verified at the edge; verify_jwt is on by default.
  • Triggers: HTTP, cron schedules, queue messages and database changes.
  • Secrets are set per project and read with Deno.env.get. Database credentials can be injected by reference; they are resolved in the region and never copied into the control plane.
  • Logs and per-function metrics are kept for your plan’s log retention.
functions/hello/index.ts
Deno.serve(async (req) => {
const { name } = await req.json();
return Response.json({ message: `Hello ${name}` });
});
Terminal window
curl -X POST "https://<ref>.us-east.databasezy.com:8443/functions/v1/hello" \
-H "apikey: <publishable-key>" \
-H "Authorization: Bearer <publishable-key>" \
-H "Content-Type: application/json" \
-d '{"name":"world"}'
Platform usage prices and the allowance each plan includes per month
Meter Price FreeSoloTeamEnterprise
Function invocations Coming soon $2 per million 250K2M10MContract
Function compute Coming soon $0.0000166 per GB-second 100K GB-s400K GB-s2M GB-sContract
Platform limits on each plan
Limit FreeSoloTeamEnterprise
Functions Coming soon 525100Unlimited
Function memory and time limit Coming soon 150 MB, 150 s256 MB, 400 s512 MB, 400 s1,024 MB, 900 s

Functions run regionally at launch; multi-region execution follows later.