customerio-common-errors

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".

1,868 stars

Best use case

customerio-common-errors is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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".

Teams using customerio-common-errors should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/customerio-common-errors/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/saas-packs/customerio-pack/skills/customerio-common-errors/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/customerio-common-errors/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How customerio-common-errors Compares

Feature / Agentcustomerio-common-errorsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 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)

```typescript
// 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)

```typescript
// 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

```typescript
// 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)

```typescript
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)

```typescript
// 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

```typescript
// 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

```bash
# 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

```typescript
// 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

- [Track API Error Reference](https://docs.customer.io/integrations/api/track/)
- [Common Transactional API Errors](https://docs.customer.io/journeys/transactional-api-common-api-errors/)
- [Common Broadcast Errors](https://docs.customer.io/journeys/api-triggered-errors/)
- [Customer.io Status Page](https://status.customer.io/)

## Next Steps

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

Related Skills

workhuman-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Workhuman common errors for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman common errors".

wispr-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Wispr Flow common errors for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr common errors".

windsurf-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix common Windsurf IDE and Cascade errors. Use when Cascade stops working, Supercomplete fails, indexing hangs, or encountering Windsurf-specific issues. Trigger with phrases like "windsurf error", "fix windsurf", "windsurf not working", "cascade broken", "windsurf slow".

webflow-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Webflow Data API v2 errors — 400, 401, 403, 404, 409, 429, 500. Use when encountering Webflow API errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "webflow error", "fix webflow", "webflow not working", "debug webflow", "webflow 429", "webflow 401".

vercel-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix common Vercel deployment and function errors. Use when encountering Vercel errors, debugging failed deployments, or troubleshooting serverless function issues. Trigger with phrases like "vercel error", "fix vercel", "vercel not working", "debug vercel", "vercel 500", "vercel build failed".

veeva-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Veeva Vault common errors for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva common errors".

vastai-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Vast.ai common errors and exceptions. Use when encountering Vast.ai errors, debugging failed instances, or troubleshooting GPU rental issues. Trigger with phrases like "vastai error", "fix vastai", "vastai not working", "debug vastai", "vastai instance failed".

twinmind-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix TwinMind common errors and exceptions. Use when encountering transcription errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "twinmind error", "fix twinmind", "twinmind not working", "debug twinmind", "transcription failed".

together-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Together AI common errors for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together common errors".

techsmith-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

TechSmith common errors for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith common errors".

supabase-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Supabase errors across PostgREST, PostgreSQL, Auth, Storage, and Realtime. Use when encountering error codes like PGRST301, 42501, 23505, or auth failures. Use when debugging failed queries, RLS policy violations, or HTTP 4xx/5xx responses. Trigger with "supabase error", "fix supabase", "PGRST", "supabase 403", "RLS not working", "supabase auth error", "unique constraint", "foreign key violation".

stackblitz-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Fix WebContainer and StackBlitz errors: COOP/COEP, SharedArrayBuffer, boot failures. Use when WebContainers fail to boot, embeds don't load, or processes crash inside WebContainers. Trigger: "stackblitz error", "webcontainer error", "SharedArrayBuffer not defined".