> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condotta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Klaviyo

> Customer profiles, audience lists, campaigns, flows, and event tracking.

The Klaviyo connector lets your workflows manage customer profiles, audience lists, marketing campaigns, automation flows, and track custom events through Klaviyo's REST API.

> [!NOTE]
>
> For the full API reference, see the [Klaviyo API documentation](https://developers.klaviyo.com/en/reference/api_overview).

> [!NOTE]
>
> This connector requires a **connection** with valid credentials before it can be used in a workflow. See [Managing Connections](https://docs.condotta.ai/platform/connections.md) for setup instructions.

## Connection setup

**1. Get your private API key**

Log in to [Klaviyo](https://www.klaviyo.com) and go to **Settings > API Keys**. Create a new **Private API Key** with the scopes your workflows need.

**2. Add the connection in Condotta**

Go to **Connections** in Condotta, click **Add Connection**, select **Klaviyo**, and enter:

* **API Key**: Your Klaviyo private API key

## Tools

### Profiles

> [accordion] list-profiles: List customer profiles
>
> **filter** `string`
>
> Filter string (e.g., `equals(email,"john@example.com")`).
>
> **sort** `string`
>
> Sort field (e.g., `-created` for newest first).
>
> **pageSize** `number`
>
> Results per page (max 100).
>
> **pageCursor** `string`
>
> Cursor for pagination.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "filter": "greater-than(created,2024-01-01T00:00:00Z)",
>   "sort": "-created",
>   "pageSize": 2
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": [
>     {
>       "type": "profile",
>       "id": "01GDDKASAP8TKDDA2GRZDSVP4H",
>       "attributes": {
>         "email": "sarah.mason@example.com",
>         "phone_number": "+15005550006",
>         "first_name": "Sarah",
>         "last_name": "Mason",
>         "created": "2024-03-15T10:30:00+00:00",
>         "updated": "2024-06-01T14:22:00+00:00"
>       }
>     },
>     {
>       "type": "profile",
>       "id": "01GDDKASAP8TKDDA2GRZDSVP4I",
>       "attributes": {
>         "email": "james.wilson@example.com",
>         "first_name": "James",
>         "last_name": "Wilson",
>         "created": "2024-02-20T08:15:00+00:00",
>         "updated": "2024-05-10T09:00:00+00:00"
>       }
>     }
>   ],
>   "links": {
>     "self": "https://a.klaviyo.com/api/profiles/?page%5Bsize%5D=2",
>     "next": "https://a.klaviyo.com/api/profiles/?page%5Bcursor%5D=bmV4dC1wYWdl&page%5Bsize%5D=2"
>   }
> }
> ```

> [accordion] get-profile: Get profile by ID
>
> **id** `string` *required*
>
> Klaviyo profile ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "01GDDKASAP8TKDDA2GRZDSVP4H"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "type": "profile",
>     "id": "01GDDKASAP8TKDDA2GRZDSVP4H",
>     "attributes": {
>       "email": "sarah.mason@example.com",
>       "phone_number": "+15005550006",
>       "first_name": "Sarah",
>       "last_name": "Mason",
>       "organization": "Acme Corp",
>       "title": "Marketing Manager",
>       "location": {
>         "city": "Boston",
>         "region": "MA",
>         "country": "US",
>         "zip": "02101"
>       },
>       "properties": {
>         "plan": "premium",
>         "signup_source": "website"
>       },
>       "created": "2024-03-15T10:30:00+00:00",
>       "updated": "2024-06-01T14:22:00+00:00"
>     }
>   }
> }
> ```

> [accordion] create-profile: Create a profile
>
> **attributes** `object` *required*
>
> Profile attributes: `email`, `phone_number`, `first_name`, `last_name`, `properties`, etc.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "attributes": {
>     "email": "new.customer@example.com",
>     "first_name": "Emily",
>     "last_name": "Chen",
>     "phone_number": "+15005550007",
>     "location": {
>       "city": "San Francisco",
>       "region": "CA",
>       "country": "US"
>     },
>     "properties": {
>       "plan": "free",
>       "signup_source": "checkout"
>     }
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "type": "profile",
>     "id": "01HWKAJ9RPYXMZ4NVBQ2NQXG5A",
>     "attributes": {
>       "email": "new.customer@example.com",
>       "first_name": "Emily",
>       "last_name": "Chen",
>       "phone_number": "+15005550007",
>       "created": "2024-06-15T12:00:00+00:00",
>       "updated": "2024-06-15T12:00:00+00:00"
>     }
>   }
> }
> ```

> [accordion] update-profile: Update a profile
>
> **id** `string` *required*
>
> Klaviyo profile ID.
>
> **attributes** `object` *required*
>
> Attributes to update.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "01GDDKASAP8TKDDA2GRZDSVP4H",
>   "attributes": {
>     "first_name": "Sarah",
>     "last_name": "Mason-Smith",
>     "properties": {
>       "plan": "enterprise"
>     }
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "type": "profile",
>     "id": "01GDDKASAP8TKDDA2GRZDSVP4H",
>     "attributes": {
>       "email": "sarah.mason@example.com",
>       "first_name": "Sarah",
>       "last_name": "Mason-Smith",
>       "properties": {
>         "plan": "enterprise",
>         "signup_source": "website"
>       },
>       "updated": "2024-06-15T14:30:00+00:00"
>     }
>   }
> }
> ```

### Lists

