Klaviyo Automation: APIs, AI Agents and Governed Workflows
Use Klaviyo automation with Major for cross-system retention workflows. Explore native AI, eight verified API operations, consent checks, durable review queues, and human approvals.

Klaviyo automation uses customer profiles, events, and flows to coordinate lifecycle marketing. This guide covers Klaviyo's built-in AI, verified API operations, and how Major adds cross-system judgment, durable review queues, and approval workflows without moving message delivery out of Klaviyo.
Major is the enterprise platform where agents build the software they run on. For retention marketers, that means an app records eligibility and outcomes, an agent interprets customer context, and a workflow controls when an approved action happens.
What Klaviyo does for retention and lifecycle teams
Klaviyo combines customer data with marketing execution. Its API overview organizes that work around profiles, events, campaigns, flows, lists, and segments. A profile represents a person; an event records activity; a flow coordinates messages around configured triggers and conditions.
Retention managers use those objects to run welcome journeys, post-purchase follow-ups, and win-back programs. Lifecycle operations teams maintain audience definitions and consent checks. Marketing analysts inspect the events and campaign context behind an unexpected change in engagement, rather than treating every decline as a copy problem.
The operational gap often sits between systems. A cancellation reason in Recharge, an unresolved Gorgias conversation, and a purchase in Shopify can point to different next steps for the same person. Copying all three into a prompt every day leaves no durable record of what happened.
On Major, the repeatable identity matching, validation, and history storage run in a deterministic app. The agent handles the judgment that remains, such as whether an explicit shipping complaint makes a discount inappropriate. The marketer can inspect both the evidence and the eventual action.
Klaviyo's built-in AI and where Major adds value
Klaviyo already has substantial AI functionality. Its K:AI product page describes Composer, which analyzes campaigns, segments, and flows, identifies opportunities, and builds audiences, content, and send strategies for review. Customer Agent handles customer conversations, including order-status requests, and can act through connected tools and APIs.
The same page names Predicted CLV, RFM analysis, and Churn risk for prioritization. Flows AI helps create journeys; Brand voice AI and Smart translations support content work. Personalized send time, Channel affinity, and Product recommendations help tailor delivery and merchandising. Availability should be checked against the account's actual entitlements.
Those are useful native capabilities, not reasons to rebuild a campaign editor. Customer Agent also supports integrations, so the distinction is not that Klaviyo cannot cross system boundaries.
Major adds a governed software layer for a team's specific operating process: shared state, evidence retention, approval ownership, and coordination across subscription, support, and marketing records. An agent can interpret conflicting signals while an app preserves its recommendation and a workflow enforces the approved route. Klaviyo's native AI remains available where the marketing team already works.
How Klaviyo connects to Major
Klaviyo connects through Major's Pipedream connector, catalog app p_klaviyo. There is no native Klaviyo connector. IT configures the connection once, scopes its permissions, and keeps credentials centrally in Major's connector vault, never in application code or agent prompts.
For underlying server-side calls, Klaviyo documents the API host as https://a.klaviyo.com and private-key authentication using Authorization: Klaviyo-API-Key followed by the secret. OAuth provides delegated access for registered integrations. A public company ID is for client-side tracking, not authorization to read private customer records.
Major orchestrates Klaviyo; it never replaces it. Klaviyo keeps the audience logic, message templates, flow configuration, and delivery responsibility. Major holds the cross-system work record and limits which approved actions may reach that configuration.
Separate read access from consequential writes. A research agent can inspect permitted customer context without receiving permission to create subscription jobs. The workflow gets only the write operations its use case requires. SSO, RBAC, and audit logs cover the app, agent, and workflow, while Klaviyo scopes still constrain the upstream API access.
Klaviyo API guide for governed automation
Authentication, pagination, limits, and testing
Klaviyo supports private keys with custom permissions and OAuth access tokens. Its authentication guide lists exact scopes, including profiles:read, profiles:write, events:read, events:write, flows:read, and campaigns:read. The references below require a revision header and currently document revision 2026-10-15. Pin and test the revision your connector actually sends rather than assuming its behavior follows the latest docs.
Cursor pagination uses page[cursor], with navigation URLs in the response's top-level links object. Follow the next link until exhausted; page[size] limits vary by endpoint. Save the cursor and synchronization watermark in the app so an interrupted job can resume.
Rate limits have burst and steady windows. The current references give profile reads 75 requests per second and 750 per minute, event operations 350 per second and 3,500 per minute, and flow listing 3 per second and 60 per minute. Expanded fields can impose lower limits. Monitor RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset; a 429 replaces these with Retry-After.
Klaviyo documents test accounts, including converting a separate account through Settings. Conversion does not remove billing, and reversing it requires support. Use synthetic profiles and isolated flows, not a production conversion as a shortcut.
Events and webhook delivery
System webhooks deliver account event topics such as email delivered and sent SMS. Verify HMAC-SHA256 over the raw body followed by the timestamp, using the webhook secret and a constant-time comparison against Klaviyo-Signature. Check Klaviyo-Timestamp and ensure the webhook ID header matches the body metadata.
System webhook batches can contain up to 1,000 events. Deduplicate individual event identifiers before processing. Klaviyo retries with exponential backoff and a maximum delay of one hour, and can disable failed webhooks. Confirm topic availability and access in the target account.
Flow webhook actions are a separate mechanism: a configured flow sends an HTTP POST, with optional authentication headers and a flow ID header. Do not assume those requests use system webhook signatures. Their retry guide documents up to 17 attempts over 24 hours for retryable errors.
GET /api/profiles
Lists account profiles with filtering and sorting, requiring profiles:read. Use targeted synchronization rather than repeatedly downloading the entire account.
- App: maintains the mapping between commerce customers and Klaviyo profile IDs.
- Agent: interprets permitted profile context when a subscriber's lifecycle stage is unclear.
- Workflow: pages through changed records and saves its checkpoint after each batch.
GET /api/profiles/{id}
Retrieves one profile, requiring profiles:read; additional fields can include subscriptions and predictive analytics, subject to their documented limits.
- App: displays a timestamped eligibility snapshot beside a review request.
- Agent: weighs permitted purchase context against an explicit cancellation explanation.
- Workflow: refreshes subscription information before releasing an approved marketing action.
POST /api/profile-import
Creates or updates a profile from supplied attributes, requiring profiles:write. Updating profile properties is not evidence that a person consented to marketing.
- App: records proposed property changes and the upstream customer reference.
- Agent: recommends a supported lifecycle category and explains its evidence.
- Workflow: writes only allowlisted properties after identity and approval checks pass.
POST /api/events
Records profile activity, requiring events:write. A 202 response acknowledges validation and submission, not completed processing; a configured metric can trigger a corresponding flow.
- App: stores the source action key, submitted payload, and acceptance state.
- Agent: selects the approved event category justified by the customer context.
- Workflow: submits once authorized, preserving the same unique identifier on retries.
GET /api/events
Retrieves event history, requiring events:read, with timestamp sorting and cursor pagination. Its documented page size defaults to 200 and can reach 1,000.
- App: shows observed activity separately from pending outbound actions.
- Agent: summarizes whether recent activity supports another retention attempt.
- Workflow: reconciles accepted submissions against observed events without declaring delivery success.
GET /api/flows
Lists flows, requiring flows:read, with at most 50 per page. Inventory the configured journeys before assigning a custom metric to them.
- App: keeps a marketer-reviewed register of flow ownership and intended use.
- Agent: explains when a proposed retention category lacks a suitable approved journey.
- Workflow: checks configuration inventory and holds work when the expected flow is missing.
GET /api/campaigns
Lists campaigns with optional filtering, requiring campaigns:read. This is campaign context, not a substitute for a reporting API.
- App: displays a campaign inventory alongside the retention calendar.
- Agent: flags a possible messaging conflict for the marketer to investigate.
- Workflow: refreshes inventory before a scheduled cross-system review.
POST /api/profile-subscription-bulk-create-jobs
Starts subscription processing and requires lists:write, profiles:write, and subscriptions:write. Double opt-in list settings affect the process; submission alone is not confirmed consent.
- App: retains the explicit opt-in evidence and job submission record.
- Agent: summarizes missing or conflicting evidence for a reviewer, without manufacturing permission.
- Workflow: submits only authorized subscription requests and keeps pending confirmation separate from eligibility.
Klaviyo automation use cases on Major
Recharge cancellation triage with Klaviyo
Start with the published subscription win-back pattern, but preserve the existing native integration where it already provides the right events. Add a new custom event only where its meaning and flow ownership are explicit.
- App: stores cancellation evidence, eligibility, category, and assignment history.
- Agent: distinguishes price sensitivity, product mismatch, and unresolved service issues from supported evidence.
- Workflow: receives the subscription signal, refreshes the profile with GET /api/profiles/{id}, and conditionally submits POST /api/events.
Shopify post-purchase exception review
A repeat purchase and a refund can make the same generic follow-up inappropriate. Use commerce context to prepare a reviewable recommendation before adding another marketing signal.
- App: links order references, profile identity, and prior follow-up decisions.
- Agent: judges whether the permitted order context supports education, replenishment, or a hold.
- Workflow: uses GET /api/profiles for matching and POST /api/profile-import for approved lifecycle properties.
Gorgias service recovery with Klaviyo
An unresolved support issue should not silently become a discount sequence. This proposed pattern coordinates support context and marketing review without claiming Klaviyo lacks support capabilities.
- App: holds the service-recovery queue, owner, and evidence references.
- Agent: interprets the complaint and recommends a hold or a reviewed recovery category.
- Workflow: checks GET /api/events and GET /api/flows, then releases an approved event only after revalidation.
How to build the architecture on Major

Figure 1. Cross-system context reaches an agent; state and review history stay in the app.
Build the reusable execution layer first. An agent can build the app that performs repeatable lookups, validation, and recordkeeping, then run that software on later cases instead of reasoning through those steps again. Reason once. Run forever.
- Connect: IT configures Klaviyo through the Pipedream connector and the source-system connectors with minimum access.
- Model state: the app stores customer mappings, source events, evaluations, approvals, outbound actions, and reconciliation results in managed database tables.
- Constrain judgment: the agent receives permitted evidence and chooses among approved categories, with an explanation and an uncertainty route.
- Orchestrate: the workflow validates input, reads context, invokes the agent, routes approval, and executes authorized writes.
- Expose controls: the app gives marketers queue ownership, approve and reject actions, and a record of each outcome.
Keep credentials out of the record payload. Save references and necessary evidence, not unrestricted customer histories. Version the eligibility rules and event-to-flow mapping so operators can reconstruct which policy applied to a past action.
A worked example with numbers
For example, suppose a retention team evaluates 600 cancellation or pause signals each month. Manually finding the profile, checking consent, reading the reason, and recording an assignment takes 6 minutes per signal. That is 600 multiplied by 6, or 3,600 minutes, equal to 60 hours.
In an illustrative Major design, the workflow validates each source signal and checks identity and eligibility. The agent recommends a category from the approved list. Assume 480 records follow a preapproved route and take 1 minute each for operator verification or sampling work allocated across the batch. The remaining 120 need 5 minutes of individual review.
That is 480 minutes plus 600 minutes, or 1,080 minutes, equal to 18 hours. The arithmetic difference is 42 hours per month under these assumptions. It is not a customer result, a revenue forecast, or a claim about expected performance.
The app records holds as outcomes too. A suppressed profile stays blocked; an unclear reason remains queued. Track review age, overrides, duplicate catches, and reconciliation failures before deciding whether the proposed operating model actually reduces work.
Governance, approvals, and failure handling

