How to integrate Klaviyo MCP with LangChain

Connect LangChain to Klaviyo MCP. Add new subscribers to main email list, clone last week's campaign for reuse, and more using natural language, with authentication handled for you.

Klaviyo logoKlaviyo
Api KeyOauth2

Klaviyo is a data-driven email and SMS marketing platform for e-commerce brands. It helps deliver targeted messages, track conversions, and build scalable customer relationships.

233 Tools

Introduction

This guide walks you through connecting Klaviyo to LangChain using the Composio tool router. By the end, you'll have a working Klaviyo agent that can create and send campaigns, manage profiles and lists, build segments and flows, and track campaign and flow performance through natural language commands.

This guide will help you understand how to give your LangChain agent real control over a Klaviyo account through Composio's Klaviyo MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate Klaviyo with

TL;DR

Here's what you'll learn:
  • Get and set up your OpenAI and Composio API keys
  • Connect your Klaviyo project to Composio
  • Create a Tool Router MCP session for Klaviyo
  • Initialize an MCP client and retrieve Klaviyo tools
  • Build a LangChain agent that can interact with Klaviyo
  • Set up an interactive chat interface for testing

What is LangChain?

LangChain is a framework for developing applications powered by language models. It provides tools and abstractions for building agents that can reason, use tools, and maintain conversation context.

Key features include:

  • Agent Framework: Build agents that can use tools and make decisions
  • MCP Integration: Connect to external services through Model Context Protocol adapters
  • Memory Management: Maintain conversation history across interactions
  • Multi-Provider Support: Works with OpenAI, Anthropic, and other LLM providers

What is the Klaviyo MCP server, and what's possible with it?

The Klaviyo MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Klaviyo account. It provides structured and secure access to your campaigns, customer profiles, lists, and events, so your agent can review campaigns, manage profiles and lists, record customer activity, estimate campaign audiences, and monitor catalog jobs on your behalf.

  • Campaign management: Have your agent retrieve campaigns, review a specific campaign, update its details, or cancel a scheduled send.
  • Customer profile management: Let the agent find, create, and update customer profiles using details such as email addresses and profile attributes.
  • List organization: Direct your agent to review marketing lists, create new lists, and add customers to the right audience.
  • Event tracking: Instruct your agent to record customer activity and retrieve recent events for campaign planning or analysis.
  • Audience and catalog job monitoring: Have your agent estimate campaign recipient counts and check the progress of catalog item deletion or category update jobs.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Step by step10 STEPS
1

Prerequisites

Before starting this tutorial, make sure you have:
  • Python 3.10 or higher installed on your system
  • A Composio account with an API key
  • An OpenAI API key
  • Basic familiarity with Python and async programming
2

Getting API Keys for OpenAI and Composio

OpenAI API Key
  • Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
  • Keep the API key safe.
Composio API Key
  • Log in to the Composio dashboard.
  • Navigate to your API settings and generate a new API key.
  • Store this key securely as you'll need it for authentication.
3

Install dependencies

npm install @composio/langchain @langchain/core @langchain/openai @langchain/mcp-adapters dotenv

Install the required packages for LangChain with MCP support.

What's happening:

  • @composio/langchain provides Composio integration for LangChain
  • @langchain/mcp-adapters enables MCP client connections
  • @langchain/core is the core agent framework
  • dotenv/config loads environment variables
4

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_composio_user_id_here
OPENAI_API_KEY=your_openai_api_key_here

Create a .env file in your project root.

What's happening:

  • COMPOSIO_API_KEY authenticates your requests to Composio's API
  • COMPOSIO_USER_ID identifies the user for session management
  • OPENAI_API_KEY enables access to OpenAI's language models
5

Import dependencies

import { Composio } from '@composio/core';
import { LangchainProvider } from '@composio/langchain';
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
import { createAgent } from "langchain";
import * as readline from 'readline';
import 'dotenv/config';

dotenv.config();
What's happening:
  • We're importing LangChain's MCP adapter and Composio SDK
  • The dotenv/config import loads environment variables from your .env file
  • This setup prepares the foundation for connecting LangChain with Klaviyo functionality through MCP
6

Initialize Composio client

const composioApiKey = process.env.COMPOSIO_API_KEY;
const userId = process.env.COMPOSIO_USER_ID;

