Klaviyo
Sync e-commerce customer profiles and trigger email/SMS flows via the Klaviyo API.
- Base URL:
https://a.klaviyo.com/api - Auth:
Authorization: Klaviyo-API-Key <private-api-key>(no OAuth, single key) - Revision header: every request sends a
revisionheader (a date-stamped API version, e.g.2024-10-15). The tool sends a stable default; override it with therevisioninput.
What it does
Klaviyo flows (automations) are triggered by events: when you post an event
(a metric like Placed Order) for a profile, any flow whose trigger is that
metric fires and delivers its configured email/SMS. This tool lets InTouch jobs
upsert profiles, fire those triggering events, and inspect campaigns — all with
the credential held in InTouch, never in the AI context.
Operations
| operation | method / endpoint | purpose |
|---|---|---|
get-profiles |
GET /api/profiles/ |
List profiles; optional email filter / pageSize |
upsert-profile |
POST /api/profile-import/ |
Create or update a profile (matched on email/phone) |
create-event |
POST /api/events/ |
Fire an event/metric for a profile → triggers matching flows |
get-campaigns |
GET /api/campaigns/ |
List campaigns (filtered by channel, default email) |
Inputs
apiKey(required) — Klaviyo private API key.operation(required) — one of the four above.revision— optional API revision date (header).email,phoneNumber— profile identifiers.firstName,lastName— profile name (upsert).metric— event name (create-event), e.g.Placed Order.value— optional numeric event value (e.g. order total).properties— optional JSON object of custom properties.channel—emailorsms(get-campaigns).pageSize— optional page size (get-profiles).
Output
Publishes result (the Klaviyo JSON response body as a string) and status
(the HTTP status code). create-event returns 202 Accepted with an empty
body on success; the tool emits {"accepted": true, "metric": "..."}.
API key setup
- In Klaviyo, go to Settings → API keys.
- Click Create Private API Key, name it (e.g.
intouch), and grant the scopes you need (Profiles, Events, Campaigns). - Copy the key (starts with
pk_…) and pass it as theapiKeyinput.
Examples
Upsert a profile:
{
"apiKey": "pk_xxx",
"operation": "upsert-profile",
"email": "[email protected]",
"firstName": "Jane",
"properties": "{\"plan\":\"pro\"}"
}
Trigger a flow by firing an event:
{
"apiKey": "pk_xxx",
"operation": "create-event",
"email": "[email protected]",
"metric": "Placed Order",
"value": "129.00",
"properties": "{\"order_id\":\"A-1001\"}"
}
List email campaigns:
{ "apiKey": "pk_xxx", "operation": "get-campaigns", "channel": "email" }
Look up a profile by email:
{ "apiKey": "pk_xxx", "operation": "get-profiles", "email": "[email protected]" }