Developers
API keys and scopes
Create, store, rotate and revoke the keys your code uses with SaaSFunnels.
Where to find itSettingsIntegrationsDirect API
Only workspace admins can create, rotate or revoke keys. Every key is tied to one workspace, and each secret is shown once.
Which key to use
| Key | Create it in | Save it as | Used by |
|---|---|---|---|
| Client key | Settings → Install code | Your snippet, or NEXT_PUBLIC_SAASFUNNELS_WEB_SDK_CLIENT_KEY | The install code in the browser |
| Funnel server key | Settings → Install code → Signed-in visitors → App users → Create server key | SAASFUNNELS_FUNNELS_SERVER_KEY | Your sign-in route |
| Event ingestion key | Settings → Integrations → Direct API → Create key, Access Event ingestion | SAASFUNNELS_INGEST_API_KEY | The Server events API and saasfunnels events send-test |
| Developer tools key | Settings → Integrations → Direct API → Create key, Access Developer tools | SAASFUNNELS_API_KEY | The CLI and local MCP server |
| Discovery key | Finish setup → Let SaaSFunnels read your app → Create key | SAASFUNNELS_API_KEY | npx saasfunnels@latest setup run |
The client key is the only one that's safe in a browser. It works only on the sites you list for that install code. All the others belong on a server, in CI secrets or in your local environment.
Scopes
| Scope | Allows | Key |
|---|---|---|
direct:write | Sending events to /api/events/ingest | Event ingestion key |
developer:read | Read-only workspace checks from the CLI and local MCP | Developer tools key, Discovery key |
features:write | Uploading what setup run found in your app, for an admin to review | Discovery key |
A key with the wrong scope gets a 403. For example, a Developer tools key can't send events.
Store keys safely
- Put keys in your hosting environment or secret manager, and in an uncommitted
.env.localfor local work. - Never give a server key a
NEXT_PUBLIC_orVITE_prefix. - Never paste a key into browser code, a mobile app, a public repository, logs, a support message or a chat with an AI tool.
- Restart or redeploy after you change an environment value.
Rotate or revoke a key
Open the key's actions menu on its row:
- Rotate key replaces the key. The old value stops working right away, so update your server first or plan a short switchover.
- Revoke key turns it off for good.
For the client key, add a new install code with Add an install code from the install code's actions menu, update your snippet, then remove the old one. Pages using a removed client key stop showing Funnels.
If a key leaks, revoke it at once and create a new one.