Skip to main content

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:

  1. Log into your Klaviyo account and navigate to settings
  2. Under the Account tab select API Keys
  3. Select Create Private API Key
  4. Name the Key, provide the proper scope level and select Create
  5. Save and copy the private key into your integration connection configuration.
InputNotes
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:

  1. Log into your Klaviyo account and navigate to the Manage apps page.
  2. Select Create App
  3. Name the app and copy your Client ID and Client Secret and enter them into the connection configuration of your integration
  4. Save and continue to proceed
  5. Once creation has been completed enter the the following into the Redirect URL field: https://oauth2.prismatic.io/callback and save.
  6. Select Review Submission to submit the app for completion.
InputDefaultNotes
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

InputNotes
Connection
connection
/ Required
connection
 

Select Campaign

Select a campaign to use. | key: selectCampaign | type: picklist

InputNotes
Connection
connection
/ Required
connection
 

Select Profile

Select a profile to use. | key: selectProfile | type: picklist

InputNotes
Connection
connection
/ Required
connection
 

Select Template

Select a template to use. | key: selectTemplate | type: picklist

InputNotes
Connection
connection
/ Required
connection
 

Actions

Bulk Create Events

Create a batch of events for one or more profiles. | key: bulkCreateEvents

InputDefaultNotesExample
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

InputDefaultNotesExample
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": "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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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": "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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotesExample
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

InputDefaultNotes
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

InputDefaultNotesExample
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

InputDefaultNotes
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": "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

InputDefaultNotes
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

InputDefaultNotesExample
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",
"next": "string"
}
}
}

List Lists

Get all lists in an account. | key: listLists

InputDefaultNotes
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.

{
"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

InputDefaultNotes
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.

{
"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

InputDefaultNotes
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.

{
"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": "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 Templates

Get all templates in an account. | key: listTemplates

InputDefaultNotes
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.

{
"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"
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
}

Raw Request

Send raw HTTP request to Klaviyo. | key: rawRequest

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data
string
data
The HTTP body payload to send to the URL.
{"exampleKey": "Example Data"}
Debug Request
boolean
debugRequest
false
Enabling this flag will log out the current request.
 
Exclude Authorization
boolean
excludeAuthorization
false
Exclude the Authorization header from the request. Turn this on and include the company_id query param when calling public endpoints (/client).
 
File Data
string
Key Value List
fileData
File Data to be sent as a multipart form upload.
[{key: "example.txt", value: "My File Contents"}]
File Data File Names
string
Key Value List
fileDataFileNames
File names to apply to the file data inputs. Keys must match the file data keys above.
 
Form Data
string
Key Value List
formData
The Form Data to be sent as a multipart form upload.
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header
string
Key Value List
headers
A list of headers to send with the request.
User-Agent: curl/7.64.1
Max Retry Count
string
maxRetries
0
The maximum number of retries to attempt. Specify 0 for no retries.
 
Method
string
/ Required
method
The HTTP method to use.
 
Query Parameter
string
Key Value List
queryParams
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
 
Response Type
string
/ Required
responseType
json
The type of data you expect in the response. You can request json, text, or binary data.
 
Retry On All Errors
boolean
retryAllErrors
false
If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.
 
Retry Delay (ms)
string
retryDelayMS
0
The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.
 
Timeout
string
timeout
The maximum time that a client will await a response to its request
2000
URL
string
/ Required
url
Input the path only (/api/accounts), The base URL is already included (https://a.klaviyo.com). For example, to connect to https://a.klaviyo.com/api/accounts, only /api/accounts is entered in this field.
/api/accounts
Use Exponential Backoff
boolean
useExponentialBackoff
false
Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.
 

Subscribe Profiles

Subscribe one or more profiles to email marketing, SMS marketing, or both. | key: subscribeProfiles

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Profiles
code
/ Required
subscribeProfiles
Array of profiles to subscribe. Check Prismatic documentation for an example.

{
"data": "Profiles subscribed successfully."
}

Unsubscribe Profiles

Unsubscribe one or more profiles to email marketing, SMS marketing, or both. | key: unsubscribeProfiles

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Profiles
code
/ Required
unsubscribeProfiles
Array of profiles to unsubscribe. Check Prismatic documentation for an example.

{
"data": "Profiles unsubscribed successfully."
}

Update Campaign

Update a campaign with the given campaign ID. | key: updateCampaign

InputDefaultNotesExample
Campaign ID
string
/ Required
campaignId
The ID of the campaign.
01J2DNH88028WCAA2RK0BYBZVG
Campaign Name
string
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
Value List
excludedAudiences
A list of excluded audiences.
X7MYfE
Included Audiences
string
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": "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"
},
"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"
}
}
}
}

Update Image

Update the image with the given image ID. | key: updateImage

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Image Hidden
string
imageHidden
 
 
Image ID
string
/ Required
imageId
The ID of the image.
155463624
Image Name
string
imageName
A name for the image. Defaults to the filename if not provided. If the name matches an existing image, a suffix will be added.
My Image

{
"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"
}
}
}
}

Update List

Update the name of a list with the given list ID. | key: updateList

InputDefaultNotesExample
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
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"
}
}
}
}

Update Profile

Update the profile with the given profile ID. | key: updateProfile

InputDefaultNotesExample
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
Profile ID
string
/ Required
profileId
Unique identifier for the profile.
01J18FVB5H8XR1X9AXEQFVRW7A
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"
}
}
}
}

Update Segment

Update a segment with the given segment ID. | key: updateSegment

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Is Starred Segment
string
isStarredSegmentOptional
Whether the segment is starred.
 
Segment Condition Groups
code
segmentConditionGroups
The condition groups that define the segment. See Prismatic documentation for an example.
Segment ID
string
/ Required
segmentId
The ID of the segment.
WwKnkd
Segment Name
string
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"
}
}
}
}

Update Template

Update a template with the given template ID. | key: updateTemplate

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
Template HTML
string
templateHtml
The HTML content of the template.
<html><body><p>Hello, world!</p></body></html>
Template ID
string
/ Required
templateId
The ID of the template.
123456
Template Name
string
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"
}
}
}
}

Upload Image

Import an image from a url or file. | key: uploadImage

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Debug Request
boolean
debug
false
Enabling this flag will log out the current request.
 
File Data
data
fileData
The contents to write to a file. Binary data generated from a previous step.
 
Image Name
string
imageName
A name for the image. Defaults to the filename if not provided. If the name matches an existing image, a suffix will be added.
My Image
Image URL
string
imageUrl
An existing image url to import the image from. Alternatively, you may specify a base-64 encoded data-uri (`data:image/...`). Supported image formats: jpeg,png,gif. Maximum image size: 5MB. Use this field or File Data.
https://example.com/image.jpg

{
"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"
}
}
}
}