> [accordion] list-lists: List audience lists
>
> No parameters required.
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": [
>     {
>       "type": "list",
>       "id": "Y6nRLr",
>       "attributes": {
>         "name": "Newsletter Subscribers",
>         "created": "2024-01-10T08:00:00+00:00",
>         "updated": "2024-06-01T12:00:00+00:00"
>       }
>     },
>     {
>       "type": "list",
>       "id": "X5mQKs",
>       "attributes": {
>         "name": "VIP Customers",
>         "created": "2024-02-15T10:00:00+00:00",
>         "updated": "2024-05-20T09:30:00+00:00"
>       }
>     }
>   ]
> }
> ```

> [accordion] add-profiles-to-list: Add profiles to a list
>
> **listId** `string` *required*
>
> Klaviyo list ID.
>
> **profileIds** `string[]` *required*
>
> Array of profile IDs to add.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "listId": "Y6nRLr",
>   "profileIds": [
>     "01GDDKASAP8TKDDA2GRZDSVP4H",
>     "01HWKAJ9RPYXMZ4NVBQ2NQXG5A"
>   ]
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true
> }
> ```

### Campaigns & Flows

> [accordion] list-campaigns: List campaigns
>
> **filter** `string`
>
> Filter string (e.g., `equals(messages.channel,"email")`).
>
> **Example request:**
>
> ```json theme={null}
> {
>   "filter": "equals(messages.channel,\"email\")"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": [
>     {
>       "type": "campaign",
>       "id": "01HWKAJ9RPYXMZ4NVBQ2CAMP1",
>       "attributes": {
>         "name": "Summer Sale Announcement",
>         "status": "sent",
>         "audiences": {
>           "included": ["Y6nRLr"]
>         },
>         "send_strategy": {
>           "method": "immediate"
>         },
>         "created_at": "2024-06-01T08:00:00+00:00",
>         "sent_at": "2024-06-01T10:00:00+00:00"
>       }
>     }
>   ]
> }
> ```

> [accordion] list-flows: List automation flows
>
> **filter** `string`
>
> Filter string (e.g., `equals(status,"live")`).
>
> **Example request:**
>
> ```json theme={null}
> {
>   "filter": "equals(status,\"live\")"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": [
>     {
>       "type": "flow",
>       "id": "VJxwRK",
>       "attributes": {
>         "name": "Welcome Series",
>         "status": "live",
>         "trigger_type": "Added to List",
>         "created": "2024-01-05T09:00:00+00:00",
>         "updated": "2024-05-15T11:00:00+00:00"
>       }
>     },
>     {
>       "type": "flow",
>       "id": "WKyxSL",
>       "attributes": {
>         "name": "Abandoned Cart",
>         "status": "live",
>         "trigger_type": "Metric",
>         "created": "2024-02-10T14:00:00+00:00",
>         "updated": "2024-06-01T08:00:00+00:00"
>       }
>     }
>   ]
> }
> ```

### Events

> [accordion] list-events: List tracked events
>
> **filter** `string`
>
> Filter string.
>
> **sort** `string`
>
> Sort field (e.g., `-datetime`).
>
> **pageSize** `number`
>
> Results per page (max 100).
>
> **Example request:**
>
> ```json theme={null}
> {
>   "sort": "-datetime",
>   "pageSize": 2
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": [
>     {
>       "type": "event",
>       "id": "4vRpBQ16wa",
>       "attributes": {
>         "metric_id": "UMTlbk",
>         "profile_id": "01GDDKASAP8TKDDA2GRZDSVP4H",
>         "timestamp": 1718460000,
>         "event_properties": {
>           "OrderId": "ORD-5678",
>           "Items": ["Blue T-Shirt", "Running Shoes"],
>           "Value": 129.99
>         },
>         "datetime": "2024-06-15T14:00:00+00:00"
>       }
>     }
>   ]
> }
> ```

> [accordion] create-event: Track a custom event
>
> **attributes** `object` *required*
>
> Event attributes including `metric` (name), `profile` (email/id), `properties`, `time`, `value`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "attributes": {
>     "metric": {
>       "data": {
>         "type": "metric",
>         "attributes": {
>           "name": "Placed Order"
>         }
>       }
>     },
>     "profile": {
>       "data": {
>         "type": "profile",
>         "attributes": {
>           "email": "sarah.mason@example.com"
>         }
>       }
>     },
>     "properties": {
>       "OrderId": "ORD-9012",
>       "Categories": ["Apparel", "Accessories"],
>       "ItemCount": 3
>     },
>     "value": 199.99,
>     "time": "2024-06-15T16:30:00+00:00"
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true
> }
> ```

### Advanced

> [accordion] raw-api-request: Make an arbitrary API request
>
> Send a request to any Klaviyo API endpoint.
> **method** `string` *required* HTTP method: `GET`, `POST`, `PATCH`, `PUT`, or `DELETE`.
> **path** `string` *required* API path (e.g., `/segments` or `/metrics`).
> **body** `object` Request body (JSON:API format for POST/PATCH).
>
> **Example request:**
>
> ```json theme={null}
> {
>   "method": "GET",
>   "path": "/metrics"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": [
>     {
>       "type": "metric",
>       "id": "UMTlbk",
>       "attributes": {
>         "name": "Placed Order",
>         "created": "2024-01-01T00:00:00+00:00",
>         "updated": "2024-06-15T00:00:00+00:00",
>         "integration": {
>           "object": "integration",
>           "id": "0rPhKs",
>           "name": "API"
>         }
>       }
>     }
>   ]
> }
> ```

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.