Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mavera.io/llms.txt

Use this file to discover all available pages before exploring further.

Klaviyo is your e-commerce marketing brain — predictive analytics, flow automation, segmentation, product catalogs, and multi-channel messaging. These five jobs connect Klaviyo’s data to Mavera’s surfaces (Custom Personas, Generate, Mave Agent, Focus Groups) so your personas reflect real CLV tiers, your underperforming flows get data-driven rewrites, and your creative decisions are tested before sending.

API Reference Card

DetailValue
Base URLhttps://a.klaviyo.com/api/
AuthKlaviyo-API-Key header (private API key)
Rate limitsTiered — 1 to 350 req/sec burst depending on endpoint and plan
Revision headerRequired: revision: 2024-10-15 (or latest)
Mavera basehttps://app.mavera.io/api/v1
Mavera authAuthorization: Bearer mvra_live_...
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

export KLAVIYO_API_KEY="pk_xxxxx"
export MAVERA_API_KEY="mvra_live_xxxxx"

Jobs

#JobKlaviyo DataMavera SurfaceOutput
1Predictive Analytics → Persona EnrichmentProfiles with predictive CLV/churnCustom PersonasCLV-tier personas with churn profiles
2Flow Performance → Content RefreshMetric aggregates (flow-level)GenerateRewritten underperforming flow content
3Segment Overlap AnalysisSegments + member countsMave AgentSimplified segmentation recommendations
4Product Affinity → Focus GroupCatalog + purchase dataFocus GroupsCross-sell validation with Likert + NPS
5SMS vs. Email Creative TestingSMS + email campaign performanceFocus GroupsChannel preference insights

Rate Limits & Production Notes

Klaviyo APILimitStrategy
Profiles GET10-75 req/sec (plan-dependent)Respect Retry-After; paginate with cursors
Segments GET10-15 req/secCache segment lists; definitions change rarely
Catalog Items10-75 req/secCache catalog; changes are event-driven
Metric Aggregates POST3-10 req/secBatch time periods; cache results
Flows GET10-15 req/secCache flow structures; metrics are separate
Klaviyo’s rate limits are tiered by plan and endpoint. The Retry-After header on 429 responses gives the exact wait time. Always implement exponential backoff. The revision header (revision: 2024-10-15) is mandatory on every request — omitting it returns 400.
Production checklist:
ConcernRecommendation
API key securityKlaviyo private keys (pk_) have full read access. Never expose in client-side code. Use server-side calls only.
Revision headerPin to a specific revision and test before upgrading. Breaking changes are released per-revision, not silently.
Predictive analytics lagPredictive CLV and churn risk update daily. Don’t poll more than once per 24 hours for persona enrichment.
Catalog syncCatalog data comes from your e-commerce platform integration (Shopify, BigCommerce, etc.). Ensure the sync is active before querying catalog items.
Mavera creditsMonitor at Dashboard. Job 4 (product affinity) with 3 personas × 5 questions × 2 responses is credit-intensive.
SMS complianceAlways respect SMS opt-in preferences. Never send promotional SMS without explicit consent. Klaviyo enforces this at the platform level.

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