Skip to content

SDK Reference

The SDK is the API contract used to run published funnels: runtime identity, events, uploads, checkout, payments, and the related user/subscription operations needed by a funnel integration. Server-to-server product capabilities that do not serve funnel execution belong to the separate Integration API.

Base URL:

text
https://sdk-api.funnelsgrove.com

Get SDK Keys

Open the funnelgrove dashboard, select your project, then open Project Settings. Copy the SDK publishable key for public API calls and the SDK secret key for private server-side calls.

The publishable key is safe to expose in browser or mobile app code. The secret key is not; store it only on your backend.

Key rotation behavior:

KeyUsed byRotation behavior
SDK publishable keyPublic APIOld key keeps working for 30 days.
SDK secret keyPrivate SDK and Integration APIOld key stops working immediately.

API Split

APIAuth headerUse for
Public APIX-SDK-Publishable-KeyFunnel sessions, checkout, access checks, and App Login.
Private APIX-SDK-Secret-KeyServer-side subscription actions used by a funnel.
Integration APIAuthorization: Bearer <SDK secret key>Backend user reads, transaction search, email delivery, template authoring, and lifecycle sequences.

Required IDs

Most funnel-runtime requests include funnelId. App access verification can instead resolve a user across the project through the SDK publishable key. Verified-email lookup returns the FunnelsGrove user_id; save that opaque ID on the authenticated account and use it for subsequent subscription checks and login tracking.

The reader-facing name is App Login. New integrations call verifyUserSubscription with a known userId or verified email, then call trackUserLogin only after OTP verification and active status. Verification is read-only; login tracking records App Login.