canonical: https://jentic.com/apis/klaviyo.com/klaviyo

# Klaviyo API

Orchestrate personalized email, SMS, and push marketing campaigns driven by real-time customer behavior data. Supports 289 endpoints covering profiles, events, flows, campaigns, lists, segments, catalogs, metrics, coupons, and reporting. Customer profiles aggregate purchase history, browsing behavior, and custom properties to power predictive analytics and hyper-targeted audience segmentation across all owned channels.

## For AI agents

Trigger personalized email and SMS campaigns, manage customer profiles and segments, track behavioral events, and orchestrate multi-step marketing flows. Covers 289 endpoints with deep e-commerce catalog and event-driven automation support.

## Scope

Does not handle payment processing, order fulfillment, or customer support ticketing - use for marketing automation, customer engagement, and behavioral analytics only.

## Capabilities

- Trigger multi-step marketing flows based on real-time customer events like purchases, page views, and cart additions
- Build predictive segments using customer lifetime value, churn risk, and expected purchase date scores
- Sync product catalogs with variants, categories, and pricing for personalized product recommendations in emails
- Track custom events with properties to build behavioral cohorts and trigger targeted campaign sends
- Generate revenue attribution reports linking specific campaigns and flows to actual purchase conversions
- Import and enrich customer profiles in bulk with behavioral, transactional, and demographic properties
- Create coupon codes and distribute unique discount offers through automated flow actions

## Use cases

### AI Agent Marketing Automation

AI agents use the Klaviyo API through Jentic to programmatically create campaigns, manage customer profiles, and trigger flow actions based on behavioral events. The agent searches for 'send targeted campaign to segment' via Jentic, receives the matching operation schemas for /api/campaigns and /api/campaign-send-jobs, and executes the full workflow. Klaviyo's event-driven architecture means agents can track any custom event and build automation triggers without manual flow configuration. Integration takes under an hour through Jentic versus 3-5 days for direct OAuth setup and webhook configuration.

Example prompt: Create a campaign targeting the 'High-Value Customers' segment with a personalized product recommendation email and schedule it for optimal send time

### Behavioral Event Tracking and Segmentation

Track granular customer behavior events including purchases, page views, product interactions, and custom events via the /api/events endpoint. Each event carries typed properties that feed into Klaviyo's segmentation engine, enabling real-time audience building based on recency, frequency, and monetary value. Segments update dynamically as new events arrive, powering flow triggers and campaign targeting without manual list management across audiences of millions.

Example prompt: Track a 'Product Viewed' event for profile ID 'abc123' with properties including product_id, price, and category, then verify the event appears in the profile's event timeline

### E-Commerce Catalog Sync and Product Recommendations

Sync product catalogs including items, variants, and categories via bulk import jobs at /api/catalog-item-bulk-create-jobs. Catalog data powers personalized product recommendation blocks in emails and SMS, showing each recipient items relevant to their browsing and purchase history. Supports incremental updates through individual item endpoints and bulk operations handling thousands of products per batch.

Example prompt: Import 100 catalog items with variants using a bulk create job, wait for completion, then verify the items appear in the catalog

### Multi-Channel Flow Orchestration

Retrieve and monitor automated flows that span email, SMS, and push notification channels via the /api/flows endpoint. Each flow contains actions with conditional splits, time delays, and channel-specific content. The API exposes flow performance including conversion rates, revenue generated per flow, and per-action engagement metrics. Agents can identify underperforming flow steps and trigger updates to improve downstream conversion.

Example prompt: Get all flows tagged with 'post-purchase', retrieve their per-action metrics, and identify any flow action with less than 5% click rate

### Customer Profile Enrichment and Lifecycle Analysis

Import, update, and query customer profiles containing behavioral properties, predictive analytics scores, and subscription statuses. The /api/profiles endpoint supports bulk imports via /api/profile-bulk-import-jobs processing thousands of profiles per batch. Each profile aggregates email engagement, purchase value, predicted next order date, and churn risk scores - enabling lifecycle-based segmentation and personalized outreach timing.

Example prompt: Bulk import 500 customer profiles with email, first name, and custom properties, then create a segment of profiles with predicted churn risk above 0.7

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /api/campaigns | Create a new campaign |
| POST | /api/campaign-send-jobs | Trigger a campaign send |
| GET | /api/profiles | List customer profiles |
| POST | /api/events | Track a customer event |
| GET | /api/flows | List all automation flows |
| GET | /api/segments | List audience segments |
| POST | /api/lists/{id}/relationships/profiles | Add profiles to a list |
| POST | /api/catalog-item-bulk-create-jobs | Bulk import catalog items |

