POST https://a.klaviyo.com/api/lists/{listId}/relationships/profiles/
{
"data": [
{"type": "profile", "id": "{profileId1}"},
{"type": "profile", "id": "{profileId2}"}
]
}
```
### Track event
```bash
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": "user@example.com"}
}
},
"properties": {
"value": 99.99,
"items": ["Product A"]
},
"time": "2025-01-15T10:00:00Z"
}
}
}
```
### List campaigns
```bash
GET https://a.klaviyo.com/api/campaigns/?filter=equals(messages.channel,"email")
```
### List flows
```bash
GET https://a.klaviyo.com/api/flows/
```
### Update flow status
```bash
PATCH https://a.klaviyo.com/api/flows/{flowId}/
{
"data": {
"type": "flow",
"id": "{flowId}",
"attributes": {
"status": "live"
}
}
}
```
### List metrics
```bash
GET https://a.klaviyo.com/api/metrics/
```
### List segments
```bash
GET https://a.klaviyo.com/api/segments/
```
## API Pattern
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.
## Key Metrics
### Profile Fields
-`email` - Email address
-`phone_number` - Phone for SMS
-`first_name`, `last_name` - Name fields
-`properties` - Custom properties object
-`subscriptions` - Email/SMS subscription status
### Event Fields
-`metric` - The metric/event name
-`properties` - Custom event properties
-`time` - Event timestamp
-`value` - Monetary value (for revenue tracking)
### Campaign/Flow Metrics
-`send_count` - Number of sends
-`open_rate` - Open percentage
-`click_rate` - Click percentage
-`revenue` - Attributed revenue
## Parameters
### Common Query Parameters
-`page[size]` - Results per page (default 20, max 100)