Klaviyo Component

Klaviyo is a cloud based email marketing solution that enables e-commerce businesses to create, send, and analyze email and SMS campaigns.
Component key: klaviyo
Description
Klaviyo is a cloud based email marketing solution that enables e-commerce businesses to create, send, and analyze email and SMS campaigns.
Use the component to manage Templates, Campaigns, Events, and more.
API Documentation: The component was built using the Klaviyo API Reference
Connections
API Key
Authentication was developed using the following Documentation
Private keys will have the prefix pk_
followed by a longer alphanumeric string. Klaviyo allows you to generate multiple private keys for your applications. See the Obtain API credentials guide for more information
To Generate a Private Key:
- Log into your Klaviyo account and navigate to settings
- Under the Account tab select API Keys
- Select Create Private API Key
- Name the Key, provide the proper scope level and select Create
- Save and copy the private key into your integration connection configuration.
Input | Notes |
---|---|
API Key password / Required apiKey | Your API Key for Klaviyo |
OAuth 2.0
Authentication was developed using the following Documentation
OAuth configuration requires setting up an app in Klaviyo. See the Set up OAuth guide for more information:
- Log into your Klaviyo account and navigate to the Manage apps page.
- Select Create App
- Name the app and copy your Client ID and Client Secret and enter them into the connection configuration of your integration
- Save and continue to proceed
- Once creation has been completed enter the the following into the Redirect URL field: https://oauth2.prismatic.io/callback and save.
- Select Review Submission to submit the app for completion.
Input | Default | Notes |
---|---|---|
Authorize URL string / Required Hidden Field authorizeUrl | https://www.klaviyo.com/oauth/authorize | |
Client ID string / Required clientId | ||
Client secret password / Required clientSecret | ||
Scopes string scopes | Space separated list of scopes if needed | |
Token URL string / Required Hidden Field tokenUrl | https://a.klaviyo.com/oauth/token |
Data Sources
Select Account
Select an account to use. | key: selectAccount | type: picklist
Input | Notes |
---|---|
Connection connection / Required connection |
Select Campaign
Select a campaign to use. | key: selectCampaign | type: picklist
Input | Notes |
---|---|
Connection connection / Required connection |
Select Profile
Select a profile to use. | key: selectProfile | type: picklist
Input | Notes |
---|---|
Connection connection / Required connection |
Select Template
Select a template to use. | key: selectTemplate | type: picklist
Input | Notes |
---|---|
Connection connection / Required connection |
Actions
Bulk Create Events
Create a batch of events for one or more profiles. | key: bulkCreateEvents
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Events Array code / Required eventsArray | An array of events to create. Check Prismatic documentation for an example. |
{
"data": "Events created successfully."
}
Create Campaign
Creates a campaign given a set of parameters, then returns it. | key: createCampaign
Input | Default | Notes | Example |
---|---|---|---|
Campaign Messages code / Required campaignMessages | The message(s) to send in the campaign. Check Prismatic documentation for an example. | ||
Campaign Name string / Required campaignName | The name of the campaign. | My new campaign | |
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Excluded Audiences string / Required Value List excludedAudiences | A list of excluded audiences. | X7MYfE | |
Included Audiences string / Required Value List includedAudiences | A list of included audiences. | X7MYfE | |
Send Options code sendOptions | The send options for the campaign. Check Prismatic documentation for an example. | ||
Send Strategy code sendStrategy | The send strategy for the campaign. Check Prismatic documentation for an example. | ||
Tracking Options code trackingOptions | The tracking options for the campaign. Check Prismatic documentation for an example. |
{
"data": {
"data": {
"type": "campaign",
"id": "string",
"attributes": {
"name": "string",
"status": "string",
"archived": true,
"audiences": {
"included": [
"Y6nRLr"
],
"excluded": [
"UTd5ui"
]
},
"sendOptions": {
"useSmartSending": true
},
"trackingOptions": {
"isAddUtm": true,
"utmParams": [
{
"name": "utm_medium",
"value": "campaign"
}
],
"isTrackingClicks": true,
"isTrackingOpens": true
},
"sendStrategy": {
"method": "static",
"optionsStatic": {
"datetime": "2025-01-09T14:52:05.906Z",
"isLocal": true,
"sendPastRecipientsImmediately": true
},
"optionsThrottled": {
"datetime": "2025-01-09T14:52:05.906Z",
"throttlePercentage": 0
},
"optionsSto": {
"date": "2024-07-14"
}
},
"createdAt": "2025-01-09T14:52:05.906Z",
"scheduledAt": "2025-01-09T14:52:05.906Z",
"updatedAt": "2025-01-09T14:52:05.906Z",
"sendTime": "2025-01-09T14:52:05.906Z"
},
"relationships": {
"campaignMessages": {
"data": [
{
"type": "campaign-message",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
},
"links": {
"self": "string"
}
}
}
}
Create Event
Create a new event to track a profiles activity. | key: createEvent
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Event Name string / Required eventName | Name of the event. | Viewed Product | |
Event Profile code / Required eventProfile | The profile associated with this event. Check Prismatic documentation for an example. | ||
Event Properties code / Required eventProperties | The properties of the event. Check Prismatic documentation for an example. | ||
Event Time string eventTime | When this event occurred. By default, the time the request was received will be used. | 2024-07-10T14:48:00.000Z | |
Event Unique ID string eventUniqueId | A unique identifier for this event. | 123 | |
Event Value string eventValue | A numeric, monetary value to associate with this event. | 10 | |
Event Value Currency string eventValueCurrency | The ISO 4217 currency code of the value associated with the event. | USD |
{
"data": "Event created successfully."
}
Create List
Create a new list. | key: createList
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
List Name string / Required listName | Newsletter | A helpful name to label the list. | Newsletter |
{
"data": {
"data": {
"type": "list",
"id": "Y6nRLr",
"attributes": {
"name": "Newsletter",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"optInProcess": "double_opt_in"
},
"relationships": {
"profiles": {
"data": [
{
"type": "profile",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
},
"links": {
"self": "string"
}
}
}
}
Create Profile
Create a new profile. | key: createProfile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Email string email | Individual's email address | sarah.mason@klaviyo-demo.com | |
External ID string externalId | A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system. | 12345 | |
First Name string firstName | Individual's first name | Sarah | |
Image string image | URL pointing to the location of a profile image | https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg | |
Last Name string lastName | Individual's last name | Mason | |
Location code location | Location information for the profile. Check Prismatic documentation for an example. | ||
Organization string organization | Name of the company or organization within the company for whom the individual works | Example Corporation | |
Phone Number string phoneNumber | Individual's phone number in E.164 format | +15005550006 | |
Properties code properties | An object containing key/value pairs for any custom properties assigned to this profile. Check Prismatic documentation for an example. | ||
Title string title | Individual's job title | Regional Manager |
{
"data": {
"data": {
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phoneNumber": "+15005550006",
"externalId": "string",
"firstName": "Sarah",
"lastName": "Mason",
"organization": "Example Corporation",
"locale": "en-US",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"lastEventDate": "2022-11-08T00:00:00.000Z",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
},
"subscriptions": {
"email": {
"marketing": {
"canReceiveEmailMarketing": true,
"consent": "SUBSCRIBED",
"consentTimestamp": "2023-02-21T20:07:38.000Z",
"lastUpdated": "2023-02-21T20:07:38.000Z",
"method": "PREFERENCE_PAGE",
"methodDetail": "mydomain.com/signup",
"customMethodDetail": "marketing drive",
"doubleOptin": true,
"suppression": [
{
"reason": "HARD_BOUNCE",
"timestamp": "2023-02-21T20:07:38.000Z"
}
],
"listSuppressions": [
{
"listId": "Y6nRLr",
"reason": "USER_SUPPRESSED",
"timestamp": "2023-02-21T20:07:38.000Z"
}
]
}
},
"sms": {
"marketing": {
"canReceiveSmsMarketing": true,
"consent": "SUBSCRIBED",
"consentTimestamp": "2023-02-21T20:07:38.000Z",
"method": "TEXT",
"methodDetail": "JOIN",
"lastUpdated": "2023-02-21T20:07:38.000Z"
}
}
},
"predictiveAnalytics": {
"historicClv": 93.87,
"predictedClv": 27.24,
"totalClv": 121.11,
"historicNumberOfOrders": 2,
"predictedNumberOfOrders": 0.54,
"averageDaysBetweenOrders": 189,
"averageOrderValue": 46.94,
"churnProbability": 0.89,
"expectedDateOfNextOrder": "2022-11-08T00:00:00.000Z"
}
},
"relationships": {
"lists": {
"data": [
{
"type": "list",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"segments": {
"data": [
{
"type": "segment",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
},
"links": {
"self": "string"
}
}
}
}
Create Segment
Create a segment. | key: createSegment
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Is Starred Segment boolean isStarredSegment | false | Whether the segment is starred. | |
Segment Condition Groups code / Required segmentConditionGroups | The condition groups that define the segment. See Prismatic documentation for an example. | ||
Segment Name string / Required segmentName | The name of the segment. | A segment |
{
"data": {
"data": {
"type": "segment",
"id": "string",
"attributes": {
"name": "Repeat Purchasers",
"definition": {
"conditionGroups": [
{
"conditions": [
{
"type": "profile-group-membership",
"groupIds": [
"string"
],
"timeframeFilter": {
"type": "date",
"operator": "after",
"date": "2022-11-08T00:00:00.000Z"
},
"isMember": true
},
{
"type": "profile-metric",
"metricId": "string",
"measurement": "count",
"measurementFilter": {
"type": "numeric",
"operator": "equals",
"value": 0
},
"timeframeFilter": {
"type": "date",
"operator": "after",
"date": "2022-11-08T00:00:00.000Z"
},
"metricFilters": [
{
"property": "string",
"filter": {
"type": "string",
"operator": "equals",
"value": "string"
}
}
]
},
{
"type": "profile-marketing-consent",
"consent": {
"channel": "email",
"consentStatus": {
"subscription": "any"
},
"canReceiveMarketing": true
}
},
{
"type": "profile-postal-code-distance",
"countryCode": "string",
"postalCode": "string",
"unit": "kilometers",
"filter": {
"type": "numeric",
"operator": "greater-than",
"value": 0
}
},
{
"type": "profile-property",
"property": "string",
"filter": {
"type": "string",
"operator": "contains",
"value": "string"
}
},
{
"type": "profile-region",
"inRegion": true,
"region": "european_union"
},
{
"type": "profile-predictive-analytics",
"dimension": "average_days_between_orders",
"filter": {
"type": "numeric",
"operator": "equals",
"value": 0
}
},
{
"type": "profile-predictive-analytics",
"dimension": "predicted_gender",
"filter": {
"type": "string",
"operator": "equals",
"value": "likely_female"
}
}
]
}
]
},
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"isActive": true,
"isProcessing": true,
"isStarred": true
},
"relationships": {
"profiles": {
"data": [
{
"type": "profile",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
},
"links": {
"self": "string"
}
}
}
}
Create Template
Create a new custom HTML template. | key: createTemplate
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Editor Type string / Required editorType | Restricted to CODE. | CODE | |
Template HTML string templateHtml | The HTML content of the template. | <html><body><p>Hello, world!</p></body></html> | |
Template Name string / Required templateName | The name of the template. | Monthly Newsletter Template | |
Template Text string templateText | The text content of the template. | Hello, world! |
{
"data": {
"data": {
"type": "template",
"id": "string",
"attributes": {
"name": "string",
"editorType": "string",
"html": "string",
"text": "string",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
}
}
}
}
Delete Campaign
Delete a campaign with the given campaign ID. | key: deleteCampaign
Input | Default | Notes | Example |
---|---|---|---|
Campaign ID string / Required campaignId | The ID of the campaign. | 01J2DNH88028WCAA2RK0BYBZVG | |
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. |
Delete List
Delete a list with the given list ID. | key: deleteList
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
List ID string / Required listId | The unique identifier of the list. | RE83th |
Delete Segment
Delete a segment with the given segment ID. | key: deleteSegment
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Segment ID string / Required segmentId | The ID of the segment. | WwKnkd |
Delete Template
Delete a template with the given template ID. | key: deleteTemplate
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Template ID string / Required templateId | The ID of the template. | 123456 |
{
"data": "Template deleted successfully."
}
Get Account
Retrieve a single account object by its account ID. | key: getAccount
Input | Default | Notes | Example |
---|---|---|---|
Account ID string / Required accountId | The ID of the account to retrieve. | AbC123 | |
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsAccount | The fields to include in the response. |
{
"data": {
"data": {
"type": "account",
"id": "string",
"attributes": {
"testAccount": true,
"contactInformation": {
"defaultSenderName": "Klaviyo Demo",
"defaultSenderEmail": "contact@klaviyo-demo.com",
"websiteUrl": "https://www.klaviyo.com",
"organizationName": "Klaviyo Demo",
"streetAddress": {
"address1": "125 Summer Street",
"address2": "5th Floor",
"city": "Boston",
"region": "MA",
"country": "US",
"zip": "04323"
}
},
"industry": "Software / SaaS",
"timezone": "US/Eastern",
"preferredCurrency": "USD",
"publicApiKey": "AbC123",
"locale": "en-US"
},
"links": {
"self": "string"
}
}
}
}
Get Campaign
Returns a specific campaign based on a required id. | key: getCampaign
Input | Default | Notes | Example |
---|---|---|---|
Campaign ID string / Required campaignId | The ID of the campaign. | 01J2DNH88028WCAA2RK0BYBZVG | |
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsCampaign | The fields to include in the response. |
{
"data": {
"data": {
"type": "campaign",
"id": "string",
"attributes": {
"name": "string",
"status": "string",
"archived": true,
"audiences": {
"included": [
"Y6nRLr"
],
"excluded": [
"UTd5ui"
]
},
"sendOptions": {
"useSmartSending": true
},
"trackingOptions": {
"isAddUtm": true,
"utmParams": [
{
"name": "utmMedium",
"value": "campaign"
}
],
"isTrackingClicks": true,
"isTrackingOpens": true
},
"sendStrategy": {
"method": "static",
"optionsStatic": {
"datetime": "2022-11-08T00:00:00.000Z",
"isLocal": true,
"sendPastRecipientsImmediately": true
},
"optionsThrottled": {
"datetime": "2024-07-14T01:37:30.052Z",
"throttlePercentage": 0
},
"optionsSto": {
"date": "2024-07-14"
}
},
"createdAt": "2022-11-08T00:00:00.000Z",
"scheduledAt": "2022-11-08T00:00:00.000Z",
"updatedAt": "2022-11-08T00:00:00.000Z",
"sendTime": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
},
"relationships": {
"campaignMessages": {
"data": [
{
"type": "campaign-message",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
},
"included": [
{
"type": "campaign-message",
"id": "string",
"attributes": {
"label": "string",
"channel": "string",
"content": {
"subject": "Buy our product!",
"previewText": "My preview text",
"fromEmail": "store@my-company.com",
"fromLabel": "My Company",
"replyToEmail": "reply-to@my-company.com",
"ccEmail": "cc@my-company.com",
"bccEmail": "bcc@my-company.com"
},
"sendTimes": [
{
"datetime": "2022-11-08T00:00:00.000Z",
"isLocal": true
}
],
"renderOptions": {
"shortenLinks": true,
"addOrgPrefix": true,
"addInfoLink": true,
"addOptOutLanguage": false
},
"createdAt": "2022-11-08T00:00:00.000Z",
"updatedAt": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
}
},
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
}
Get Event
Get an event with the given event ID. | key: getEvent
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Event ID string / Required eventId | The ID of the event. | 5nJKMJuHUQy | |
Fields string Value List fieldsEvent | The fields to include in the response. |
{
"data": {
"data": {
"type": "event",
"id": "string",
"attributes": {
"timestamp": 0,
"eventProperties": {},
"datetime": "2022-11-08T01:23:45.000Z",
"uuid": "string"
},
"links": {
"self": "string"
},
"relationships": {
"profile": {
"data": {
"type": "profile",
"id": "string"
},
"links": {
"self": "string",
"related": "string"
}
},
"metric": {
"data": {
"type": "metric",
"id": "string"
},
"links": {
"self": "string",
"related": "string"
}
},
"attributions": {
"data": [
{
"type": "attribution",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
},
"included": [
{
"type": "attribution",
"id": "925e385b52fb405715f3616c337cc65c",
"relationships": {
"event": {
"data": {
"type": "event",
"id": "string"
}
},
"attributedEvent": {
"data": {
"type": "event",
"id": "string"
}
},
"campaign": {
"data": {
"type": "campaign",
"id": "string"
}
},
"campaignMessage": {
"data": {
"type": "campaign-message",
"id": "string"
}
},
"flow": {
"data": {
"type": "flow",
"id": "string"
}
},
"flowMessage": {
"data": {
"type": "flow-message",
"id": "string"
}
},
"flowMessageVariation": {
"data": {
"type": "flow-message",
"id": "string"
}
}
},
"links": {
"self": "string"
}
},
{
"type": "metric",
"id": "string",
"attributes": {
"name": "string",
"created": "string",
"updated": "string",
"integration": {}
},
"links": {
"self": "string"
}
},
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phoneNumber": "+15005550006",
"externalId": "string",
"firstName": "Sarah",
"lastName": "Mason",
"organization": "Example Corporation",
"locale": "en-US",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2025-01-09T14:52:05.906Z",
"updated": "2025-01-09T14:52:05.906Z",
"lastEventDate": "2025-01-09T14:52:05.906Z",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
}
},
"links": {
"self": "string"
}
}
]
}
}
Get Image
Get the image with the given image ID. | key: getImage
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsImage | The fields to include in the response. | ||
Image ID string / Required imageId | The ID of the image. | 155463624 |
{
"data": {
"data": {
"type": "image",
"id": "7",
"attributes": {
"name": "string",
"imageUrl": "string",
"format": "string",
"size": 0,
"hidden": true,
"updatedAt": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
}
}
}
}
Get List
Get a list with the given list ID. | key: getList
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsList | The fields to include in the response. | ||
List ID string / Required listId | The unique identifier of the list. | RE83th |
{
"data": {
"data": {
"type": "list",
"id": "Y6nRLr",
"attributes": {
"name": "Newsletter",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"optInProcess": "double_opt_in",
"profileCount": 0
},
"links": {
"self": "string"
},
"relationships": {
"profiles": {
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
},
"included": [
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
}
Get Profile
Get the profile with the given profile ID. | key: getProfile
Input | Default | Notes | Example |
---|---|---|---|
Additional Profile Fields string Value List additionalFieldsProfile | Request additional fields not included by default in the response. | ||
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsProfile | The fields to include in the response. | ||
Profile ID string / Required profileId | Unique identifier for the profile. | 01J18FVB5H8XR1X9AXEQFVRW7A |
{
"data": {
"data": {
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phoneNumber": "+15005550006",
"externalId": "string",
"firstName": "Sarah",
"lastName": "Mason",
"organization": "Example Corporation",
"locale": "en-US",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"lastEventDate": "2022-11-08T00:00:00.000Z",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
},
"subscriptions": {
"email": {
"marketing": {
"canReceiveEmailMarketing": true,
"consent": "SUBSCRIBED",
"consentTimestamp": "2023-02-21T20:07:38.000Z",
"lastUpdated": "2023-02-21T20:07:38.000Z",
"method": "PREFERENCE_PAGE",
"methodDetail": "mydomain.com/signup",
"customMethodDetail": "marketing drive",
"doubleOptin": true,
"suppression": [
{
"reason": "HARD_BOUNCE",
"timestamp": "2023-02-21T20:07:38.000Z"
}
],
"listSuppressions": [
{
"listId": "Y6nRLr",
"reason": "USER_SUPPRESSED",
"timestamp": "2023-02-21T20:07:38.000Z"
}
]
}
},
"sms": {
"marketing": {
"canReceiveSmsMarketing": true,
"consent": "SUBSCRIBED",
"consentTimestamp": "2023-02-21T20:07:38.000Z",
"method": "TEXT",
"methodDetail": "JOIN",
"lastUpdated": "2023-02-21T20:07:38.000Z"
}
}
},
"predictiveAnalytics": {
"historicClv": 93.87,
"predictedClv": 27.24,
"totalClv": 121.11,
"historicNumberOfOrders": 2,
"predictedNumberOfOrders": 0.54,
"averageDaysBetweenOrders": 189,
"averageOrderValue": 46.94,
"churnProbability": 0.89,
"expectedDateOfNextOrder": "2022-11-08T00:00:00.000Z"
}
},
"links": {
"self": "string"
},
"relationships": {
"lists": {
"data": [
{
"type": "list",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"segments": {
"data": [
{
"type": "segment",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
},
"included": [
{
"type": "list",
"id": "Y6nRLr",
"attributes": {
"name": "Newsletter",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"optInProcess": "double_opt_in"
},
"links": {
"self": "string"
}
},
{
"type": "segment",
"id": "string",
"attributes": {
"name": "Repeat Purchasers",
"definition": {
"conditionGroups": [
{
"conditions": [
{
"type": "profile-group-membership",
"groupIds": [
"string"
],
"timeframeFilter": {
"type": "date",
"operator": "after",
"date": "2022-11-08T00:00:00.000Z"
},
"isMember": true
},
{
"type": "profile-metric",
"metricId": "string",
"measurement": "count",
"measurementFilter": {
"type": "numeric",
"operator": "equals",
"value": 0
},
"timeframeFilter": {
"type": "date",
"operator": "after",
"date": "2022-11-08T00:00:00.000Z"
},
"metricFilters": [
{
"property": "string",
"filter": {
"type": "string",
"operator": "equals",
"value": "string"
}
}
]
},
{
"type": "profile-marketing-consent",
"consent": {
"channel": "email",
"consentStatus": {
"subscription": "any"
},
"canReceiveMarketing": true
}
},
{
"type": "profile-postal-code-distance",
"countryCode": "string",
"postalCode": "string",
"unit": "kilometers",
"filter": {
"type": "numeric",
"operator": "greater-than",
"value": 0
}
},
{
"type": "profile-property",
"property": "string",
"filter": {
"type": "string",
"operator": "contains",
"value": "string"
}
},
{
"type": "profile-region",
"inRegion": true,
"region": "european_union"
},
{
"type": "profile-predictive-analytics",
"dimension": "average_days_between_orders",
"filter": {
"type": "numeric",
"operator": "equals",
"value": 0
}
},
{
"type": "profile-predictive-analytics",
"dimension": "predicted_gender",
"filter": {
"type": "string",
"operator": "equals",
"value": "likely_female"
}
}
]
}
]
},
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"isActive": true,
"isProcessing": true,
"isStarred": true
},
"links": {
"self": "string"
}
}
]
}
}
Get Segment
Get a segment with the given segment ID. | key: getSegment
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsSegment | The fields to include in the response. | ||
Segment ID string / Required segmentId | The ID of the segment. | WwKnkd |
{
"data": {
"data": {
"type": "segment",
"id": "string",
"attributes": {
"name": "Repeat Purchasers",
"definition": {
"conditionGroups": [
{
"conditions": [
{
"type": "profile-group-membership",
"groupIds": [
"string"
],
"timeframeFilter": {
"type": "date",
"operator": "after",
"date": "2022-11-08T00:00:00.000Z"
},
"isMember": true
},
{
"type": "profile-metric",
"metricId": "string",
"measurement": "count",
"measurementFilter": {
"type": "numeric",
"operator": "equals",
"value": 0
},
"timeframeFilter": {
"type": "date",
"operator": "after",
"date": "2022-11-08T00:00:00.000Z"
},
"metricFilters": [
{
"property": "string",
"filter": {
"type": "string",
"operator": "equals",
"value": "string"
}
}
]
},
{
"type": "profile-marketing-consent",
"consent": {
"channel": "email",
"consentStatus": {
"subscription": "any"
},
"canReceiveMarketing": true
}
},
{
"type": "profile-postal-code-distance",
"countryCode": "string",
"postalCode": "string",
"unit": "kilometers",
"filter": {
"type": "numeric",
"operator": "greater-than",
"value": 0
}
},
{
"type": "profile-property",
"property": "string",
"filter": {
"type": "string",
"operator": "contains",
"value": "string"
}
},
{
"type": "profile-region",
"inRegion": true,
"region": "european_union"
},
{
"type": "profile-predictive-analytics",
"dimension": "average_days_between_orders",
"filter": {
"type": "numeric",
"operator": "equals",
"value": 0
}
},
{
"type": "profile-predictive-analytics",
"dimension": "predicted_gender",
"filter": {
"type": "string",
"operator": "equals",
"value": "likely_female"
}
}
]
}
]
},
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"isActive": true,
"isProcessing": true,
"isStarred": true,
"profileCount": 0
},
"links": {
"self": "string"
},
"relationships": {
"profiles": {
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
},
"included": [
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
}
Get Template
Get a template with the given template ID. | key: getTemplate
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsTemplate | The fields to include in the response. | ||
Template ID string / Required templateId | The ID of the template. | 123456 |
{
"data": {
"data": {
"type": "template",
"id": "string",
"attributes": {
"name": "string",
"editorType": "string",
"html": "string",
"text": "string",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
}
}
}
}
List Accounts
Retrieve the account(s) associated with a given private API key. | key: listAccounts
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Debug Request boolean debug | false | Enabling this flag will log out the current request. |
Fields string Value List fieldsAccount | The fields to include in the response. |
{
"data": {
"data": [
{
"type": "account",
"id": "string",
"attributes": {
"testAccount": true,
"contactInformation": {
"defaultSenderName": "Klaviyo Demo",
"defaultSenderEmail": "contact@klaviyo-demo.com",
"websiteUrl": "https://www.klaviyo.com",
"organizationName": "Klaviyo Demo",
"streetAddress": {
"address1": "125 Summer Street",
"address2": "5th Floor",
"city": "Boston",
"region": "MA",
"country": "US",
"zip": "04323"
}
},
"industry": "Software / SaaS",
"timezone": "US/Eastern",
"preferredCurrency": "USD",
"publicApiKey": "AbC123",
"locale": "en-US"
},
"links": {
"self": "string"
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}
List Campaigns
Returns some or all campaigns based on filters. | key: listCampaigns
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsCampaign | The fields to include in the response. | ||
Filter Campaigns string / Required filterCampaigns | equals(messages.channel,'sms') | A filter to apply to the campaigns. | equals(messages.channel,'sms') |
{
"data": {
"data": [
{
"type": "campaign",
"id": "string",
"attributes": {
"name": "string",
"status": "string",
"archived": true,
"audiences": {
"included": [
"Y6nRLr"
],
"excluded": [
"UTd5ui"
]
},
"sendOptions": {
"useSmartSending": true
},
"trackingOptions": {
"isAddUtm": true,
"utmParams": [
{
"name": "utmMedium",
"value": "campaign"
}
],
"isTrackingClicks": true,
"isTrackingOpens": true
},
"sendStrategy": {
"method": "static",
"optionsStatic": {
"datetime": "2022-11-08T00:00:00.000Z",
"isLocal": true,
"sendPastRecipientsImmediately": true
},
"optionsThrottled": {
"datetime": "2024-07-14T01:37:30.052Z",
"throttlePercentage": 0
},
"optionsSto": {
"date": "2024-07-14"
}
},
"createdAt": "2022-11-08T00:00:00.000Z",
"scheduledAt": "2022-11-08T00:00:00.000Z",
"updatedAt": "2022-11-08T00:00:00.000Z",
"sendTime": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
},
"relationships": {
"campaignMessages": {
"data": [
{
"type": "campaign-message",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"included": [
{
"type": "campaign-message",
"id": "string",
"attributes": {
"label": "string",
"channel": "string",
"content": {
"subject": "Buy our product!",
"previewText": "My preview text",
"fromEmail": "store@my-company.com",
"fromLabel": "My Company",
"replyToEmail": "reply-to@my-company.com",
"ccEmail": "cc@my-company.com",
"bccEmail": "bcc@my-company.com"
},
"sendTimes": [
{
"datetime": "2022-11-08T00:00:00.000Z",
"isLocal": true
}
],
"renderOptions": {
"shortenLinks": true,
"addOrgPrefix": true,
"addInfoLink": true,
"addOptOutLanguage": false
},
"createdAt": "2022-11-08T00:00:00.000Z",
"updatedAt": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
}
},
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
}
List Events
Get all events in an account. | key: listEvents
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Debug Request boolean debug | false | Enabling this flag will log out the current request. |
Fields string Value List fieldsEvent | The fields to include in the response. |
{
"data": {
"data": [
{
"type": "event",
"id": "string",
"attributes": {
"timestamp": 0,
"eventProperties": {},
"datetime": "2022-11-08T01:23:45.000Z",
"uuid": "string"
},
"links": {
"self": "string"
},
"relationships": {
"profile": {
"data": {
"type": "profile",
"id": "string"
},
"links": {
"self": "string",
"related": "string"
}
},
"metric": {
"data": {
"type": "metric",
"id": "string"
},
"links": {
"self": "string",
"related": "string"
}
},
"attributions": {
"data": [
{
"type": "attribution",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"included": [
{
"type": "attribution",
"id": "925e385b52fb405715f3616c337cc65c",
"relationships": {
"event": {
"data": {
"type": "event",
"id": "string"
}
},
"attributedEvent": {
"data": {
"type": "event",
"id": "string"
}
},
"campaign": {
"data": {
"type": "campaign",
"id": "string"
}
},
"campaignMessage": {
"data": {
"type": "campaign-message",
"id": "string"
}
},
"flow": {
"data": {
"type": "flow",
"id": "string"
}
},
"flowMessage": {
"data": {
"type": "flow-message",
"id": "string"
}
},
"flowMessageVariation": {
"data": {
"type": "flow-message",
"id": "string"
}
}
},
"links": {
"self": "string"
}
},
{
"type": "metric",
"id": "string",
"attributes": {
"name": "string",
"created": "string",
"updated": "string",
"integration": {}
},
"links": {
"self": "string"
}
},
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phoneNumber": "+15005550006",
"externalId": "string",
"firstName": "Sarah",
"lastName": "Mason",
"organization": "Example Corporation",
"locale": "en-US",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2025-01-09T14:52:05.906Z",
"updated": "2025-01-09T14:52:05.906Z",
"lastEventDate": "2025-01-09T14:52:05.906Z",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
}
},
"links": {
"self": "string"
}
}
]
}
}
List Images
Get all images in an account. | key: listImages
Input | Default | Notes |
---|---|---|
Connection connection / Required connection | ||
Debug Request boolean debug | false | Enabling this flag will log out the current request. |
Fields string Value List fieldsImage | The fields to include in the response. |
{
"data": {
"data": [
{
"type": "image",
"id": "7",
"attributes": {
"name": "string",
"imageUrl": "string",
"format": "string",
"size": 0,
"hidden": true,
"updatedAt": "2022-11-08T00:00:00.000Z"
},
"links": {
"self": "string"
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}
List List Profiles
Get all profiles within a list with the given list ID. | key: listListProfiles
Input | Default | Notes | Example |
---|---|---|---|
Additional Profile Fields string Value List additionalFieldsProfile | Request additional fields not included by default in the response. | ||
Connection connection / Required connection | |||
Debug Request boolean debug | false | Enabling this flag will log out the current request. | |
Fields string Value List fieldsProfile | The fields to include in the response. | ||
List ID string / Required listId | The unique identifier of the list. | RE83th |
{
"data": {
"data": [
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phoneNumber": "+15005550006",
"externalId": "string",
"firstName": "Sarah",
"lastName": "Mason",
"organization": "Example Corporation",
"locale": "en-US",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2022-11-08T00:00:00.000Z",
"updated": "2022-11-08T00:00:00.000Z",
"lastEventDate": "2022-11-08T00:00:00.000Z",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
},
"joinedGroupAt": "2022-11-08T00:00:00.000Z",
"subscriptions": {
"email": {
"marketing": {
"canReceiveEmailMarketing": true,
"consent": "SUBSCRIBED",
"consentTimestamp": "2023-02-21T20:07:38.000Z",
"lastUpdated": "2023-02-21T20:07:38.000Z",
"method": "PREFERENCE_PAGE",
"methodDetail": "mydomain.com/signup",
"customMethodDetail": "marketing drive",
"doubleOptin": true,
"suppression": [
{
"reason": "HARD_BOUNCE",
"timestamp": "2023-02-21T20:07:38.000Z"
}
],
"listSuppressions": [
{
"listId": "Y6nRLr",
"reason": "USER_SUPPRESSED",
"timestamp": "2023-02-21T20:07:38.000Z"
}
]
}
},
"sms": {
"marketing": {
"canReceiveSmsMarketing": true,
"consent": "SUBSCRIBED",
"consentTimestamp": "2023-02-21T20:07:38.000Z",
"method": "TEXT",
"methodDetail": "JOIN",
"lastUpdated": "2023-02-21T20:07:38.000Z"
}
}
},
"predictiveAnalytics": {
"historicClv": 93.87,
"predictedClv": 27.24,
"totalClv": 121.11,
"historicNumberOfOrders": 2,
"predictedNumberOfOrders": 0.54,
"averageDaysBetweenOrders": 189,
"averageOrderValue": 46.94,
"churnProbability": 0.89,
"expectedDateOfNextOrder": "2022-11-08T00:00:00.000Z"
}
},
"links": {
"self": "string"
},
"relationships": {
"lists": {
"links": {
"self": "string",
"related": "string"
}
},
"segments": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",