Skip to main content
SimpleFunctions issues per-user API keys of the form sf_live_<base64url>. Keys are shown exactly once at creation and stored hashed (Argon2) on the server. Every authenticated route accepts a key in Authorization: Bearer sf_live_.... There is no public GET /api/keys/{id} — once created, the raw secret is only available from the create response.

API keys

List keys

Auth: Authorization: Bearer sf_live_... or browser session. Response 200
keyPrefix is the first 12 characters and is safe to display. Revoked keys are returned with revokedAt set; they cannot authenticate any new request.

Create a key

Auth: required. Body Response 201
The key field is the only time the raw secret is returned. Store it now.

Revoke a key

Auth: required. The caller must own the key. Response 200
Response 404

Curl

CLI auth handshake (sf login)

The CLI cannot accept a Supabase password locally, so it runs a three-endpoint handshake that proxies the browser session into a fresh API key.

POST /api/auth/cli — initialize

Auth: none (the sessionToken is the shared secret). Body Response 200
Errors

GET /api/auth/cli/poll?token=... — poll for the key

Auth: none. The session token is the shared secret. Response 200 (pending)
Response 200 (ready)
The server deletes the session row immediately after returning a key, so a successful poll is a one-shot. Errors

POST /api/auth/cli/complete — browser callback

This is what the browser hits after Supabase login. CLI integrators don’t call it directly. Auth: Supabase session cookie (browser-side). Body Response 200
Errors The created key is named "CLI (browser login)" so users can see it in the dashboard and revoke it later.

Signup

Public endpoint for new account creation. Returns the Supabase session and a starter API key. Use the dashboard at https://simplefunctions.dev/signup for the standard flow; this endpoint is mainly for programmatic onboarding.

See also

Authentication

All auth flavors — API key, browser session, BYOK exchange creds.

Direct API access

First curl calls and language examples.

API keys (enterprise)

Rotation policy and per-tool restriction.

Errors

Full error envelope reference.