tools/integrations/klaviyo.md
E-commerce email and SMS marketing platform with profiles, flows, campaigns, segments, and event tracking.
| Integration | Available | Notes |
|---|---|---|
| API | ✓ | REST API with JSON:API spec, revision-versioned |
| MCP | - | Not available |
| CLI | ✓ | klaviyo.js |
| SDK | ✓ | Python, Node.js, Ruby, PHP, Java, C# |
Authorization: Klaviyo-API-Key {private_api_key}revision: 2024-10-15 (required on all requests)pk_; public keys (6-char site ID) are for client-side onlyGET https://a.klaviyo.com/api/profiles/?page[size]=20
# Filter by email
GET https://a.klaviyo.com/api/profiles/?filter=equals(email,"[email protected]")
POST https://a.klaviyo.com/api/profiles/
{
"data": {
"type": "profile",
"attributes": {
"email": "[email protected]",
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+15551234567"
}
}
}
PATCH https://a.klaviyo.com/api/profiles/{profileId}/
{
"data": {
"type": "profile",
"id": "{profileId}",
"attributes": {
"first_name": "Updated Name"
}
}
}
GET https://a.klaviyo.com/api/lists/
POST https://a.klaviyo.com/api/lists/
{
"data": {
"type": "list",
"attributes": {
"name": "Newsletter Subscribers"
}
}
}
POST https://a.klaviyo.com/api/lists/{listId}/relationships/profiles/
{
"data": [
{ "type": "profile", "id": "{profileId1}" },
{ "type": "profile", "id": "{profileId2}" }
]
}
POST https://a.klaviyo.com/api/events/
{
"data": {
"type": "event",
"attributes": {
"metric": {
"data": {
"type": "metric",
"attributes": { "name": "Placed Order" }
}
},
"profile": {
"data": {
"type": "profile",
"attributes": { "email": "[email protected]" }
}
},
"properties": {
"value": 99.99,
"items": ["Product A"]
},
"time": "2025-01-15T10:00:00Z"
}
}
}
GET https://a.klaviyo.com/api/campaigns/?filter=equals(messages.channel,"email")
GET https://a.klaviyo.com/api/flows/
PATCH https://a.klaviyo.com/api/flows/{flowId}/
{
"data": {
"type": "flow",
"id": "{flowId}",
"attributes": {
"status": "live"
}
}
}
GET https://a.klaviyo.com/api/metrics/
GET https://a.klaviyo.com/api/segments/
Klaviyo uses the JSON:API specification. All request/response bodies use { "data": { "type": "...", "attributes": {...} } } format. Relationships are managed via /relationships/ sub-endpoints. The revision header is required on every request and determines API behavior version.
email - Email addressphone_number - Phone for SMSfirst_name, last_name - Name fieldsproperties - Custom properties objectsubscriptions - Email/SMS subscription statusmetric - The metric/event nameproperties - Custom event propertiestime - Event timestampvalue - Monetary value (for revenue tracking)send_count - Number of sendsopen_rate - Open percentageclick_rate - Click percentagerevenue - Attributed revenuepage[size] - Results per page (default 20, max 100)page[cursor] - Cursor for paginationfilter - Filter expressions (e.g., equals(email,"[email protected]"))sort - Sort field (prefix - for descending)include - Include related resourcesfields[resource] - Sparse fieldsetsRateLimit-Limit, RateLimit-Remaining, RateLimit-Reset