Klaviyo
Klaviyo is a marketing automation platform for email and SMS campaigns.
Overview
Klaviyo is a customer-data and marketing-automation platform built around profiles, lists, segments, flows, and campaigns. It is widely used by e-commerce brands to drive lifecycle email and SMS off behavioural events such as purchases, browsing, and abandonment.
In Spojit, Klaviyo is most often used as the marketing destination for customer data and events that originate elsewhere. You sync new customers from Shopify, BigCommerce, or your POS via create-profile and add-profiles-to-list, push purchase events with create-event to feed flows, and read campaigns or flows back for reporting. AI steps can score leads or segment audiences before they land in Klaviyo.
What You Can Do
The Klaviyo connector exposes these tools:
add-profiles-to-list- add one or more profiles to a static list.create-event- track a custom event against a profile (drives flow triggers).create-profile- create a profile from email, phone, and attributes.get-profile- fetch a single profile by id or email.list-campaigns- list email and SMS campaigns with status.list-events- list recent events with optional metric and profile filters.list-flows- list flows configured in the account.list-lists- list static lists in the account.list-profiles- list profiles with pagination and filters.raw-api-request- call any Klaviyo API endpoint directly.update-profile- update a profile's attributes or consent.
Authentication
Klaviyo uses a private API key. Generate one in Klaviyo at Account -> Settings -> API Keys -> Create Private API Key. Scope the key to the operations you need (Profiles, Lists, Events, Campaigns, Flows); least-privilege keys reduce blast radius if leaked. The key is shown once - copy it immediately.
Setting Up Your Connection
- In Klaviyo, open Account -> Settings -> API Keys.
- Click Create Private API Key, name it (for example,
Spojit - Production), and grant the scopes your workflows need. - Copy the key value.
- In Spojit, go to Connections from the sidebar.
- Click + Add Connection and search for Klaviyo.
- Paste the private API key, name the connection (for example,
Klaviyo - Production) and click Save.
Using in a Workflow
Use Direct Mode for the high-volume operations: create-profile on signup, create-event on each order, add-profiles-to-list for nightly batches. Use Agent Mode when an AI step needs to segment customers, choose which list to add them to, or generate event properties from unstructured input. For bulk historical loads, use raw-api-request against the bulk job endpoints.
Tips
- Klaviyo's modern API requires a
revisionheader; the connector sets it automatically but pin to the version your flows target. - Events drive flows; design your event names and properties up front because renaming them later breaks existing flows.
- Use
update-profilewith the email as the lookup; it upserts by email match. - Static lists are for explicit membership; segments are dynamic and cannot be added to via the API.
- For large profile syncs, prefer the bulk profile import job endpoint via
raw-api-requestover loopingcreate-profile.
Common Pitfalls
- Setting
subscribed: trueon a profile without explicit consent violates Klaviyo's compliance rules; use the subscribe job endpoint with double opt-in where required. - Klaviyo rate-limits per endpoint and per account;
create-profiletypically allows 75/s burst, 700/m steady. - Event
timevalues must be ISO 8601 with timezone; ambiguous times default to UTC. - Deleting a profile is irreversible and removes all event history; prefer suppression via consent updates.
Common Use Cases
- How to Sync Customer Data Between Shopify and Klaviyo
- How to Sync E-commerce Customers to Klaviyo Automatically
- How to Sync Purchase Data to Klaviyo for Personalization
- How to Trigger Klaviyo Campaigns from Workflow Events
- How to Build a Win-Back Email Campaign with Klaviyo and AI
- How to Build a Lead Scoring System with AI and Klaviyo
Related Articles
For technical API details and field specifications, see the Klaviyo connector documentation.