IN

instantly-common-errors

A diagnostic reference for identifying and resolving Instantly.ai API v2 HTTP errors and campaign state issues.

Install

mkdir -p .claude/skills/instantly-common-errors && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9218" && unzip -o skill.zip -d .claude/skills/instantly-common-errors && rm skill.zip

Installs to .claude/skills/instantly-common-errors

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Diagnose and fix Instantly.ai API v2 common errors and exceptions.
66 charsno explicit “when” trigger
Beginner

Key capabilities

  • Diagnose HTTP status code errors
  • Validate campaign configuration requirements
  • Identify and pause unhealthy email accounts

How it works

Provides a structured diagnostic reference for Instantly API v2 errors, including scripts to check campaign health, account vitals, and webhook delivery status.

Inputs & outputs

You give it
API error response or campaign ID
You get back
Diagnostic report or remediation action

When to use instantly-common-errors

  • Troubleshooting 401 unauthorized API access errors
  • Resolving 429 rate limit issues during bulk operations
  • Debugging campaign logic failures
  • Identifying webhook delivery problems

About this skill

Instantly Common Errors

Overview

Diagnostic reference for Instantly API v2 errors. Covers HTTP status codes, campaign state errors, account health issues, lead operation failures, and webhook delivery problems.

Prerequisites

  • Completed instantly-install-auth setup
  • Access to Instantly dashboard for verification
  • API key with appropriate scopes

HTTP Status Codes

StatusMeaningCommon CauseFix
400Bad RequestMalformed JSON, invalid field valuesValidate request body against schema
401UnauthorizedInvalid, expired, or revoked API keyRegenerate key in Settings > Integrations
403ForbiddenAPI key missing required scopeCreate key with correct scope (e.g., campaigns:all)
404Not FoundInvalid campaign/lead/account IDVerify resource exists with a GET call first
422Unprocessable EntityBusiness logic violation (duplicate lead, invalid state)Check error body for details
429Too Many RequestsRate limit exceededImplement exponential backoff (see below)
500Internal Server ErrorInstantly server issueRetry with backoff; check status.instantly.ai

Campaign Errors

Campaign Won't Activate (Stuck in Draft)

// Diagnosis: check campaign requirements
async function diagnoseCampaign(campaignId: string) {
  const campaign = await instantly<Campaign>(`/campaigns/${campaignId}`);

  const issues: string[] = [];

  // Check sequences
  if (!campaign.sequences?.length || !campaign.sequences[0]?.steps?.length) {
    issues.push("No email sequences — add at least one step with subject + body");
  }

  // Check schedule
  if (!campaign.campaign_schedule?.schedules?.length) {
    issues.push("No sending schedule — add schedule with timing and days");
  }

  // Check sending accounts
  const mappings = await instantly(`/account-campaign-mappings/${campaignId}`);
  if (!Array.isArray(mappings) || mappings.length === 0) {
    issues.push("No sending accounts assigned — add via PATCH /campaigns/{id} with email_list");
  }

  // Check for leads
  const leads = await instantly<Lead[]>("/leads/list", {
    method: "POST",
    body: JSON.stringify({ campaign: campaignId, limit: 1 }),
  });
  if (leads.length === 0) {
    issues.push("No leads — add leads via POST /leads");
  }

  if (issues.length === 0) {
    console.log("Campaign looks ready to activate");
  } else {
    console.log("Issues preventing activation:");
    issues.forEach((i) => console.log(`  - ${i}`));
  }
}

Campaign Status Codes

StatusLabelMeaning
0DraftNot yet activated
1ActiveCurrently sending
2PausedManually paused
3CompletedAll leads processed
4Running SubsequencesMain sequence done, subsequences active
-1Accounts UnhealthySending accounts have SMTP/IMAP errors
-2Bounce ProtectAuto-paused due to high bounce rate
-99SuspendedAccount-level suspension

Fix: Accounts Unhealthy (-1)

async function fixUnhealthyAccounts(campaignId: string) {
  // 1. Get accounts assigned to campaign
  const accounts = await instantly<Account[]>("/accounts?limit=100");

  // 2. Test vitals for each
  const vitals = await instantly("/accounts/test/vitals", {
    method: "POST",
    body: JSON.stringify({ accounts: accounts.map((a) => a.email) }),
  });

  // 3. Identify and fix broken accounts
  for (const v of vitals as any[]) {
    if (v.smtp_status !== "ok" || v.imap_status !== "ok") {
      console.log(`BROKEN: ${v.email} — SMTP=${v.smtp_status}, IMAP=${v.imap_status}`);
      // Pause the broken account
      await instantly(`/accounts/${encodeURIComponent(v.email)}/pause`, { method: "POST" });
      console.log(`  Paused ${v.email}. Fix credentials, then resume.`);
    }
  }
}

