Skip to content
SaaSFunnelsHelp

Developers

API keys and scopes

Create, store, rotate and revoke the keys your code uses with SaaSFunnels.

Where to find itSettingsIntegrationsDirect API

On this page

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

KeyCreate it inSave it asUsed by
Client keySettings → Install codeYour snippet, or NEXT_PUBLIC_SAASFUNNELS_WEB_SDK_CLIENT_KEYThe install code in the browser
Funnel server keySettings → Install code → Signed-in visitors → App users → Create server keySAASFUNNELS_FUNNELS_SERVER_KEYYour sign-in route
Event ingestion keySettings → Integrations → Direct API → Create key, Access Event ingestionSAASFUNNELS_INGEST_API_KEYThe Server events API and saasfunnels events send-test
Developer tools keySettings → Integrations → Direct API → Create key, Access Developer toolsSAASFUNNELS_API_KEYThe CLI and local MCP server
Discovery keyFinish setup → Let SaaSFunnels read your app → Create keySAASFUNNELS_API_KEYnpx 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

ScopeAllowsKey
direct:writeSending events to /api/events/ingestEvent ingestion key
developer:readRead-only workspace checks from the CLI and local MCPDeveloper tools key, Discovery key
features:writeUploading what setup run found in your app, for an admin to reviewDiscovery 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.local for local work.
  • Never give a server key a NEXT_PUBLIC_ or VITE_ 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.

What's next