Customer.io Common Errors

VerifiedCaution

Diagnose and resolve common Customer.io integration errors including API failures, delivery issues, and SDK exceptions.

Sby Skills Guide Bot
DevelopmentIntermediate
8/29/2026
Claude Code
#customer-io#debugging#api-errors#http-status-codes#saas-integration

Recommended for

Automated summary

Classifies and helps remediate common Customer.io integration failures — API status codes, SDK exceptions, delivery failures, and campaign trigger issues — with redacted evidence and bounded retries.

Strengths

  • HTTP status reference table that states explicitly whether each error is retryable and what action to take
  • Concrete, high-frequency diagnostics: Track API key (Basic Auth) vs App API key (Bearer) mix-ups, and millisecond-versus-Unix-second timestamps
  • Safe-response matrix that requires checking consent, suppression, and idempotency keys before any replay
  • Backoff guidance that respects the Retry-After header and forbids disabling rate limits

Limitations

  • The supplied content is truncated (the "Events Not Trigg…" section), so coverage of event and campaign trigger problems is incomplete
  • No automated diagnostics: the user must supply application logs and dashboard access
  • Does not cover designing a new Customer.io integration or generic non-Customer.io HTTP debugging
When to use it

Use it when a Customer.io API call, campaign trigger, or SDK call fails and you need to triage status code, credentials, payload, and retry policy.

When not to use it

Avoid it for building a Customer.io integration from scratch or for debugging HTTP errors unrelated to Customer.io.

Security analysis

Caution
Quality score88/100

The skill provides legitimate Customer.io troubleshooting guidance and explicitly recommends secret-manager use, redaction, backoff, and idempotency. No destructive, exfiltrating, or obfuscated instructions are present, but the broad curl and npx tool permissions make it a caution rather than fully safe.

Findings
  • •Bash(curl:*) grants broad outbound network access, which is legitimate for API debugging but could be misused to contact unintended endpoints or transmit sensitive diagnostics if the agent is manipulated.
  • •Bash(npx:*) permits execution of arbitrary npm packages, introducing supply-chain and code-execution risk beyond the skill's stated debugging purpose.
  • •The skill references API keys and environment variables such as CUSTOMERIO_APP_API_KEY, but does not instruct exfiltration; it advises using a secret manager and redacting diagnostics.
How this analysis is made

Examples

401 on Track API
Our Node app gets a 401 from Customer.io when it calls identify(). Here's our client setup: [paste code]. Is this a Track API key vs App API key problem, and how do I fix it?
429 backoff on bulk sends
customer.io is returning 429 on our bulk event sends. What's the correct backoff and idempotency approach so we don't flood retries and get throttled further?
Events fire but no delivery
customer.io not working: our events fire but no delivery shows up in the dashboard. Check the identifier, consent state, suppression list, and event ordering before we replay anything.

name: customerio-common-errors description: '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

Customer.io Common Errors

Output

  • A classified Customer.io integration failure with redacted request/response evidence and an accountable owner.
  • A bounded remediation or escalation that preserves message integrity, consent, and rate controls.

Error Handling

| Condition | Safe response | |---|---| | Authentication or authorization fails | Verify the scoped secret reference and workspace/region; rotate/revoke through the secret manager if exposure is suspected. | | Delivery event is missing | Check identifier, consent, suppression, and event ordering before replaying anything. | | Rate limit or transient error occurs | Apply documented backoff and idempotency; do not flood retries or disable limits. | | Payload contains sensitive attributes | Redact diagnostics and validate the data contract before retrying. |

Examples

For a failed event, record its opaque correlation ID, status class, and destination environment. Confirm the profile ID, consent state, and idempotency key, then replay one sanitized test event only after the underlying failure is resolved.

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 types
import { TrackClient, APIClient, RegionUS } from "customerio-node";

// Track API uses Site ID + Track API Key (Basic Auth)
const cio = new TrackClient(siteId, trackApiKey, { region: RegionUS });