if (!composioApiKey) throw new Error('COMPOSIO_API_KEY is not set');
if (!userId) throw new Error('COMPOSIO_USER_ID is not set');

async function main() {
    const composio = new Composio({
        apiKey: composioApiKey as string,
        provider: new LangchainProvider()
    });
What's happening:
  • We're loading the COMPOSIO_API_KEY from environment variables and validating it exists
  • Creating a Composio instance that will manage our connection to Klaviyo tools
  • Validating that COMPOSIO_USER_ID is also set before proceeding
7

Create a Tool Router session

const session = await composio.create(
    userId as string,
    {
        toolkits: ['klaviyo']
    }
);

const url = session.mcp.url;
What's happening:
  • We're creating a Tool Router session that gives your agent access to Klaviyo tools
  • The create method takes the user ID and specifies which toolkits should be available
  • The returned session.mcp.url is the MCP server URL that your agent will use
  • This approach allows the agent to dynamically load and use Klaviyo tools as needed
8

Configure the agent with the MCP URL

const client = new MultiServerMCPClient({
    "klaviyo-agent": {
        transport: "http",
        url: url,
        headers: {
            "x-api-key": process.env.COMPOSIO_API_KEY
        }
    }
});

const tools = await client.getTools();

const agent = createAgent({ model: "gpt-5", tools });
What's happening:
  • We're creating a MultiServerMCPClient that connects to our Klaviyo MCP server via HTTP
  • The client is configured with a name and the URL from our Tool Router session
  • getTools() retrieves all available Klaviyo tools that the agent can use
  • We're creating a LangChain agent using the GPT-5 model
9

Set up interactive chat interface

let conversationHistory: any[] = [];

console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log("Ask any Klaviyo related question or task to the agent.\n");

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    prompt: 'You: '
});

rl.prompt();

rl.on('line', async (userInput: string) => {
    const trimmedInput = userInput.trim();

    if (['exit', 'quit', 'bye'].includes(trimmedInput.toLowerCase())) {
        console.log("\nGoodbye!");
        rl.close();
        process.exit(0);
    }

    if (!trimmedInput) {
        rl.prompt();
        return;
    }

    conversationHistory.push({ role: "user", content: trimmedInput });
    console.log("\nAgent is thinking...\n");

    const response = await agent.invoke({ messages: conversationHistory });
    conversationHistory = response.messages;

    const finalResponse = response.messages[response.messages.length - 1]?.content;
    console.log(`Agent: ${finalResponse}\n`);
        
        rl.prompt();
    });

    rl.on('close', () => {
        console.log('\n👋 Session ended.');
        process.exit(0);
    });
What's happening:
  • We initialize an empty conversationHistory list to maintain context across interactions
  • A readline interface is used to continuously accept user input from the command line
  • When a user types a message, it's added to the conversation history and sent to the agent
  • The agent processes the request using the invoke() method with the full conversation history
  • Users can type 'exit', 'quit', or 'bye' to end the chat session gracefully
10

Run the application

main().catch((err) => {
    console.error('Fatal error:', err);
    process.exit(1);
});
What's happening:
  • We call the main() function to start the application

Complete Code

Here's the complete code to get you started with Klaviyo and LangChain:

import { Composio } from '@composio/core';
import { LangchainProvider } from '@composio/langchain';
import { MultiServerMCPClient } from "@langchain/mcp-adapters";  
import { createAgent } from "langchain";
import * as readline from 'readline';
import 'dotenv/config';

const composioApiKey = process.env.COMPOSIO_API_KEY;
const userId = process.env.COMPOSIO_USER_ID;

if (!composioApiKey) throw new Error('COMPOSIO_API_KEY is not set');
if (!userId) throw new Error('COMPOSIO_USER_ID is not set');

