Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Installs the official klaviyo-api Node.js SDK and configures private API key authentication for Klaviyo's REST API.
36% 86%+50 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 8 of 22 without it.
If a development team chooses to implement their server backend in Python instead of Node.js for Klaviyo API integration, what is the minimum Python runtime version required?
Specifies Python version 3.10 or higher.
3 of 3 safety checks passed
Concrete end-to-end examples that build on the client configured in the main
walkthrough (references/implementation.md). Each one is a self-contained
sequence you can copy into a fresh project.
# Install the official SDK
npm install klaviyo-api
# Store the private key (never commit it)
echo 'KLAVIYO_PRIVATE_KEY=pk_***********************************' >> .env
echo '.env' >> .gitignore
// src/klaviyo/client.ts
import { ApiKeySession, ProfilesApi, EventsApi, ListsApi } from 'klaviyo-api';
const session = new ApiKeySession(process.env.KLAVIYO_PRIVATE_KEY!);
export const profilesApi = new ProfilesApi(session);
export const eventsApi = new EventsApi(session);
export const listsApi = new ListsApi(session);
Run the verification script once in CI or locally; it exits non-zero on a bad key so a broken credential fails the build instead of surfacing at runtime.
// src/klaviyo/verify.ts
import { ApiKeySession, AccountsApi } from 'klaviyo-api';
async function verifyKlaviyoConnection(): Promise<void> {
const session = new ApiKeySession(process.env.KLAVIYO_PRIVATE_KEY!);
const accountsApi = new AccountsApi(session);
Next to this one in the catalogue, plus more from the same author.