klaviyo-core-workflow-a
Installation
SKILL.md
Klaviyo Core Workflow A -- Profiles, Lists & Subscriptions
Overview
Primary money-path workflow: create/update profiles, manage lists, and subscribe contacts for email and SMS marketing via the klaviyo-api SDK. This skill covers the six-step path from a raw customer record to a consented, segmentable subscriber. High-level flow lives here; the full code for every step is in references/implementation.md.
Prerequisites
- Completed the
klaviyo-install-authsetup soKLAVIYO_PRIVATE_KEYis available in the environment. - A Klaviyo private API key scoped to
profiles:read,profiles:write,lists:read, andlists:write. - The
klaviyo-apinpm package installed in the project (npm install klaviyo-api). - Node.js with TypeScript configured, since all examples use the typed SDK.
Instructions
Every call authenticates through a single ApiKeySession built from the private key:
import { ApiKeySession, ProfilesApi, ListsApi } from 'klaviyo-api';