API Reference Card
All examples use two environment variables:
KLAVIYO_API_KEY (your private API key, starts with pk_) and MAVERA_API_KEY. Klaviyo’s API requires a revision header on every request — the examples use 2024-10-15. Python examples use requests; JavaScript examples use fetch.Prerequisites
1
Klaviyo account with data
You need an active Klaviyo account with at least 30 days of tracked events, profile data, and predictive analytics enabled (available on Growth+ plans).
2
Private API key
Generate a private key in Klaviyo → Settings → API Keys. Grant the key read access to Profiles, Segments, Metrics, Campaigns, and Flows.
3
Predictive analytics
Predictive CLV, churn risk, and next purchase date require sufficient order history. Klaviyo needs ~180 days of order data and 500+ customers to generate predictions.
4
Mavera API key
Get your key from Mavera dashboard.
5
Environment variables
Jobs
Rate Limits & Production Notes
Production checklist:
What’s Next
All Integrations
50+ API integrations with full code
Klaviyo API Docs
Official Klaviyo API reference
Personas API
Full reference for POST /api/v1/personas
Focus Groups API
Full reference for POST /api/v1/focus-groups
Mave Agent
Full reference for POST /api/v1/mave/chat
Generate API
Full reference for POST /api/v1/generations