Lead Errors

Duplicate Lead (422)

// Prevent duplicates by setting skip flags
await instantly("/leads", {
  method: "POST",
  body: JSON.stringify({
    campaign: campaignId,
    email: "[email protected]",
    first_name: "Jane",
    skip_if_in_workspace: true,   // skip if email exists anywhere in workspace
    skip_if_in_campaign: true,    // skip if already in this campaign
  }),
});

Lead Status Reference

StatusLabelDescription
1ActiveEligible to receive emails
2PausedManually paused
3CompletedAll sequence steps sent
-1BouncedEmail bounced
-2UnsubscribedLead unsubscribed
-3SkippedSkipped (blocklist, duplicate, etc.)

Rate Limit Handling

async function withBackoff<T>(
  operation: () => Promise<T>,
  maxRetries = 5
): Promise<T> {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    try {
      return await operation();
    } catch (err: any) {
      if (err.status === 429 && attempt < maxRetries) {
        const wait = Math.pow(2, attempt) * 1000;
        console.warn(`429 Rate Limited. Waiting ${wait}ms (attempt ${attempt + 1}/${maxRetries})`);
        await new Promise((r) => setTimeout(r, wait));
        continue;
      }
      throw err;
    }
  }
  throw new Error("Unreachable");
}

Webhook Errors

IssueDiagnosticFix
Events not deliveredCheck webhook status: GET /webhooksWebhook may be paused — resume with POST /webhooks/{id}/resume
Wrong event formatCompare to expected schemaEnsure event_type matches: email_sent, reply_received, etc.
Delivery failuresCheck GET /webhook-events/summaryFix target URL, ensure 2xx response within 30s
Retries exhaustingInstantly retries 3x in 30sReturn 200 immediately, process async

Quick Diagnostic Script

set -euo pipefail
echo "=== Instantly Health Check ==="

# Test auth
curl -s -o /dev/null -w "Auth: HTTP %{http_code}\n" \
  https://api.instantly.ai/api/v2/campaigns?limit=1 \
  -H "Authorization: Bearer $INSTANTLY_API_KEY"

# Count campaigns by status
curl -s https://api.instantly.ai/api/v2/campaigns?limit=100 \
  -H "Authorization: Bearer $INSTANTLY_API_KEY" | \
  jq 'group_by(.status) | map({status: .[0].status, count: length})'

# Check account health
curl -s https://api.instantly.ai/api/v2/accounts?limit=100 \
  -H "Authorization: Bearer $INSTANTLY_API_KEY" | \
  jq '[.[] | {email, status, warmup_status}] | .[:5]'

Error Handling

ErrorCauseSolution
401 after key rotationOld key cachedRestart app / clear env cache
403 on campaign activateMissing campaigns:update scopeRegenerate API key with correct scopes
422 duplicate leadLead already in workspaceUse skip_if_in_workspace: true
Campaign -2 bounce protectBounce rate >5%Clean lead list, verify emails before import
Warmup health droppingToo many campaign emails too soonReduce daily_limit, extend warmup period

Resources

Next Steps

For structured debugging, see instantly-debug-bundle.

When not to use it

  • Ignoring API rate limits
  • Deploying without error handling

Prerequisites

instantly-install-auth setupInstantly dashboard accessAPI key with appropriate scopes

Limitations

  • Instantly retries webhooks 3 times in 30 seconds
  • Bounce protect pauses campaigns if bounce rate exceeds 5%

How it compares

Provides programmatic remediation scripts for common errors rather than just logging the status codes.

Compared to similar skills

instantly-common-errors side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
instantly-common-errors (this skill)027dReviewBeginner
linear-debug-bundle127dCautionIntermediate
posthog-common-errors127dCautionIntermediate
exa-advanced-troubleshooting027dCautionAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

linear-debug-bundle

jeremylongshore

Comprehensive debugging toolkit for Linear integrations. Use when setting up logging, tracing API calls, or building debug utilities for Linear. Trigger with phrases like "debug linear integration", "linear logging", "trace linear API", "linear debugging tools", "linear troubleshooting".

12

posthog-common-errors

jeremylongshore

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

10

exa-advanced-troubleshooting

jeremylongshore

Apply Exa advanced debugging techniques for hard-to-diagnose issues. Use when standard troubleshooting fails, investigating complex race conditions, or preparing evidence bundles for Exa support escalation. Trigger with phrases like "exa hard bug", "exa mystery error", "exa impossible to debug", "difficult exa issue", "exa deep debug".

00

frontend-api-integration-patterns

TJSNDHU

Production-ready patterns for integrating frontend applications with backend APIs, including race condition handling, request cancellation, retry strategies, error normalization, and UI state management.

00

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

telegram-mini-app

davila7

Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.

62163

Search skills

Search the agent skills registry