initRevTurbine
initRevTurbine(
options):Promise<SdkSession>
Create a fully-initialized SDK session.
This is the recommended entry point for headless (non-React) consumers. It handles:
- SDK initialization via
initRevTurbine() - User identification (if
options.user.idis provided) - Theme resolution (from RevTurbineConfig or API)
- Placement bootstrapping (preloading decisions)
The returned SdkSession exposes the full imperative API: user context management, placement controllers, entitlement gates, and event tracking.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<SdkSession>
Example
Section titled “Example”const session = await initRevTurbine({ tenantId: 'tenant_abc', apiKey: 'rt_live_xxx', endpoint: 'https://api.revturbine.io', user: { id: 'user_123', plan: { id: 'pro' } }, bootstrapPlacements: [ { placement: { name: 'pricing_banner' } }, ],});