klaviyo-hello-world

Featured

Create a minimal working Klaviyo example with real API calls. Use when starting a new Klaviyo integration, testing your setup, or learning basic profile creation and event tracking patterns. Trigger with phrases like "klaviyo hello world", "klaviyo example", "klaviyo quick start", "simple klaviyo code", "first klaviyo call".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Klaviyo Hello World ## Overview Minimal working example: create a profile, track an event, and query the result using the `klaviyo-api` Node.js SDK against `a.klaviyo.com/api/*`. ## Prerequisites - Completed `klaviyo-install-auth` setup - `KLAVIYO_PRIVATE_KEY` set in environment - `klaviyo-api` package installed ## Instructions ### Step 1: Create a Profile ```typescript // hello-klaviyo.ts import { ApiKeySession, ProfilesApi, EventsApi, ProfileCreateQuery, ProfileEnum, EventCreateQueryV2, EventEnum, } from 'klaviyo-api'; const session = new ApiKeySession(process.env.KLAVIYO_PRIVATE_KEY!); const profilesApi = new ProfilesApi(session); const eventsApi = new EventsApi(session); // Create or update a profile // NOTE: SDK uses camelCase (firstName, not first_name) const profilePayload: ProfileCreateQuery = { data: { type: ProfileEnum.Profile, attributes: { email: 'hello@example.com', firstName: 'Hello', lastName: 'World', properties: { source: 'hello-world-script', signupDate: new Date().toISOString(), }, }, }, }; const profile = await profilesApi.createProfile(profilePayload); console.log('Profile created:', profile.body.data.id); ``` ### Step 2: Track an Event ```typescript // Track a custom event tied to the profile const eventPayload: EventCreateQueryV2 = { data: { type: EventEnum.Event, attributes: { // The metric name -- creates the metric if it doesn't exist metri...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category