Figure 2. Approval cannot override missing consent or duplicate protection.
The agent must never invent consent, remove suppression to improve reach, authorize an unapproved offer, or turn uncertain identity into a new contact automatically. A person's approval of creative does not override a hard eligibility failure. Re-read relevant state when an approval has waited long enough to become stale.
Use separate permissions for reviewers, workflow operators, and connector administrators. Log the source reference, evidence timestamp, policy version, agent recommendation, reviewer action, and resulting API response. Redact secrets and minimize personal data in diagnostics.
For API failures, honor Retry-After on 429 and use bounded exponential backoff with jitter for temporary errors. Authentication and schema failures need repair, not endless retries. Queue exhausted attempts for an operator.
Prevent duplicates in the app before submission. Klaviyo's Create Event reference also documents deduplication when the same unique identifier repeats for the same profile and metric. Keep that identifier stable during a retry, but distinct for a genuinely new business action. Never label an accepted event as an email delivered.
Klaviyo AI Apps, Agents and Workflow Automations
Every published Major use case that works with Klaviyo, newest first. Each one names the Klaviyo API objects involved and shows the app, agent and workflow split.
- Automate Recharge-to-Klaviyo Win-Back Flows with AI: Turn Recharge cancellations and pauses into relevant Klaviyo win-back journeys with a durable app that records each decision, respects consent, and routes edge cases for review.
Frequently asked questions
What is Klaviyo automation?
Klaviyo automation coordinates lifecycle marketing through customer data, events, audiences, and configured flows. Major adds an app for cross-system state, an agent for contextual judgment, and a workflow for routing and approved actions while Klaviyo retains message execution.
Does Klaviyo have built-in AI?
Yes. K:AI includes Composer and Customer Agent, alongside predictive and assistive features such as Predicted CLV, Churn risk, Flows AI, and Smart translations. Check the account's entitlements before designing around a particular feature.
Is Klaviyo a native Major connector?
No. Klaviyo connects through Major's Pipedream connector, catalog app p_klaviyo. IT configures scoped access once and keeps credentials centrally in the connector vault rather than in app code or agent prompts.
Can an API event trigger a Klaviyo flow?
An event recorded through the Events API can trigger a flow configured for its metric, subject to the flow's settings and eligibility rules. A 202 API response means accepted for processing, not that an email was delivered.
Does updating a profile subscribe someone to marketing?
Do not treat a profile update as subscription consent. Klaviyo has a separate subscription job operation with its own scopes and opt-in behavior. Keep the evidence of permission and any pending confirmation separate from ordinary profile attributes.
How should Klaviyo API rate limits be handled?
Use endpoint-specific burst and steady limits, monitor the documented rate-limit headers, and honor Retry-After on 429 responses. Save pagination checkpoints and retry temporary failures with bounded backoff rather than restarting entire account scans.
Sources
- Klaviyo API overview and pagination: Resource families and cursor navigation for server-side integrations.
- Authenticate API requests: Private keys, OAuth, public IDs, and scoped permissions.
- Rate limits, status codes, and errors: Request windows, response headers, and retry guidance.
- Get Profiles: Profile listing, field expansion, and paging limits.
- Get Profile: Individual profile retrieval and subscription fields.
- Create or Update Profile: Profile import behavior and required authorization.
- Create Event: Accepted processing and event identifier deduplication.
- Get Events: Event history and pagination parameters.
- Get Flows: Journey inventory and documented request limits.
- Get Campaigns: Campaign inventory and filtering.
- Bulk Subscribe Profiles: Subscription scopes and opt-in considerations.
- Working with system webhooks: Event batches, signatures, and delivery behavior.
- Add a webhook action to a flow: Flow callbacks and configurable authentication headers.
- Understanding webhook status codes: Retryable failures and the delivery retry window.
- Create a test account: Separate testing environments and billing cautions.
- Klaviyo K:AI: Native agents, predictive features, and marketing assistance.
Start building on Major
Build a Klaviyo automation review app that remembers eligibility, preserves agent reasoning, and routes consequential actions through explicit approval.
About the author
Ritvij Gautam is Head of Growth at Major.
Last reviewed November 20, 2026 by Ritvij Gautam.
Frequently asked questions
- What is Klaviyo automation?
- Klaviyo automation coordinates lifecycle marketing through customer data, events, audiences, and configured flows. Major adds an app for cross-system state, an agent for contextual judgment, and a workflow for routing and approved actions while Klaviyo retains message execution.
- Does Klaviyo have built-in AI?
- Yes. K:AI includes Composer and Customer Agent, alongside predictive and assistive features such as Predicted CLV, Churn risk, Flows AI, and Smart translations. Check the account's entitlements before designing around a particular feature.
- Is Klaviyo a native Major connector?
- No. Klaviyo connects through Major's Pipedream connector, catalog app p_klaviyo. IT configures scoped access once and keeps credentials centrally in the connector vault rather than in app code or agent prompts.
- Can an API event trigger a Klaviyo flow?
- An event recorded through the Events API can trigger a flow configured for its metric, subject to the flow's settings and eligibility rules. A 202 API response means accepted for processing, not that an email was delivered.
- Does updating a profile subscribe someone to marketing?
- Do not treat a profile update as subscription consent. Klaviyo has a separate subscription job operation with its own scopes and opt-in behavior. Keep the evidence of permission and any pending confirmation separate from ordinary profile attributes.
- How should Klaviyo API rate limits be handled?
- Use endpoint-specific burst and steady limits, monitor the documented rate-limit headers, and honor Retry-After on 429 responses. Save pagination checkpoints and retry temporary failures with bounded backoff rather than restarting entire account scans.