Install
Shell
pnpm add @zerohuman/zod zodServer 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.
