Diagnose and fix Customer.io common errors.
Use when troubleshooting API errors, delivery failures,
campaign issues, or SDK exceptions.
Trigger: "customer.io error", "customer.io not working",
"debug customer.io", "customer.io 401", "customer.io 429".
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Diagnose and fix Customer.io common errors.
Use when troubleshooting API errors, delivery failures,
campaign issues, or SDK exceptions.
Trigger: "customer.io error", "customer.io not working",
"debug customer.io", "customer.io 401", "customer.io 429".
allowed-tools
Read, Grep, Bash(curl:*), Bash(npx:*)
version
1.14.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
["saas","customer-io","debugging","errors"]
compatibility
Designed for Claude Code, also compatible with Codex and OpenClaw
Customer.io Common Errors
Overview
Diagnose and fix the most frequent Customer.io integration errors: API status codes, SDK exceptions, delivery failures, campaign trigger issues, and transactional message problems.
Prerequisites
Access to Customer.io dashboard
API credentials configured
Access to application logs
HTTP Status Code Reference
Code
Meaning
Retryable
Action
200
Success
N/A
No action needed
400
Bad Request
No
Fix request payload — see details below
401
Unauthorized
No
Check API credentials
403
Forbidden
No
API key lacks permission for this endpoint
404
Not Found
No
Check endpoint URL or resource ID
408
Request Timeout
Yes
Retry with backoff
422
Unprocessable Entity
No
Validation error — check required fields
429
Rate Limited
Yes
Back off, respect Retry-After header
500
Internal Server Error
Yes
Retry with exponential backoff
503
Service Unavailable
Yes
Check status.customer.io, retry later
Instructions
Error 1: Authentication Failures (401/403)
// WRONG — mixing up API key typesimport { TrackClient, APIClient, RegionUS } from"customerio-node";
cio = (siteId, trackApiKey, { : });
api = (appApiKey, { : });
// Track API uses Site ID + Track API Key (Basic Auth)
const
new
TrackClient
region
RegionUS
// App API uses App API Key (Bearer Auth) — DIFFERENT key
const
new
APIClient
region
RegionUS
// Common mistake: using Track API key for App API client
// const api = new APIClient(trackApiKey); // WRONG — will get 401
Fix: Verify you're using the right key type. Track API credentials are under "Tracking API Key" in Settings. App API key is under "App API Key" — it's a separate bearer token.
Error 2: Timestamp Format (400)
// WRONG — Customer.io expects Unix seconds, not millisecondsawait cio.identify("user-1", {
created_at: Date.now(), // 1704067200000 — TOO LARGE
});
// CORRECT — divide by 1000await cio.identify("user-1", {
created_at: Math.floor(Date.now() / 1000), // 1704067200
});
Customer.io silently accepts millisecond timestamps but interprets them as dates thousands of years in the future, breaking segment conditions and campaign triggers.