Getting started

Send events with the SDK

Instrument signups, trials, and purchases with typed events. Secret keys stay server-side; publishable keys power browser PageView and identify.

@zerohuman/zod · Server

Install

Shell
pnpm add @zerohuman/zod zod

Server client

Create a client with your secret API key (server-side only):

TypeScript
import { createClient, purchaseEvent } from '@zerohuman/zod'
 
const zerohuman = createClient({
  apiKey: process.env.ZEROHUMAN_API_KEY!,
  baseUrl: process.env.ZEROHUMAN_BASE_URL!,
})
 
await zerohuman.track(
  purchaseEvent({
    customerId: 'cust_123',
    amount: 49,
    currency: 'USD',
  }),
)

Browser SDK

Use a publishable key for PageView and identify in the browser. Never expose secret keys client-side.

API keys

Generate keys in Settings → API keys after you create an account.

Next step

Turn events into messaging — Ship flows.