Klaviyo’s API v2023 is one of the most modern and well-designed ESP APIs on the market. Stable date-versioned schema (revision header per request), 5 official SDKs, generous rate limits with distinct steady-state and burst budgets per endpoint category. What sets Klaviyo apart from every other marketing ESP in 2026: it ships an official Model Context Protocol server, Generally Available, letting Claude Desktop, Cursor, and ChatGPT (Pro/Plus) drive Klaviyo operations through natural language. This tab inventories the API surface, MCP capabilities, and the gotchas ecommerce buyers need to evaluate before committing.
Model Context Protocol is the emerging standard for connecting LLM agents to external tools. Klaviyo is one of the first ecommerce marketing platforms to ship an official MCP server past the BETA phase — a signal of how seriously the company treats AI-agent-driven workflows.
The Klaviyo MCP Server is officially maintained by Klaviyo (not community-forked) and reached General Availability in 2026 after a beta phase. Coverage spans profile operations (create, update, search), event tracking, segment management, campaign creation and sending, flow inspection, template management, and reporting queries. Compatible with Claude Desktop, Cursor, VSCode, and ChatGPT Pro/Plus (developer mode). Klaviyo is the first marketing-focused ESP to reach MCP GA status — competitor MCPs are either community-built (Mailchimp) or still BETA (MailerSend).
Three ways to reach Klaviyo from an AI agent as of August 2026, ordered by maturity. Only the first is official Klaviyo, and it is the most maintained.
First-party MCP server, Generally Available in 2026. Wide coverage: profiles, events, segments, campaigns, flows, templates, reporting. Compatible with Claude Desktop, Cursor, VSCode, ChatGPT Pro/Plus.
Bridge access via Zapier’s MCP layer (9,000+ integrations available through one endpoint). Useful if you already run Zapier and want unified MCP surface. Each MCP tool call consumes Zapier task credits.
Third-party community MCP wrappers that extend the official Klaviyo server with additional tools. Check maintenance status before adopting — the official server covers most use cases.
Klaviyo’s API v2023 uses a date-based revision system (similar to Stripe): every request specifies a revision header, and Klaviyo maintains backward compatibility per revision. This is unusually developer-friendly for the ESP category.
| Base URL | https://a.klaviyo.com/api |
|---|---|
| Response format | JSON:API spec (typed relationships, sparse fieldsets, pagination cursors) |
| Revision header | revision: 2023-10-15 (example) — required, date format |
| Authentication (server-side) | Authorization: Klaviyo-API-Key YOUR_PRIVATE_KEY |
| Authentication (client-side) | Public API key in query string (limited to specific endpoints) |
| Rate limits | Per-endpoint burst + steady-state limits (see rate-limits section) |
| Pagination | Cursor-based via page[cursor] and page[size] (max 100) |
| Sparse fieldsets | fields[profile]=email,phone_number to shrink payload |
| Response on rate exceed | HTTP 429 with Retry-After header |
| Bulk operations | Async job endpoints for profile imports, exports, segment operations |
The JSON:API spec adds some verbosity (every object has type, id, attributes, relationships wrappers) but delivers cleaner semantics for graph-like customer data. If you have not used JSON:API before, expect a 30-minute learning curve; the official SDKs abstract most of the ceremony away.
Two API key types, both operating through custom HTTP headers.
Used for the majority of API calls: profiles, events, segments, campaigns, flows, templates, reporting. Full read/write access at the account level. Generate under Account › Settings › API Keys. Send in the Authorization header:
Authorization: Klaviyo-API-Key pk_XXXXXXXXXXXXXXXX revision: 2023-10-15 Content-Type: application/json Accept: application/json
Private keys support optional scopes: read-only, campaign management, profile management, etc. Scoped keys are the recommended pattern for third-party integrations — unlike most ESPs, Klaviyo genuinely offers granular scopes.
Used for browser-safe operations: track events from client-side JavaScript, identify profiles, subscribe to lists. Six-character alphanumeric ID passed as a query parameter or in JavaScript SDK config. Cannot be used for read operations or destructive actions — safe to expose in front-end code.
Klaviyo publishes per-endpoint rate limits with distinct burst (short-window peak) and steady-state (per-minute sustained) buckets. This is more granular than any competitor ESP in 2026 — use it to your advantage when planning batch operations.
| Endpoint category | Burst limit | Steady-state |
|---|---|---|
| Profiles (create, update, get) | 75/s | 700/min |
| Events (track custom events) | 350/s | 3,500/min |
| Lists / Segments (read) | 75/s | 700/min |
| Campaigns (CRUD) | 10/s | 150/min |
| Flows (CRUD) | 3/s | 60/min |
| Templates | 10/s | 150/min |
| Bulk profile import (async) | N/A (job-based) | 10 concurrent jobs |
| Response on exceed | HTTP 429 + Retry-After header | Retry per header value |
The Events endpoint at 3,500/min steady-state is designed for high-volume ecommerce event ingestion (order placed, viewed product, added to cart, checkout started). For bulk profile operations, use the async job endpoints instead of looping single-profile calls — the job endpoints do not consume the 75/s profile burst budget.
Five official client libraries maintained by Klaviyo. All auto-generated from the OpenAPI spec, updated per API revision release.
| Language | Package | Install | Repo |
|---|---|---|---|
| Python | klaviyo-api | pip install klaviyo-api | GitHub |
| PHP | klaviyo/api | composer require klaviyo/api | GitHub |
| Ruby | klaviyo-api-sdk | gem install klaviyo-api-sdk | GitHub |
| Node.js / TypeScript | klaviyo-api | npm install klaviyo-api | GitHub |
| .NET | Klaviyo.SDK | Install-Package Klaviyo.SDK | GitHub |
No official Go, Rust, Kotlin, or Swift SDKs. For those languages, call the API directly with your language’s HTTP client — the OpenAPI spec is public and can be used to generate a client with openapi-generator if needed. The 5 official SDKs are actively maintained per API revision — new SDK releases follow each date-versioned API revision within days.
The endpoint groups you will actually use in production. Full reference at developers.klaviyo.com.
| Resource | HTTP methods | Description |
|---|---|---|
| Profiles /profiles | GET, POST, PATCH | Full CRUD on profiles. Bulk import via async job endpoints. Custom properties as JSON. |
| Events /events | GET, POST | Track custom events (order placed, viewed product, added to cart). 3,500/min steady-state limit. |
| Lists /lists | GET, POST, PATCH, DELETE | Static profile lists. Manage members via /lists/{id}/relationships/profiles. |
| Segments /segments | GET | Read dynamic segments (definition + member profiles). Segments are UI-created, API read-only. |
| Campaigns /campaigns | GET, POST, PATCH, DELETE | Full CRUD on email and SMS campaigns. Schedule, cancel, send now, get reports. |
| Campaign send job /campaign-send-jobs | POST, GET | Trigger a campaign send. Async job with status polling. |
| Flows /flows | GET, PATCH | List flows, activate/deactivate, view messages. Flow creation is UI-only. |
| Templates /templates | GET, POST, PATCH, DELETE | Full CRUD on email templates. HTML + text bodies. |
| Metrics /metrics | GET | Query aggregate metric definitions (Placed Order, Received Email, etc.) and export values. |
| Reporting queries /reporting/campaign-values | POST | Query campaign performance (opens, clicks, revenue) by date range and grouping. |
| Data Privacy /data-privacy-deletion-jobs | POST, GET | GDPR-style right-to-erasure requests. Async job for profile + associated data removal. |
| Bulk profile import /profile-bulk-import-jobs | POST, GET | Async bulk profile upsert. Preferred over looping POST /profiles for large imports. |
| Catalog items /catalog-items | GET, POST, PATCH, DELETE | Product catalog for ecommerce recommendations and back-in-stock flows. Auto-synced by Shopify integration. |
Two representative snippets covering the most common first-day tasks: track an event, then upsert a profile.
from klaviyo_api import KlaviyoAPI
client = KlaviyoAPI(
api_key='pk_YOUR_PRIVATE_KEY',
max_delay=60,
max_retries=3
)
# Track a "Placed Order" event, upserting profile in the same call
response = client.Events.create_event({
'data': {
'type': 'event',
'attributes': {
'properties': {
'OrderId': 'ORD-1234',
'Total': 89.50,
'Items': ['Product A', 'Product B']
},
'metric': {
'data': {
'type': 'metric',
'attributes': {'name': 'Placed Order'}
}
},
'profile': {
'data': {
'type': 'profile',
'attributes': {
'email': 'customer@example.com',
'first_name': 'Alaa',
'last_name': 'Touil'
}
}
}
}
}
})
print(f"Event tracked: {response['data']['id']}")const { KlaviyoApi } = require('klaviyo-api');
const client = new KlaviyoApi({ apiKey: 'pk_YOUR_PRIVATE_KEY' });
async function sendCampaign(listId) {
// 1. Create the campaign
const campaign = await client.Campaigns.createCampaign({
data: {
type: 'campaign',
attributes: {
name: 'Weekly Newsletter',
audiences: { included: [listId] },
send_options: { use_smart_sending: true },
tracking_options: {
is_add_utm: true,
utm_params: [{ name: 'utm_source', value: 'klaviyo' }]
}
}
}
});
// 2. Set message content (HTML + subject) - separate call
// 3. Trigger send
const job = await client.Campaigns.createCampaignSendJob({
data: {
type: 'campaign-send-job',
id: campaign.data.id
}
});
console.log(`Campaign send job created: ${job.data.id}`);
}
sendCampaign('LIST_ID_HERE').catch(console.error);Every API v2023 request MUST include a revision header with a valid date (e.g., revision: 2023-10-15). Missing this returns HTTP 400 with a message about missing revision. Pin your revision explicitly and only bump it when you have tested the newer schema.
Klaviyo’s API returns JSON:API-shaped payloads with data.type, data.id, data.attributes, and data.relationships. This is more ceremony than a plain REST API but delivers cleaner semantics for related objects. Use the SDKs to abstract the wrapping if you find the raw shape verbose.
You can list, activate, deactivate, and inspect flows via the API. You cannot create a new flow programmatically — the flow builder is UI-only (same pattern as Mailchimp’s Customer Journey Builder). Plan around this: build flow templates in the UI, then use the API to bulk-add profiles or trigger flow enrollment via events.
Similar to flows: you can read segment definitions and member profiles via API, but cannot create or modify segments programmatically. Use /lists for API-managed groupings; use /segments when the segment must be UI-editable and dynamic.
Each endpoint category has its own burst + steady-state budget. Hitting the campaign endpoint (10/s burst) does not consume the events endpoint budget (350/s burst). Plan your request patterns per endpoint category, and monitor Retry-After headers per endpoint.
Klaviyo maintains a public API changelog at developers.klaviyo.com/en/reference/api-revisions. Key items to know:
Yes. The Klaviyo MCP Server reached General Availability in 2026 after a beta phase. Officially maintained by Klaviyo. Wide coverage: profiles, events, segments, campaigns, flows, templates, reporting. Compatible with Claude Desktop, Cursor, VSCode, and ChatGPT Pro/Plus (developer mode). Klaviyo is the first marketing-focused ESP to reach MCP GA status — competitor MCPs are either community-built (Mailchimp) or still BETA (MailerSend).
Five official SDKs: Python, PHP, Ruby, Node.js/TypeScript, .NET. All auto-generated from the OpenAPI spec and updated per API revision release. No official Go, Rust, Kotlin, or Swift SDK — for those languages, use the public OpenAPI spec with openapi-generator or call the API directly with your standard HTTP client.
Per-endpoint burst and steady-state limits. Profiles: 75/s burst, 700/min steady. Events: 350/s burst, 3,500/min steady. Campaigns: 10/s burst, 150/min steady. Flows: 3/s burst, 60/min steady. HTTP 429 responses include a Retry-After header with exact wait time in seconds — implement exponential backoff using the header value. Unlike Mailchimp or Postmark, Klaviyo publishes concrete limits per endpoint category.
Two API key types. Private API key for server-side operations: Authorization: Klaviyo-API-Key pk_XXXXXXXXXXXXXXXX. Supports optional granular scopes (read-only, full, object-scoped) — unusual and welcome vs competitor ESPs. Public API key for browser-safe operations: 6-character alphanumeric ID in query string or JavaScript SDK config. Cannot read data or perform destructive actions.
Lists are static profile groupings, fully CRUD-able via API. Segments are dynamic definitions (rules-based membership) that Klaviyo evaluates continuously. Segments are UI-created and API read-only. Use /lists when you need programmatic membership control; use /segments when segmentation must be UI-editable and rule-based.
Yes. Install the official Klaviyo MCP Server and add it to your Claude Desktop or Cursor config. Configure with a Klaviyo Private API key. Once loaded, you can prompt operations like “Send the summer promo campaign to the VIP customers segment” and the agent creates the campaign and triggers the send through Klaviyo. Coverage includes profiles, events, segments, campaigns, flows, templates, and reporting.
Deprecated. Klaviyo has communicated a shutoff timeline for the pre-2023 APIs. All new development should target the current API v2023 with date-versioned revisions. Legacy integrations still on v1 or v2 should migrate promptly — the v2023 API offers cleaner semantics (JSON:API spec), granular scopes, and MCP compatibility.
This review follows our email infrastructure testing methodology. We disclose affiliate relationships in our editorial independence policy.