/klaviyo-pack:klaviyo-install-authfrom klaviyo-pack
Installs the Klaviyo Node.js SDK and configures private API key authentication for server-side REST API access.
Ships in klaviyo-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set up the official klaviyo-api Node.js SDK and configure private API key authentication against Klaviyo's REST API (revision 2024-10-15). The workflow below is the high-level path; the verbatim code for every step lives in the full implementation walkthrough, and copy-paste sequences live in worked examples.
The full sequence is five steps. The essentials are below; drill into references/implementation.md for the complete code of each step (verify script, revision header, Python setup, scope table).
# Node.js (official SDK -- NOT @klaviyo/sdk, that's deprecated)
npm install klaviyo-api
Important: The npm package is
klaviyo-api, not@klaviyo/sdk. The SDK exports per-resource API classes (ProfilesApi, EventsApi, etc.) that each take anApiKeySession.
Store the private key in .env and confirm it is gitignored. Klaviyo uses two key types:
| Key Type | Prefix | Use Case | Header |
|---|---|---|---|
| Private API Key | pk_ | Server-side REST API | Authorization: Klaviyo-API-Key pk_*** |
| Public API Key | 6-char | Client-side Track/Identify | Query param company_id |
// 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 a one-time verification against AccountsApi.getAccounts() to prove the key
works, and remember every request needs a revision: 2024-10-15 header (the SDK
adds it automatically; raw HTTP does not). Full verify script + cURL smoke test:
references/implementation.md.
klaviyo-api package installed in node_modules.env file with KLAVIYO_PRIVATE_KEY set| Error | Status | Cause | Solution |
|---|---|---|---|
Authentication failed | 401 | Invalid or expired private key | Regenerate key at Settings > API Keys |
Forbidden | 403 | Key missing required scopes | Create key with appropriate scopes (e.g., profiles:read) |
Rate limited | 429 | Exceeded 75 req/s burst or 700 req/min steady | Honor Retry-After header; see klaviyo-rate-limits |
MODULE_NOT_FOUND | N/A | Wrong package name | Use klaviyo-api, not @klaviyo/sdk |
ENOTFOUND a.klaviyo.com | N/A | DNS/network failure | Check internet connectivity, firewall rules |
Four copy-paste sequences (fresh Node project, key verification, Python with retry tuning, raw-HTTP smoke test) are in references/examples.md. The fastest sanity check — confirm a key from a shell before writing any code:
curl -X GET "https://a.klaviyo.com/api/profiles/" \
-H "Authorization: Klaviyo-API-Key pk_***" \
-H "revision: 2024-10-15" \
-H "Accept: application/vnd.api+json"
A 200 with a JSON data array means the key and revision header are valid; a
401 means the key is wrong; a 403 means it lacks the profiles:read scope.
After successful auth, proceed to the klaviyo-hello-world skill for your first
profile + event API call, then klaviyo-rate-limits to harden request handling
against the 75 req/s burst ceiling.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin klaviyo-pack24 skills in this plugin
/klaviyo-ci-integrationConfigure CI/CD pipelines for Klaviyo integrations with GitHub Actions.
Use when setting up automated testing, configuring CI secrets,
or integrating Klaviyo SDK tests into your build pipeline.
Trigger with phrases like "klaviyo CI", "klaviyo GitHub Actions",
"klaviyo automated tests", "CI klaviyo", "klaviyo pipeline".
/klaviyo-common-errorsDiagnose and fix common Klaviyo API errors and exceptions.
Use when encountering Klaviyo 4xx/5xx errors, debugging failed requests,
or troubleshooting SDK integration issues.
Trigger with phrases like "klaviyo error", "fix klaviyo",
"klaviyo not working", "debug klaviyo", "klaviyo 400", "klaviyo 429".
/klaviyo-Other plugins' skills for the same job