Use the Klaviyo CLI from KosmoKrator to call Klaviyo tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Klaviyo can be configured headlessly with `kosmokrator integrations:configure klaviyo`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure klaviyo --enable --read allow --write ask --jsonkosmokrator integrations:doctor klaviyo --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API keyapi_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
No credentials are required.
Call Klaviyo Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Klaviyo.
klaviyo.klaviyo_create_profile
Write write
Create a new profile in Klaviyo.
Provide at least an email address or phone number. Optionally set first name, last name,
and custom properties. Returns the newly created profile with its Klaviyo ID.
Update an existing Klaviyo profile by ID.
Provide only the fields you want to change — omitted fields are left untouched.
Supports updating email, phone number, first name, last name, and custom properties.
List profiles in Klaviyo with cursor-based pagination.
Returns each profile's ID, email, phone number, name, and custom properties.
Use the page_cursor from a previous response to fetch the next page of results.
Subscribe a profile to a Klaviyo list using their email address.
Requires a valid list ID and the subscriber's email. Optionally provide a phone number
and an ISO 8601 consented_at timestamp.
Track a new event for an existing Klaviyo profile.
Provide the profile ID, event name, and optional properties, numeric value, and timestamp.
Events are used to trigger flows and segment profiles based on behaviour.
List events in Klaviyo with optional filtering and cursor-based pagination.
Supports Klaviyo filter expressions (e.g. "greater-than(timestamp,2024-01-01)")
to narrow results. Use page_cursor to paginate through large result sets.
List all lists in the connected Klaviyo account.
Returns each list's ID, name, and other metadata.
Use cursor-based pagination to iterate through large numbers of lists.
List profiles that belong to a specific Klaviyo list.
Returns each profile's ID, email, phone number, name, and custom properties.
Use cursor-based pagination to iterate through large lists.
List all flows in the connected Klaviyo account.
Returns each flow's ID, name, status, and other metadata.
Use cursor-based pagination to iterate through large numbers of flows.
List all campaigns in the connected Klaviyo account.
Returns each campaign's ID, name, status, and other metadata.
Use cursor-based pagination to iterate through large numbers of campaigns.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
klaviyo.klaviyo_create_profile
Create a new profile in Klaviyo.
Provide at least an email address or phone number. Optionally set first name, last name,
and custom properties. Returns the newly created profile with its Klaviyo ID.
Update an existing Klaviyo profile by ID.
Provide only the fields you want to change — omitted fields are left untouched.
Supports updating email, phone number, first name, last name, and custom properties.
Custom profile properties to update as key-value pairs.
klaviyo.klaviyo_list_profiles
List profiles in Klaviyo with cursor-based pagination.
Returns each profile's ID, email, phone number, name, and custom properties.
Use the page_cursor from a previous response to fetch the next page of results.
Number of profiles to return (default 20, max 100).
page_cursor
string
no
Pagination cursor from a previous response to fetch the next page.
klaviyo.klaviyo_subscribe_profile
Subscribe a profile to a Klaviyo list using their email address.
Requires a valid list ID and the subscriber's email. Optionally provide a phone number
and an ISO 8601 consented_at timestamp.
Track a new event for an existing Klaviyo profile.
Provide the profile ID, event name, and optional properties, numeric value, and timestamp.
Events are used to trigger flows and segment profiles based on behaviour.
List events in Klaviyo with optional filtering and cursor-based pagination.
Supports Klaviyo filter expressions (e.g. "greater-than(timestamp,2024-01-01)")
to narrow results. Use page_cursor to paginate through large result sets.
Pagination cursor from a previous response to fetch the next page.
klaviyo.klaviyo_list_lists
List all lists in the connected Klaviyo account.
Returns each list's ID, name, and other metadata.
Use cursor-based pagination to iterate through large numbers of lists.
List profiles that belong to a specific Klaviyo list.
Returns each profile's ID, email, phone number, name, and custom properties.
Use cursor-based pagination to iterate through large lists.
Number of profiles to return (default 20, max 100).
page_cursor
string
no
Pagination cursor from a previous response to fetch the next page.
klaviyo.klaviyo_list_flows
List all flows in the connected Klaviyo account.
Returns each flow's ID, name, status, and other metadata.
Use cursor-based pagination to iterate through large numbers of flows.
List all campaigns in the connected Klaviyo account.
Returns each campaign's ID, name, status, and other metadata.
Use cursor-based pagination to iterate through large numbers of campaigns.
Number of campaigns to return (default 20, max 100).
page_cursor
string
no
Pagination cursor from a previous response to fetch the next page.
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.