async function main() {
    const composio = new Composio({
        apiKey: composioApiKey as string,
        provider: new LangchainProvider()
    });

    const session = await composio.create(
        userId as string,
        {
            toolkits: ['klaviyo']
        }
    );

    const url = session.mcp.url;
    
    const client = new MultiServerMCPClient({
        "klaviyo-agent": {
            transport: "http",
            url: url,
            headers: {
                "x-api-key": process.env.COMPOSIO_API_KEY
            }
        }
    });
    
    const tools = await client.getTools();
  
    const agent = createAgent({ model: "gpt-5", tools });
    
    let conversationHistory: any[] = [];
    
    console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
    console.log("Ask any Klaviyo related question or task to the agent.\n");
    
    const rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout,
        prompt: 'You: '
    });

    rl.prompt();

    rl.on('line', async (userInput: string) => {
        const trimmedInput = userInput.trim();
        
        if (['exit', 'quit', 'bye'].includes(trimmedInput.toLowerCase())) {
            console.log("\nGoodbye!");
            rl.close();
            process.exit(0);
        }
        
        if (!trimmedInput) {
            rl.prompt();
            return;
        }
        
        conversationHistory.push({ role: "user", content: trimmedInput });
        console.log("\nAgent is thinking...\n");
        
        const response = await agent.invoke({ messages: conversationHistory });
        conversationHistory = response.messages;
        
        const finalResponse = response.messages[response.messages.length - 1]?.content;
        console.log(`Agent: ${finalResponse}\n`);
        
        rl.prompt();
    });

    rl.on('close', () => {
        console.log('\nSession ended.');
        process.exit(0);
    });
}

main().catch((err) => {
    console.error('Fatal error:', err);
    process.exit(1);
});

Conclusion

You've successfully built a LangChain agent that can interact with Klaviyo through Composio's Tool Router.

Key features of this implementation:

  • Dynamic tool loading through Composio's Tool Router
  • Conversation history maintenance for context-aware responses
  • Async Python provides clean, efficient execution of agent workflows
You can extend this further by adding error handling, implementing specific business logic, or integrating additional Composio toolkits to create multi-app workflows.
TOOLS

Supported Tools

Every Klaviyo action and event your agent gets out of the box.

Add Profile to List

Add up to 1000 existing profiles to a Klaviyo list by profile IDs or email addresses.

Assign campaign message template

Creates a non-reusable version of the template and assigns it to the message.

Bulk create client events

Submit client-side events to track profile activity using a public API key; the request can also update profile details and remove profile properties.

Bulk create events

Bulk create events for multiple profiles in a single request.

Cancel Campaign Send

Cancel or revert a campaign send job.

Create back in stock subscription

Use the server-side endpoint to subscribe to restock alerts, following the Back in Stock API guide.

Create campaign

Creates a campaign given a set of parameters, then returns it.

Create campaign clone

Clones an existing campaign, returning a new campaign based on the original with a new ID and name.

Create Campaign Recipient Estimation Job

Start an asynchronous task to estimate the number of recipients for a campaign.

Create campaign send job

Trigger a campaign to send asynchronously*Rate limits*:Burst: `10/s`Steady: `150/m` **Scopes:** `campaigns:write`

Create catalog category

Create a new catalog category.

Create catalog category relationships items

Create a new item relationship for the given category ID.

Create catalog item

Create a new catalog item.

Create catalog item relationships categories

Create a new catalog category relationship for the given item ID.

Create catalog variant

Create a new variant for a related catalog item.

Create client back in stock subscription

Use the endpoint for client-side back in stock notifications with a public API key.

Create Client Event V2

Create a client-side event in Klaviyo to track user interactions.

Create client subscription

Endpoint manages email/SMS opt-ins using consent and requires public API key for client use.

Create coupon

Creates a new coupon.

Create coupon code

Create a coupon code for a given coupon.

Create event

Create or update a profile event with minimum identifiers and metric name.

Create flow

Create a draft flow from an encoded flow definition.

Create form

Create a draft Klaviyo signup form from an encoded form definition.

Create list

Create a new list.

Create or update client profile

Update user profiles without tracking using a public client-side API; use a private server-side API for identifier changes.

Create or update client push token

This endpoint for mobile SDKs (iOS & Android) creates/updates push tokens using a public API key.

Create or Update Profile

Create or update a Klaviyo profile using an email, phone number, external ID, or anonymous ID and supplied attributes.

Create or update push token

Create or update a push token for mobile push notifications.

Create profile

Create a new profile.

Create segment

Create a segment.

Create tag

Create a tag in an account, optionally specifying its tag group.

Create tag group

Create tag groups up to 50 per account, defaulting to non-exclusive unless specified.

Create Tag Relationships

Associate a tag with other resources (flows, lists, segments, or campaigns) in Klaviyo.

Create template

Create a custom HTML template in Klaviyo, subject to the account limit of 1,000 templates.

Create template clone

Clone a template by its ID, but cloning fails if account has 1,000+ templates.

Create template render

Render an email template with specific context and return HTML and plain text.

Create webhook

Create a webhook to receive real-time notifications for specified Klaviyo events.

Delete campaign

Delete a campaign with the given campaign ID.

Delete catalog category

Delete a catalog category using the given category ID.

Delete catalog category relationships items

Delete item relationships for the given category ID.

Delete catalog item

Delete a catalog item with the given item ID.

Delete catalog item relationships categories

Delete catalog category relationships for the given item ID.

Delete catalog variant

Delete a catalog item variant with the given variant ID.

Delete coupon

Delete the coupon with the given coupon ID.

Delete coupon code

Deletes a coupon code specified by the given identifier synchronously.

Delete flow

Delete a flow with the given flow ID.

Delete form

Permanently delete a Klaviyo form by ID.

Delete list

Delete a list with the given list ID.

Delete segment

Delete a segment with the given segment ID.

Delete tag

Delete the tag with the given tag ID.

Delete tag group

Delete a specified tag group and its contents; associated resource links will be removed.

Delete Tag Relationships

Remove a tag's association with other resources like flows, campaigns, lists, or segments.

Delete template

Permanently delete a template from your Klaviyo account using its unique template ID.

Delete webhook

Permanently delete a webhook subscription from your Klaviyo account.

Get account

Retrieve a single account object by its account ID.

Get accounts

Use a private API key to fetch an associated account's details like contact info, timezone, and currency, as well as validate the key.

Get Bulk Create Coupon Codes Job

Tool to get a coupon code bulk create job with the given job ID.

Get Bulk Delete Catalog Items Job

Get a catalog item bulk delete job with the given job ID.

Get bulk profile import job

Get a bulk profile import job with the given job ID.

Get bulk profile import job errors

Get import errors for the bulk profile import job with the given ID.

Get bulk profile import job lists

Get list for the bulk profile import job with the given ID.

Get bulk profile import job profiles

Get profiles for the bulk profile import job with the given ID.

Get bulk profile import job relationships lists

Get list relationship for the bulk profile import job with the given ID.

Get bulk profile import job relationships profiles

Get profile relationships for the bulk profile import job with the given ID.

Get bulk profile import jobs

Get bulk profile import jobs, with up to 100 jobs per request.

Get bulk update catalog items job

Get a catalog item bulk update job with the given job ID.

Get Bulk Update Categories Job

Retrieve a catalog category bulk update job by its ID from Klaviyo.

Get Bulk Update Variants Job

Tool to retrieve a catalog variant bulk update job by its ID.

Get Campaign

Retrieve a specific campaign by its ID from Klaviyo.

Get campaign campaign messages

Retrieve messages belonging to a campaign; requires `campaigns:read`.

Get campaign message

Returns a specific message based on a required id.

Get campaign message campaign

Return the related campaign*Rate limits*:Burst: `10/s`Steady: `150/m` **Scopes:** `campaigns:read`

Get campaign message relationships campaign

Returns the ID of the related campaign*Rate limits*:Burst: `10/s`Steady: `150/m` **Scopes:** `campaigns:read`

Get campaign message relationships template

Returns the ID of the related template*Rate limits*:Burst: `10/s`Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`

Get campaign message template

Return the related template*Rate limits*:Burst: `10/s`Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`

Get campaign recipient estimation

Get estimated recipients for a given campaign ID using `Create Campaign Recipient Estimation Job`.

Get campaign recipient estimation job

Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.

Get campaign relationships campaign messages

Returns the IDs of all messages associated with the given campaign.

Get campaign relationships tags

Returns the IDs of all tags associated with the given campaign.

Get Campaigns

Retrieve a page of Klaviyo campaigns filtered by channel, with optional additional filtering and sorting.

Get campaign send job

Get a campaign send job*Rate limits*:Burst: `10/s`Steady: `150/m` **Scopes:** `campaigns:read`

Get campaign tags

Return all tags that belong to the given campaign.

Get catalog categories

Retrieve up to 100 account catalog categories, sortable by creation date.

Get catalog category

Get a catalog category with the given category ID.

Get catalog category items

Retrieve up to 100 sorted items per request from a category using the category ID.

Get catalog category relationships items

Retrieve catalog item identifiers associated with a category, up to 100 per request.

Get catalog item

Get a specific catalog item with the given item ID.

Get catalog item categories

Retrieve the catalog categories for an item by ID, sorted by 'created' date, with a 100-category maximum per request.

Get catalog item relationships categories

Retrieve catalog category identifiers associated with an item, up to 100 per request.

Get catalog items

Retrieve up to 100 sorted catalog items per account, with `$custom` integration and `$default` type.

Get catalog item variants

Retrieve up to 100 variants per request for a specific item ID, sortable by creation date.

Get catalog variant

Get a catalog item variant with the given variant ID.

Get catalog variants

Retrieve up to 100 account variants per request, sortable by creation date.

Get coupon

Get a specific coupon by coupon ID.

Get coupon code

Returns a Coupon Code specified by the given identifier.

Get coupon code bulk create job

Get a coupon code bulk create job with the given job ID.

Get coupon code bulk create jobs

Get coupon code bulk create jobs, with cursor pagination and optional status filtering.

Get coupon code relationships coupon

Gets a list of coupon code relationships associated with the given coupon id*Rate limits*:Burst: `75/s`Steady: `700/m` **Scopes:** `coupon-codes:read`

Get coupon codes

Obtains coupon codes using necessary coupon or profile filters.

Get coupon codes for coupon

Gets a list of coupon codes associated with the given coupon id*Rate limits*:Burst: `75/s`Steady: `700/m` **Scopes:** `coupon-codes:read`

Get coupon for coupon code

Get the coupon associated with a given coupon code ID.

Get Coupon ID for Coupon Code

Tool to get the coupon relationship associated with a given coupon code ID.

Get Coupon Relationships Coupon Codes

Retrieve coupon code relationship identifiers for a given coupon; pagination links may be returned, but subsequent pages cannot be requested through this tool.

Get coupons

Get all coupons in an account.

Get create categories job

Get a catalog category bulk create job with the given job ID.

Get create categories jobs

Get catalog category bulk create jobs, with up to 100 jobs per request.

Get create items job

Get a catalog item bulk create job with the given job ID.

Get create items jobs

Get catalog item bulk create jobs, with up to 100 jobs per request.

Get create variants job

Get a catalog variant bulk create job by its job ID to check its status and processing results.

Get create variants jobs

Get catalog variant bulk create jobs, with up to 100 jobs per request.

Get delete categories job

Get a catalog category bulk delete job with the given job ID.

Get delete categories jobs

Get catalog category bulk delete jobs, with up to 100 jobs per request.

Get delete items jobs

Get catalog item bulk delete jobs, with up to 100 jobs per request.

Get delete variants job

Get a catalog variant bulk delete job with the given job ID.

Get delete variants jobs

Get catalog variant bulk delete jobs, with optional status filtering and cursor pagination, returning a maximum of 100 jobs per request.

Get event

Get an event with the given event ID.

Get event metric

Get the metric for an event with the given event ID.

Get event profile

Get the profile associated with an event with the given event ID.

Get Event Relationships

Get metrics or profile relationships for a specific event.

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.

Get flow

Get a flow with the given flow ID.

Get flow action

Get a flow action from a flow with the given flow action ID.

Get flow action for message

Get the flow action for a flow message with the given message ID.

Get flow action messages

Retrieve flow messages for an action ID, with filtering, page size, and ascending or descending sorting.

Get Parent Flow for Flow Action

Get the parent flow associated with a given flow action ID.

Get flow action relationships messages

Retrieves up to 50 flow message relationships per request for a specified flow action ID, with cursor pagination.

Get flow flow actions

Get all flow actions associated with the given flow ID.

Get flow for flow action

Get the flow associated with the given action ID.

Get flow message

Get the flow message of a flow with the given message ID.

Get flow message relationships action

Get the flow action relationship for a specific flow message.

Get flow message relationships template

Returns the ID of the related template*Rate limits*:Burst: `3/s`Steady: `60/m` **Scopes:** `templates:read`

Get flow message template

Return the related template*Rate limits*:Burst: `3/s`Steady: `60/m` **Scopes:** `templates:read`

Get flow relationships flow actions

Retrieve flow action relationship identifiers for a flow ID, with filtering, sorting, and a configurable page size.

Get flow relationships tags

Return the tag IDs of all tags associated with the given flow.

Get flows

Get all flows in an account.

Get flow tags

Return all tags associated with the given flow ID.

Get form

Get the form with the given ID.

Get form for form version

Get the form associated with the given form version.

Get form id for form version

Get the ID of the form associated with the given form version.

Get forms

Get all forms in an account.

Get form version

Retrieve detailed information about a specific form version by its ID.

Get image

Get the image with the given image ID.

Get images

Get all images in an account.

Get list

Retrieve a Klaviyo list by ID.

Get list profiles

Retrieve profiles in a list by ID, filterable by email/phone/push token/join date, sortable by join date.

Get List Relationships

Get profile membership relationships for a Klaviyo list.

Get list relationships tags

Returns the tag IDs of all tags associated with the given list.

Get Lists

Retrieve paginated marketing lists from a Klaviyo account, with optional filtering and sorting.

Get list tags

Return all tags associated with the given list ID.

Get metric

Get a metric with the given metric ID.

Get metrics

Get all metrics in an account.

Get profile

Get the profile with the given profile ID.

Get profile lists

Get list memberships for a profile with the given profile ID.

Get Profile Relationships

Tool to get list membership or segment membership relationships for a profile with the given profile ID.

Get Profiles

Retrieve profiles from your Klaviyo account.

Get profile segments

Get segment memberships for a profile with the given profile ID.

Get reviews

List Klaviyo review records with filtering, sparse fields, related events, sorting, and cursor pagination.

Get segment

Fetch a segment by ID with default rates of 75/s and 700/m, or with `additional-fields` at 1/s and 15/m.

Get segment profiles

Retrieve profiles in a segment by ID, filtering by email, phone, token, or join date, and sorting by join date.

Get Segment Relationships

Get a page of profile membership or tag relationships for a segment, with pagination links when returned.

Get segments

Fetch segments from an account with filters like `name`, `created`, and `updated`.

Get segment tags

Return all tags associated with the given segment ID.

Get tag

Retrieve the tag with the given tag ID.

Get tag group

Retrieve the tag group with the given tag group ID.

Get tag group relationships tags

Returns the tag IDs of all tags inside the given tag group.

Get tag groups

Retrieve up to 25 tag groups per account, sortable/filterable by specific attributes.

Get tag group tags

Return the tags for a given tag group ID.

Get Tag Relationships

Tool to retrieve relationship IDs for a tag.

Get tags

Retrieve up to 50 account tags at once, filterable/sortable by name or id, with cursor pagination.

Get tag tag group

Returns the tag group resource for a given tag ID.

Get template

Get a template by ID, optionally requesting specific fields; the action raises an error if a requested field is absent from the response.

Get templates

Retrieve account templates with sorting options (`id`, `name`, `created`, `updated`).

Get translations

List translations through Klaviyo's beta, non-production API with filtering, sparse fields, related resources, sorting, and cursor pagination.

Get update categories jobs

Get all catalog category bulk update jobs.

Get update items job

Get a catalog item bulk update job with the given job ID.

Get update items jobs

Get catalog item bulk update jobs, with status filtering and cursor pagination, returning a maximum of 100 jobs per request.

Get update variants jobs

Get all catalog variant bulk update jobs.

Get Variant IDs for Catalog Item

Tool to get all variant IDs related to a given catalog item ID.

Get version ids for form

Get the IDs of the form versions for the given form.

Get versions for form

Get the form versions for the given form.

Get webhook

Get the webhook with the given ID.

Get webhooks

Get webhooks in an account; the response can include pagination links.

Get webhook topic

Retrieve details of a specific webhook topic by its ID.

Get webhook topics

Get webhook topics in a Klaviyo account; the response can include pagination links.

Merge profiles

Merge one or more source profiles into a destination profile.

Query campaign values

Returns the requested campaign analytics values data*Rate limits*:Burst: `1/s`Steady: `2/m`Daily: `225/d` **Scopes:** `campaigns:read`

Query flow series

Returns time-series analytics data for flows, enabling performance tracking over time intervals.

Query flow values

Returns the requested flow analytics values data*Rate limits*:Burst: `1/s`Steady: `2/m`Daily: `225/d` **Scopes:** `flows:read`

Query form series

Return Klaviyo form performance metrics broken into time intervals.

Query form values

Return aggregate Klaviyo form performance statistics for a timeframe.

Query metric aggregates

Query aggregated metric measurements with grouping, sorting, and time-based filters.

Remove Profile from List

Remove up to 1000 profiles from a Klaviyo list by profile IDs or email addresses.

Request profile deletion

To delete a profile, use only one identifier: email, phone number, or ID.

Spawn bulk profile import job

Initiate a job to create/update a batch of profiles, up to 10,000 with a max size of 5MB per request.

Spawn coupon code bulk create job

Create a coupon-code-bulk-create-job to bulk create a list of coupon codes.

Spawn create categories job

Create bulk job for up to 100 catalog categories with a 5MB size limit and a max of 500 concurrent jobs.

Spawn create items job

Create batches of up to 100 catalog items with a 5MB size limit using the bulk job, which allows 500 concurrent jobs.

Spawn create variants job

Initiate a job to bulk create up to 100 catalog variants, with a 5MB payload size limit.

Spawn delete categories job

Delete multiple catalog categories in bulk, with a limit of 100 per request and a 5MB payload size.

Spawn delete items job

Delete batches of catalog items with a bulk job, max 100 items/request, 5MB size limit, and up to 500 concurrent jobs.

Spawn delete variants job

Delete multiple catalog variants with a bulk job, max 100 per request, 5MB size limit.

Spawn update categories job

Create a job to bulk update up to 100 categories, with a 5MB size limit and a maximum of 500 concurrent jobs.

Spawn update items job

You can bulk update up to 100 catalog items with a 5MB payload limit.

Spawn update variants job

Create a job to bulk update up to 100 catalog variants with a 5MB payload limit.

Subscribe profiles

Submit a bulk job to subscribe profiles to marketing, optionally adding them to a list; supports double opt-in and historical imports, and may reset opt-outs for returning users.

Suppress profiles

Suppress profiles by email, segment, or list ID to stop email marketing, regardless of consent.

Unregister client push token

This endpoint unsubscribes a push token, for use with Klaviyo's mobile SDKs and a public API key.

Unsubscribe profiles

Opt-out profiles from email or SMS marketing.

Unsubscribe Profiles Bulk

Submit a bulk unsubscription request for up to 100 email addresses and a Klaviyo list ID.

Unsuppress profiles

Remove 'USER_SUPPRESSED' blocks on profiles manually via email, segment, or list ID.

Unsuppress Profiles (Bulk)

Submit a bulk request to remove USER_SUPPRESSED email marketing suppressions from profiles identified by email address; other suppression reasons remain unchanged.

Update Campaign

Update a campaign's settings, including its name, audiences, send options, tracking options, and send strategy; requires `campaigns:write`.

Update campaign message

Update a campaign message*Rate limits*:Burst: `10/s`Steady: `150/m` **Scopes:** `campaigns:write`

Update catalog category

Update a catalog category with the given category ID.

Update Catalog Category Relationships

Tool to update item relationships for a catalog category.

Update catalog category relationships items

Update item relationships for the given category ID.

Update catalog item

Update a catalog item with the given item ID.

Update catalog item relationships categories

Update catalog category relationships for the given item ID.

Update catalog variant

Update a catalog item variant with the given variant ID.

Update coupon

Update an existing coupon's description by coupon ID.

Update coupon code

Updates a coupon code specified by the given identifier synchronously.

Update flow status

Update the status of a flow with the given flow ID, and all actions in that flow.

Update form

Update a Klaviyo form's name or replace its complete stored definition.

Update image

Update an image's name or hidden status by image ID.

Update list

Update the name of a list with the given list ID.

Update profile

Update a Klaviyo profile by ID with supplied attributes.

Update segment

Update a segment with the given segment ID.

Update tag

Update the tag with the given tag ID.

Update tag group

Update the tag group with the given tag group ID.

Update template

Update an existing email template by ID.

Update webhook

Update the webhook with the given ID.

Upload image from file

Upload an image from a file.

Upload image from url

Import an image from a URL or data URI.

FAQ

Frequently asked questions

With a standalone Klaviyo MCP server, the agents and LLMs can only access a fixed set of Klaviyo tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Klaviyo and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. LangChain fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Klaviyo tools.

Yes, absolutely. You can configure which Klaviyo scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Klaviyo data and credentials are handled as safely as possible.

Start with Klaviyo.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Klaviyo tool your agent needs.Free to start.

Start building