Klaviyo

Learn how to use Klaviyo with Composio

Overview

SLUG

KLAVIYO

Description

Klaviyo is a data-driven email and SMS marketing platform that allows e-commerce brands to deliver targeted messages, track conversions, and scale customer relationships

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to accounts:read campaigns:read campaigns:write conversations:read conversations:write catalogs:read catalogs:write coupons:read coupons:write coupon-codes:read coupon-codes:write data-privacy:read data-privacy:write events:read events:write flows:read flows:write images:read images:write lists:read lists:write metrics:read metrics:write profiles:read profiles:write push-tokens:read push-tokens:write segments:read segments:write subscriptions:read subscriptions:write tags:read tags:write templates:read templates:write
bearer_token
string
generic_api_key
stringRequired

Tools

SLUG: KLAVIYO_ADD_PROFILE_TO_LIST

Add profiles to a klaviyo list by profile ids or email addresses. this action subscribes profiles to a marketing list, which is ideal for giving marketing consent. you can add up to 1000 profiles per call using either their klaviyo profile ids or email addresses. rate limits: 10/s burst, 150/m steady. required scopes: `lists:write` and `profiles:write`. preconditions: - either profile ids or emails must be provided (not both) - maximum 1000 profiles per call - email addresses must be valid format - the list must exist and be accessible

Action Parameters

emails
array
list_id
stringRequired
profile_ids
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_CAMPAIGN_RECIPIENT_ESTIMATION_JOB

Start an asynchronous task to estimate the number of recipients for a campaign. this action creates a background job that calculates how many profiles would receive the campaign based on its current audience settings. use the job id returned to track progress with the 'get campaign recipient estimation job' action, and get the final count via 'get campaign recipient estimation' action. rate limits: 10/s burst, 150/m steady. required scope: `campaigns:write`. preconditions: - valid api key with campaigns:write scope - campaign id must exist and be accessible - campaign must have audience settings configured

Action Parameters

campaign_id
stringRequired

Action Response

data
objectRequired
error
string
job_id
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_EVENT

Create or update a profile event with minimum identifiers and metric name. success means validation, not completion. burst limit: 350/s, steady: 3500/m. scope required: `events:write`.

Action Parameters

data__attributes__metric__data__attributes__name
string
data__attributes__metric__data__attributes__service
string
data__attributes__metric__data__type
string
data__attributes__profile__data__attributes____kx
string
data__attributes__profile__data__attributes__anonymous__id
string
data__attributes__profile__data__attributes__email
string
data__attributes__profile__data__attributes__external__id
string
data__attributes__profile__data__attributes__first__name
string
data__attributes__profile__data__attributes__image
string
data__attributes__profile__data__attributes__last__name
string
data__attributes__profile__data__attributes__location__address1
string
data__attributes__profile__data__attributes__location__address2
string
data__attributes__profile__data__attributes__location__city
string
data__attributes__profile__data__attributes__location__country
string
data__attributes__profile__data__attributes__location__ip
string
data__attributes__profile__data__attributes__location__latitude
string
data__attributes__profile__data__attributes__location__longitude
string
data__attributes__profile__data__attributes__location__region
string
data__attributes__profile__data__attributes__location__timezone
string
data__attributes__profile__data__attributes__location__zip
string
data__attributes__profile__data__attributes__meta__patch__properties__unset
array
data__attributes__profile__data__attributes__organization
string
data__attributes__profile__data__attributes__phone__number
string
data__attributes__profile__data__attributes__title
string
data__attributes__profile__data__id
string
data__attributes__profile__data__type
string
data__attributes__time
string
data__attributes__unique__id
string
data__attributes__value
integer
data__attributes__value__currency
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_LIST

Create a new list.<br /><br />*rate limits*:<br />burst: `10/s`<br />steady: `150/m`<br />daily: `100/d` **scopes:** `lists:write`

Action Parameters

data__attributes__name
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_OR_UPDATE_PROFILE

Create or update a profile in klaviyo with the given attributes. this action allows you to create a new profile or update an existing one if it already exists (based on email or other identifiers). returns 201 for creation, 200 for update. empty fields are cleared with `null`; omitted fields remain unchanged. rate limits: 75/s burst, 700/m steady. required scope: `profiles:write`. preconditions: - at least one identifier (email, phone number, external id, or anonymous id) must be provided - email must be in valid format if provided - phone number must be in e.164 format if provided

Action Parameters

address1
string
address2
string
anonymous_id
string
city
string
country
string
email
stringRequired
external_id
string
first_name
string
image
string
last_name
string
latitude
string
longitude
string
organization
string
phone_number
string
properties
object
region
string
timezone
string
title
string
zip_code
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_PROFILE

