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: klaviyoDescription
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.
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.
Data Sources
Select Account
Select an account to use. | key: selectAccount | type: picklist
Select Campaign
Select a campaign to use. | key: selectCampaign | type: picklist
Select Profile
Select a profile to use. | key: selectProfile | type: picklist
Select Template
Select a template to use. | key: selectTemplate | type: picklist
Actions
Bulk Create Events
Create a batch of events for one or more profiles. | key: bulkCreateEvents
{
"data": "Events created successfully."
}
Create Campaign
Creates a campaign given a set of parameters, then returns it. | key: createCampaign
{
"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": "2024-11-08T16:50:26.848Z",
"isLocal": true,
"sendPastRecipientsImmediately": true
},
"optionsThrottled": {
"datetime": "2024-11-08T16:50:26.848Z",
"throttlePercentage": 0
},
"optionsSto": {
"date": "2024-07-14"
}
},
"createdAt": "2024-11-08T16:50:26.848Z",
"scheduledAt": "2024-11-08T16:50:26.848Z",
"updatedAt": "2024-11-08T16:50:26.848Z",
"sendTime": "2024-11-08T16:50:26.848Z"
},
"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
{
"data": "Event created successfully."
}
Create List
Create a new list. | key: createList
{
"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
{
"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
{
"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
{
"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
Delete List
Delete a list with the given list ID. | key: deleteList
Delete Segment
Delete a segment with the given segment ID. | key: deleteSegment
Delete Template
Delete a template with the given template ID. | key: deleteTemplate
{
"data": "Template deleted successfully."
}
Get Account
Retrieve a single account object by its account ID. | key: getAccount
{
"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
{
"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
{
"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": "2024-11-08T16:50:26.848Z",
"updated": "2024-11-08T16:50:26.848Z",
"lastEventDate": "2024-11-08T16:50:26.848Z",
"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
{
"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
{
"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
{
"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
{
"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
{
"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
{
"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
{
"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
{
"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": "2024-11-08T16:50:26.848Z",
"updated": "2024-11-08T16:50:26.848Z",
"lastEventDate": "2024-11-08T16:50:26.848Z",
"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
{
"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
{
"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",
"next": "string"
}
}
}
List Lists
Get all lists in an account. | key: listLists
{
"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"
},
"links": {
"self": "string"
},
"relationships": {
"profiles": {
"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": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
}
List Profile
Get all profiles in an account. | key: listProfile
{
"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": {
"links": {
"self": "string",
"related": "string"
}
},
"segments": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}
List Segments
Get all segments in an account. | key: listSegments
{
"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
},
"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"
}
}
}
}
],
"links": {
"self"