## Key resources

- **Campaigns** — Create, schedule, and send email and SMS marketing campaigns with audience targeting
- **Profiles** — Manage customer profiles with behavioral properties, predictive scores, and subscription status
- **Events** — Track custom behavioral events that trigger flows and build segments
- **Flows** — Retrieve and monitor multi-step automation workflows across email, SMS, and push channels
- **Lists and Segments** — Organize audiences into static lists and dynamic behavioral segments
- **Catalogs** — Sync product catalogs for personalized recommendations in campaigns and flows
- **Metrics** — Access event-level and aggregate performance data for campaigns and flows

## Why Jentic

- **Setup:** Wiring Klaviyo by hand means learning its Authorization-header API key, handling the a.klaviyo.com host, and mapping its large JSON:API surface yourself. Through Jentic you install once, import Klaviyo from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Most Klaviyo writes carry the profile, event, or campaign in the request body rather than pinning a resource in the URL path, so scope by operation: limit the agent to the operations it needs, such as reading profiles and segments or recording events, and leave campaign sends out unless you add them.
- **Credential handling:** Your Klaviyo API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'record a customer event' or 'read a marketing segment', and Jentic returns the matching Klaviyo operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Mailchimp Marketing API** — Established email marketing platform with broad integrations and simpler automation
- **Brevo Email API** — Transactional and marketing email with competitive pricing for high-volume senders
- **SendGrid Mail API** — High-volume transactional email delivery with deliverability infrastructure
- **Segment API** — Customer data platform that unifies behavioral events from multiple sources into Klaviyo

## FAQ

### What authentication does the Klaviyo API use?

The Klaviyo API uses API key authentication via the Authorization header with the format 'Klaviyo-API-Key your-private-api-key'. Through Jentic, your Klaviyo private API key is stored encrypted in your Jentic One instance. Agents receive scoped access tokens so the raw key never enters the agent context.

### Can I track custom events with the Klaviyo API?

Yes. POST to /api/events with a payload containing the event name, customer profile identifier, timestamp, and typed properties (e.g., product_id, value, category). Events feed into segmentation, flow triggers, and predictive analytics within seconds of ingestion.

### What are the rate limits for the Klaviyo API?

Klaviyo enforces rate limits per endpoint category. Most endpoints allow 75 requests per second for private API key authentication. Bulk import jobs (/api/profile-bulk-import-jobs, /api/catalog-item-bulk-create-jobs) process asynchronously and are limited by job queue rather than per-second rate. The API returns 429 status codes with a Retry-After header when limits are reached.

### How do I create a segment based on purchase behavior through Jentic?

Search Jentic for 'create customer segment by purchase history' to find the segment creation operations. Klaviyo segments are defined by conditions on profile properties and event data. Use the /api/segments endpoint to create segments with conditions referencing the 'Placed Order' event metric, filtering by value, recency, or product category. Install with pip install jentic and execute the search-load-execute flow.

### Does the Klaviyo API support both email and SMS campaigns?

Yes. The /api/campaigns endpoint supports creating both email and SMS campaign types. Campaign messages are created via /api/campaign-messages with channel-specific content. Flows can include both email and SMS actions in the same automation sequence, with channel selection per action step.

### How do I sync my product catalog with Klaviyo?

Use POST /api/catalog-item-bulk-create-jobs to import items in bulk with fields including title, price, description, URL, and image URL. Variants are synced via /api/catalog-variants. Categories are managed at /api/catalog-categories. Catalog data powers personalized product blocks in emails showing items relevant to each recipient's browsing and purchase history.

### Can I retrieve flow performance metrics through the Klaviyo API?

Yes. GET /api/flows returns all flows with their status. Individual flow actions at /api/flow-actions/{id} expose per-step metrics. For aggregate reporting, use the /api/segment-series-reports and /api/segment-values-reports endpoints with flow-related metric filters to get conversion and revenue data.

### Can I limit what my agent is allowed to do with the Klaviyo API?

Yes. Jentic One is self-hosted by you, so your own rules decide which Klaviyo operations and credentials the agent may use. Because most Klaviyo writes carry the profile, event, or campaign in the request body rather than pinning a resource in the URL path, you scope by operation: grant only the operations the agent needs, such as reading profiles and segments or recording events via /api/events. You can leave higher-impact operations like campaign sends out of scope unless you explicitly add them.