Create a new profile.<br /><br />*rate limits*:<br />burst: `75/s`<br />steady: `700/m` **scopes:** `profiles:write`

Action Parameters

data__attributes__email
string
data__attributes__external__id
string
data__attributes__first__name
string
data__attributes__image
string
data__attributes__last__name
string
data__attributes__location__address1
string
data__attributes__location__address2
string
data__attributes__location__city
string
data__attributes__location__country
string
data__attributes__location__ip
string
data__attributes__location__latitude
string
data__attributes__location__longitude
string
data__attributes__location__region
string
data__attributes__location__timezone
string
data__attributes__location__zip
string
data__attributes__organization
string
data__attributes__phone__number
string
data__attributes__title
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_GET_CAMPAIGN

Retrieve a specific campaign by its id from klaviyo. this action fetches detailed information about a single campaign including its name, status, audience settings, send strategy, and optionally related messages and tags. rate limits: 10/s burst, 150/m steady. required scope: `campaigns:read`. preconditions: - valid api key with campaigns:read scope - campaign id must exist and be accessible

Action Parameters

campaign_id
stringRequired
include_messages
boolean
include_tags
boolean

Action Response

data
objectRequired
error
string
included
array
successful
booleanRequired

SLUG: KLAVIYO_GET_CAMPAIGNS

Retrieve campaigns from your klaviyo account. this action allows you to fetch campaigns with optional filtering and sorting. klaviyo requires specifying a channel (email or sms) to list campaigns. you can add additional filters for status, name, creation date, and other attributes. results are paginated with a default of 10 campaigns per page. rate limits: 10/s burst, 150/m steady. required scope: `campaigns:read`. preconditions: - valid api key with campaigns:read scope - channel must be specified (email or sms) - additional filter syntax must be valid if provided

Action Parameters

channel
stringDefaults to email
filter
string
include_archived
boolean
page_cursor
string
sort
string

Action Response

data
arrayRequired
error
string
links
object
successful
booleanRequired

SLUG: KLAVIYO_GET_EVENTS

Get all events in an account requests can be sorted by the following fields: `datetime`, `timestamp` returns a maximum of 200 events per page.<br /><br />*rate limits*:<br />burst: `350/s`<br />steady: `3500/m` **scopes:** `events:read`

Action Parameters

fields__event
array
fields__metric
array
fields__profile
array
filter
string
include
array
page__cursor
string
sort
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_GET_LISTS

Retrieve marketing lists from your klaviyo account. this action allows you to fetch lists with optional filtering and sorting. you can filter by name, creation date, and other attributes. results are paginated with a default of 10 lists per page. rate limits: 75/s burst, 700/m steady. required scope: `lists:read`. preconditions: - valid api key with lists:read scope - filter syntax must be valid if provided

Action Parameters

filter
string
include_tags
boolean
page_cursor
string
sort
stringDefaults to name

Action Response

data
arrayRequired
error
string
included
array
links
object
successful
booleanRequired

SLUG: KLAVIYO_GET_PROFILES

Retrieve profiles from your klaviyo account. this action allows you to fetch profiles with optional filtering and sorting. you can filter by email, external id, creation date, and other attributes. results are paginated with a configurable page size. rate limits: 75/s burst, 700/m steady (lower with predictive analytics). required scope: `profiles:read`. preconditions: - valid api key with profiles:read scope - filter syntax must be valid if provided - page size must be between 1 and 100

Action Parameters

filter
string
include_predictive_analytics
boolean
include_subscriptions
boolean
page_cursor
string
page_size
integerDefaults to 20
sort
stringDefaults to -created

Action Response

data
arrayRequired
error
string
links
object
successful
booleanRequired

SLUG: KLAVIYO_UPDATE_CAMPAIGN

Update a campaign with the specified attributes. this action allows you to modify campaign settings including name, audiences, and send strategy. only the fields you provide will be updated; others remain unchanged. rate limits: 10/s burst, 150/m steady. required scope: `campaigns:write`. preconditions: - valid api key with campaigns:write scope - campaign id must exist and be accessible - campaign must be in a state that allows updates (usually draft status) - send strategy options must match the selected method

Action Parameters

campaign_id
stringRequired
excluded_audiences
array
included_audiences
array
name
string
send_options
object
send_strategy_method
string
static_is_local_timezone
boolean
static_send_datetime
string
static_send_past_recipients_immediately
boolean
sto_send_date
string
throttle_percentage
integer
throttled_send_datetime
string
tracking_options
object

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_ASSIGN_CAMPAIGN_MESSAGE_TEMPLATE

Creates a non-reusable version of the template and assigns it to the message.<br /><br />*rate limits*:<br />burst: `10/s`<br />steady: `150/m` **scopes:** `campaigns:write`

Action Parameters

data__id
string
data__relationships__template__data__id
string
data__relationships__template__data__type
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_BULK_CREATE_CLIENT_EVENTS

Use the client-side endpoint with a public api key to track profile activity. it accepts up to 1000 events/request with rates of 10/s burst and 150/m steady. for server-side, use the bulk create event endpoint.

Action Parameters

company_id
stringRequired
data__attributes__events__data
array
data__attributes__profile__data__attributes____kx
string
data__attributes__profile__data__attributes__anonymous__id
string
data__attributes__profile__data__attributes__email
string
data__attributes__profile__data__attributes__external__id
string
data__attributes__profile__data__attributes__first__name
string
data__attributes__profile__data__attributes__image
string
data__attributes__profile__data__attributes__last__name
string
data__attributes__profile__data__attributes__location__address1
string
data__attributes__profile__data__attributes__location__address2
string
data__attributes__profile__data__attributes__location__city
string
data__attributes__profile__data__attributes__location__country
string
data__attributes__profile__data__attributes__location__ip
string
data__attributes__profile__data__attributes__location__latitude
string
data__attributes__profile__data__attributes__location__longitude
string
data__attributes__profile__data__attributes__location__region
string
data__attributes__profile__data__attributes__location__timezone
string
data__attributes__profile__data__attributes__location__zip
string
data__attributes__profile__data__attributes__organization
string
data__attributes__profile__data__attributes__phone__number
string
data__attributes__profile__data__attributes__title
string
data__attributes__profile__data__id
string
data__attributes__profile__data__meta__patch__properties__unset
array
data__attributes__profile__data__type
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_BULK_CREATE_EVENTS

This api endpoint creates or updates profiles by batching up to 1,000 events, with a 5mb payload limit. minimum required: a profile id and metric name. it has rate limits of 10 events per second burst and 150 events per minute. scope is `events:write`.

Action Parameters

data__attributes__events__bulk__create__data
array
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_BACK_IN_STOCK_SUBSCRIPTION

Use the server-side endpoint to subscribe to restock alerts, following the back in stock api guide. for client-side, use the post endpoint provided. rate limits: 350/s burst and 3500/m steady. required scopes: catalogs:write, profiles:write.

Action Parameters

data__attributes__channels
array
data__attributes__profile__data__attributes__anonymous__id
string
data__attributes__profile__data__attributes__email
string
data__attributes__profile__data__attributes__external__id
string
data__attributes__profile__data__attributes__phone__number
string
data__attributes__profile__data__id
string
data__attributes__profile__data__type
string
data__relationships__variant__data__id
string
data__relationships__variant__data__type
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_CAMPAIGN

Creates a campaign given a set of parameters, then returns it.<br /><br />*rate limits*:<br />burst: `10/s`<br />steady: `150/m` **scopes:** `campaigns:write`

Action Parameters

data__attributes__audiences__excluded
array
data__attributes__audiences__included
array
data__attributes__campaign__messages__data
array
data__attributes__name
string
data__attributes__send__options
object
data__attributes__send__strategy__method
string
data__attributes__send__strategy__options__static__datetime
string
data__attributes__send__strategy__options__static__is__local
boolean
data__attributes__send__strategy__options__static__send__past__recipients__immediately
boolean
data__attributes__send__strategy__options__sto__date
string
data__attributes__send__strategy__options__throttled__datetime
string
data__attributes__send__strategy__options__throttled__throttle__percentage
integer
data__attributes__tracking__options
object
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_CAMPAIGN_CLONE

Clones an existing campaign, returning a new campaign based on the original with a new id and name.<br /><br />*rate limits*:<br />burst: `10/s`<br />steady: `150/m` **scopes:** `campaigns:write`

Action Parameters

data__attributes__new__name
string
data__id
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_CAMPAIGN_SEND_JOB

Trigger a campaign to send asynchronously<br /><br />*rate limits*:<br />burst: `10/s`<br />steady: `150/m` **scopes:** `campaigns:write`

Action Parameters

data__id
string
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: KLAVIYO_CREATE_CATALOG_CATEGORY

Create a new catalog category.<br /><br />*rate limits*:<br />burst: `75/s`<br />steady: `700/m` **scopes:** `catalogs:write`

Action Parameters

data__attributes__catalog__type
stringDefaults to $default
data__attributes__external__id
string
data__attributes__integration__type
stringDefaults to $custom
data__attributes__name
string
data__relationships__items__data
array
data__type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired