Documentation Index
Fetch the complete documentation index at: https://docs.spojit.com/llms.txt
Use this file to discover all available pages before exploring further.
The Klaviyo connector lets your workflows manage customer profiles, audience lists, marketing campaigns, automation flows, and track custom events through Klaviyo’s REST API.
Connection setup
Get your private API key
Log in to Klaviyo and go to Settings > API Keys. Create a new Private API Key with the scopes your workflows need. Add the connection in Spojit
Go to Connections in Spojit, click Add Connection, select Klaviyo, and enter:
- API Key: Your Klaviyo private API key
Profiles
list-profiles — List customer profiles
Filter string (e.g., equals(email,"john@example.com")).
Sort field (e.g., -created for newest first).
Results per page (max 100).
Example request:{
"filter": "greater-than(created,2024-01-01T00:00:00Z)",
"sort": "-created",
"pageSize": 2
}
Example response:{
"data": [
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@example.com",
"phone_number": "+15005550006",
"first_name": "Sarah",
"last_name": "Mason",
"created": "2024-03-15T10:30:00+00:00",
"updated": "2024-06-01T14:22:00+00:00"
}
},
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4I",
"attributes": {
"email": "james.wilson@example.com",
"first_name": "James",
"last_name": "Wilson",
"created": "2024-02-20T08:15:00+00:00",
"updated": "2024-05-10T09:00:00+00:00"
}
}
],
"links": {
"self": "https://a.klaviyo.com/api/profiles/?page%5Bsize%5D=2",
"next": "https://a.klaviyo.com/api/profiles/?page%5Bcursor%5D=bmV4dC1wYWdl&page%5Bsize%5D=2"
}
}
get-profile — Get profile by ID
Example request:{
"id": "01GDDKASAP8TKDDA2GRZDSVP4H"
}
Example response:{
"data": {
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@example.com",
"phone_number": "+15005550006",
"first_name": "Sarah",
"last_name": "Mason",
"organization": "Acme Corp",
"title": "Marketing Manager",
"location": {
"city": "Boston",
"region": "MA",
"country": "US",
"zip": "02101"
},
"properties": {
"plan": "premium",
"signup_source": "website"
},
"created": "2024-03-15T10:30:00+00:00",
"updated": "2024-06-01T14:22:00+00:00"
}
}
}
create-profile — Create a profile
Profile attributes: email, phone_number, first_name, last_name, properties, etc.
Example request:{
"attributes": {
"email": "new.customer@example.com",
"first_name": "Emily",
"last_name": "Chen",
"phone_number": "+15005550007",
"location": {
"city": "San Francisco",
"region": "CA",
"country": "US"
},
"properties": {
"plan": "free",
"signup_source": "checkout"
}
}
}
Example response:{
"data": {
"type": "profile",
"id": "01HWKAJ9RPYXMZ4NVBQ2NQXG5A",
"attributes": {
"email": "new.customer@example.com",
"first_name": "Emily",
"last_name": "Chen",
"phone_number": "+15005550007",
"created": "2024-06-15T12:00:00+00:00",
"updated": "2024-06-15T12:00:00+00:00"
}
}
}
update-profile — Update a profile
Example request:{
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"first_name": "Sarah",
"last_name": "Mason-Smith",
"properties": {
"plan": "enterprise"
}
}
}
Example response:{
"data": {
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@example.com",
"first_name": "Sarah",
"last_name": "Mason-Smith",
"properties": {
"plan": "enterprise",
"signup_source": "website"
},
"updated": "2024-06-15T14:30:00+00:00"
}
}
}
Lists
list-lists — List audience lists
No parameters required.Example response:{
"data": [
{
"type": "list",
"id": "Y6nRLr",
"attributes": {
"name": "Newsletter Subscribers",
"created": "2024-01-10T08:00:00+00:00",
"updated": "2024-06-01T12:00:00+00:00"
}
},
{
"type": "list",
"id": "X5mQKs",
"attributes": {
"name": "VIP Customers",
"created": "2024-02-15T10:00:00+00:00",
"updated": "2024-05-20T09:30:00+00:00"
}
}
]
}
add-profiles-to-list — Add profiles to a list
Array of profile IDs to add.
Example request:{
"listId": "Y6nRLr",
"profileIds": [
"01GDDKASAP8TKDDA2GRZDSVP4H",
"01HWKAJ9RPYXMZ4NVBQ2NQXG5A"
]
}
Example response:
Campaigns & Flows
list-campaigns — List campaigns
Filter string (e.g., equals(messages.channel,"email")).
Example request:{
"filter": "equals(messages.channel,\"email\")"
}
Example response:{
"data": [
{
"type": "campaign",
"id": "01HWKAJ9RPYXMZ4NVBQ2CAMP1",
"attributes": {
"name": "Summer Sale Announcement",
"status": "sent",
"audiences": {
"included": ["Y6nRLr"]
},
"send_strategy": {
"method": "immediate"
},
"created_at": "2024-06-01T08:00:00+00:00",
"sent_at": "2024-06-01T10:00:00+00:00"
}
}
]
}
list-flows — List automation flows
Filter string (e.g., equals(status,"live")).
Example request:{
"filter": "equals(status,\"live\")"
}
Example response:{
"data": [
{
"type": "flow",
"id": "VJxwRK",
"attributes": {
"name": "Welcome Series",
"status": "live",
"trigger_type": "Added to List",
"created": "2024-01-05T09:00:00+00:00",
"updated": "2024-05-15T11:00:00+00:00"
}
},
{
"type": "flow",
"id": "WKyxSL",
"attributes": {
"name": "Abandoned Cart",
"status": "live",
"trigger_type": "Metric",
"created": "2024-02-10T14:00:00+00:00",
"updated": "2024-06-01T08:00:00+00:00"
}
}
]
}
Events
list-events — List tracked events
Sort field (e.g., -datetime).
Results per page (max 100).
Example request:{
"sort": "-datetime",
"pageSize": 2
}
Example response:{
"data": [
{
"type": "event",
"id": "4vRpBQ16wa",
"attributes": {
"metric_id": "UMTlbk",
"profile_id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"timestamp": 1718460000,
"event_properties": {
"OrderId": "ORD-5678",
"Items": ["Blue T-Shirt", "Running Shoes"],
"Value": 129.99
},
"datetime": "2024-06-15T14:00:00+00:00"
}
}
]
}
create-event — Track a custom event
Event attributes including metric (name), profile (email/id), properties, time, value.
Example request:{
"attributes": {
"metric": {
"data": {
"type": "metric",
"attributes": {
"name": "Placed Order"
}
}
},
"profile": {
"data": {
"type": "profile",
"attributes": {
"email": "sarah.mason@example.com"
}
}
},
"properties": {
"OrderId": "ORD-9012",
"Categories": ["Apparel", "Accessories"],
"ItemCount": 3
},
"value": 199.99,
"time": "2024-06-15T16:30:00+00:00"
}
}
Example response:
Advanced
raw-api-request — Make an arbitrary API request
Send a request to any Klaviyo API endpoint.
HTTP method: GET, POST, PATCH, PUT, or DELETE.
API path (e.g., /segments or /metrics).
Request body (JSON:API format for POST/PATCH).
Example request:{
"method": "GET",
"path": "/metrics"
}
Example response:{
"data": [
{
"type": "metric",
"id": "UMTlbk",
"attributes": {
"name": "Placed Order",
"created": "2024-01-01T00:00:00+00:00",
"updated": "2024-06-15T00:00:00+00:00",
"integration": {
"object": "integration",
"id": "0rPhKs",
"name": "API"
}
}
}
]
}