// App API uses App API Key (Bearer Auth) — DIFFERENT key
const api = new APIClient(appApiKey, { 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 milliseconds
await cio.identify("user-1", {
  created_at: Date.now(),              // 1704067200000 — TOO LARGE
});

// CORRECT — divide by 1000
await 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.

Error 3: Events Not Triggering Campaigns

// WRONG — event name doesn't match dashboard
await cio.track("user-1", { name: "SignedUp", data: {} });
// Dashboard expects: "signed_up" (case-sensitive)

// CORRECT — exact match, snake_case
await cio.track("user-1", { name: "signed_up", data: {} });

Checklist:

  1. Event name is case-sensitive — must match dashboard trigger exactly
  2. User must be identified before tracking (call identify() first)
  3. Campaign must be Active (not Draft or Paused)
  4. User must match campaign's audience filter/segment
  5. User must not be suppressed

Error 4: Transactional Message Failures (422)

import { APIClient, SendEmailRequest, RegionUS } from "customerio-node";

const api = new APIClient(process.env.CUSTOMERIO_APP_API_KEY!, {
  region: RegionUS,
});

// Common 422 errors:
// 1. Wrong transactional_message_id
const request = new SendEmailRequest({
  to: "user@example.com",
  transactional_message_id: "999",     // Must exist in dashboard
  message_data: { name: "Jane" },
  identifiers: { id: "user-123" },
});

// 2. Missing required message_data fields
// If template uses {{ data.reset_url }}, message_data must include reset_url

// 3. Invalid email address
// "to" must be a valid email format

Error 5: Rate Limiting (429)

// Implement backoff when you hit 429
async function withBackoff<T>(fn: () => Promise<T>, maxRetries = 3): Promise<T> {
  for (let i = 0; i <= maxRetries; i++) {
    try {
      return await fn();
    } catch (err: any) {
      if (err.statusCode === 429 && i < maxRetries) {
        // Respect Retry-After header if present, otherwise exponential backoff
        const retryAfter = err.headers?.["retry-after"];
        const delay = retryAfter
          ? parseInt(retryAfter) * 1000
          : Math.pow(2, i) * 1000 + Math.random() * 500;
        console.warn(`Rate limited. Retrying in ${delay}ms...`);
        await new Promise((r) => setTimeout(r, delay));
        continue;
      }
      throw err;
    }
  }
  throw new Error("Max retries exceeded");
}

// Usage
await withBackoff(() => cio.identify("user-1", { email: "user@example.com" }));

Error 6: EU Region Mismatch

// WRONG — EU account hitting US endpoint
const cio = new TrackClient(siteId, apiKey, { region: RegionUS });
// Returns 401 because credentials are for EU workspace

// CORRECT
import { RegionEU } from "customerio-node";
const cio = new TrackClient(siteId, apiKey, { region: RegionEU });

Error 7: User Not Receiving Email

Diagnostic checklist:

  1. Does the user have an email attribute? (Check People > user profile)
  2. Is the user suppressed? (Check suppression list)
  3. Has the email bounced before? (Check user Activity tab)
  4. Is the campaign Active? (Check Campaigns list)
  5. Does the user match the segment? (Check segment membership)
  6. Is the sending domain verified? (Settings > Sending Domains)

Diagnostic Commands

# Test Track API authentication
curl -s -w "\nHTTP %{http_code}\n" \
  -u "$CUSTOMERIO_SITE_ID:$CUSTOMERIO_TRACK_API_KEY" \
  -X PUT "https://track.customer.io/api/v1/customers/test-diag" \
  -H "Content-Type: application/json" \
  -d '{"email":"diag@example.com"}'

# Test App API authentication
curl -s -w "\nHTTP %{http_code}\n" \
  -H "Authorization: Bearer $CUSTOMERIO_APP_API_KEY" \
  "https://api.customer.io/v1/campaigns"

# Check Customer.io status
curl -s "https://status.customer.io/api/v2/status.json" | python3 -m json.tool

Error Handling Pattern

// Centralized error handler for Customer.io operations
async function safeCioCall<T>(
  operation: string,
  fn: () => Promise<T>
): Promise<T | null> {
  try {
    return await fn();
  } catch (err: any) {
    const code = err.statusCode ?? err.status ?? "unknown";
    console.error(`CIO ${operation} failed [${code}]:`, err.message);

    // Alert on auth errors — likely misconfiguration
    if (code === 401 || code === 403) {
      console.error("AUTH ERROR: Check API credentials immediately");
    }

    // Don't crash the app for tracking failures
    return null;
  }
}

// Usage — never crashes your app
await safeCioCall("identify", () =>
  cio.identify("user-1", { email: "user@example.com" })
);

Resources

Next Steps

After resolving errors, proceed to customerio-debug-bundle for comprehensive debug reports.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/customer-io-common-errors-mte1lipv/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/customer-io-common-errors-mte1lipv' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/customer-io-common-errors-mte1lipv/download' --output '.skill-downloads/customer-io-common-errors-mte1lipv/SKILL.md.part' && mv '.skill-downloads/customer-io-common-errors-mte1lipv/SKILL.md.part' '.skill-downloads/customer-io-common-errors-mte1lipv/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Environment declared by the author: Designed for Claude Code

Tools declared by the author (check availability in your agent): Read, Grep, Bash(curl:*), Bash(npx:*)

Original excerpt: Prerequisites
  • Access to Customer.io dashboard
  • API credentials configured
  • Access to application logs

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/customer-io-common-errors-mte1lipv/SKILL.md' && test -s '.skill-downloads/customer-io-common-errors-mte1lipv/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/customerio-common-errors' && cp -R '.skill-downloads/customer-io-common-errors-mte1lipv' '.claude/skills/customerio-common-errors'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/customer-io-common-errors-mte1lipv'

openskills read 'customer-io-common-errors-mte1lipv'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/customer-io-common-errors-mte1lipv/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills