Global PlatformCommunications, payments, and governed AI infrastructure
EnglishDocsSupportLogin
A
AfriRouteConnect Platform
Products
Platform
Enterprise
Developers
Markets
Company
Pricing
Book a DemoGet Started
Pricing
Sign InCreate Account
Documentation

Get Started

  • Overview
  • Quickstart
  • Authentication
  • Webhooks

Core

  • Authentication
  • Versioning
  • Webhooks
  • Errors
  • Rate Limits

API Reference

  • API Overview
  • Messages API
  • Voice API
  • API Endpoints

Governance

  • Compliance
  • Architecture

Messaging

  • Messaging API
  • SMS
  • WhatsApp Business
  • Telegram

Voice

  • Voice API
  • IVR Builder
  • SIP Trunking
  • Number Masking

Engagement

  • Contact Center
  • AIT Assist
  • AI Chatbots
  • Video API

Trust & Payments

  • Verify
  • Number Lookup
  • Fraud Guard
  • Payments
Need help?

Join our developer community or contact support.

Get Support

Error Codes

A searchable reference for AfriRoute API errors, including recommended remediation steps. Each code includes its category, HTTP status, and a resolution hint.

Showing 28 of 28

Error response shape

{
  "error": {
    "code": 4001,
    "message": "You have exceeded your rate limit.",
    "resolution": "Wait 30 seconds and retry. Implement exponential backoff.",
    "category": "rate_limit",
    "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

Reference

Rate limits & retries →
1001INVALID_API_KEYHTTP 401•Authentication

The API key provided is invalid or expired.

Resolution: Check your API key at https://console.afriroute.ai/api-keys
Details
1002INSUFFICIENT_PERMISSIONSHTTP 403•Authentication

Your API key does not have permission for this operation.

Resolution: Request additional permissions from your account administrator.
Details
1003API_KEY_EXPIREDHTTP 401•Authentication

Your API key has expired.

Resolution: Generate a new API key in the console.
Details
1004IP_NOT_ALLOWEDHTTP 403•Authentication

Your IP address is not in the allowlist.

Resolution: Add your IP to the allowlist or contact your administrator.
Details
2001INVALID_PHONE_NUMBERHTTP 400•Validation

The phone number format is invalid.

Resolution: Use E.164 format: +[country_code][number] (e.g., +12025551234)
Details
2002MESSAGE_TOO_LONGHTTP 400•Validation

Message body exceeds maximum length.

Resolution: SMS: 160 chars (single), 1600 chars (concatenated). Reduce length or split into multiple messages.
Details
2003INVALID_PARAMETERSHTTP 400•Validation

One or more request parameters are invalid.

Resolution: Check the API documentation for required parameters.
Details
2004MISSING_REQUIRED_FIELDHTTP 400•Validation

A required field is missing from the request.

Resolution: Refer to API docs for required fields: https://docs.afriroute.ai
Details
3001MESSAGE_NOT_FOUNDHTTP 404•Resource

The requested message does not exist.

Resolution: Verify the message ID and ensure it belongs to your account.
Details
3002CONVERSATION_NOT_FOUNDHTTP 404•Resource

The requested conversation does not exist.

Resolution: Check the conversation ID is correct.
Details
3003AGENT_NOT_FOUNDHTTP 404•Resource

The requested AI agent does not exist.

Resolution: Verify agent ID or create a new agent.
Details
4001RATE_LIMIT_EXCEEDEDHTTP 429•Rate limits

You have exceeded your rate limit.

Resolution: Wait {retry_after} seconds and retry. Implement exponential backoff.
Details
4002CONCURRENT_LIMIT_EXCEEDEDHTTP 429•Rate limits

Too many concurrent requests.

Resolution: Reduce concurrent connections or upgrade your plan.
Details
5001CARRIER_UNAVAILABLEHTTP 503•Service

The destination carrier is temporarily unavailable.

Resolution: Message will be retried automatically. Check status page for carrier issues.
Details
5002INSUFFICIENT_BALANCEHTTP 402•Billing

Your account balance is insufficient for this operation.

Resolution: Add funds at https://console.afriroute.ai/billing
Details
5003INTERNAL_SERVER_ERRORHTTP 500•Service

An internal server error occurred.

Resolution: Contact support with trace ID. We will investigate.
Details
5004SERVICE_TIMEOUTHTTP 504•Service

The request timed out.

Resolution: Retry with exponential backoff. If issue persists, contact support.
Details
6001DELIVERY_FAILED_INVALID_NUMBERHTTP 200•Delivery

Message delivery failed: invalid or inactive phone number.

Resolution: Verify the phone number is active and correct.
Details
6002DELIVERY_FAILED_BLOCKEDHTTP 200•Delivery

Message delivery failed: recipient has blocked sender.

Resolution: Recipient must unblock your sender ID.
Details
6003DELIVERY_FAILED_CARRIER_FILTERHTTP 200•Delivery

Message blocked by carrier spam filter.

Resolution: Review message content and sender reputation. Contact support for details.
Details
7001AI_CONFIDENCE_BELOW_THRESHOLDHTTP 200•AI & Governance

AI decision confidence below required threshold. Human review required.

Resolution: Review the decision in your dashboard and approve/reject manually.
Details
7002POLICY_VIOLATION_DETECTEDHTTP 403•AI & Governance

Request blocked by governance policy.

Resolution: Review policy rules in dashboard. Contact compliance team if incorrect.
Details
7003AI_MODEL_UNAVAILABLEHTTP 503•AI & Governance

The requested AI model is temporarily unavailable.

Resolution: Fallback model will be used automatically. Check status page.
Details
7004KILL_SWITCH_ACTIVATEDHTTP 403•AI & Governance

AI operations suspended by kill switch.

Resolution: An administrator has disabled AI for this scope. Contact your team lead.
Details
8001CONSENT_REQUIREDHTTP 403•Compliance

Recipient consent required before sending message.

Resolution: Ensure recipient has opted in. Store consent proof per GDPR/TCPA requirements.
Details
8002QUIET_HOURS_VIOLATIONHTTP 403•Compliance

Message sending blocked during quiet hours (9PM - 8AM local time).

Resolution: Schedule message for appropriate hours or request exemption.
Details
8003DATA_RESIDENCY_VIOLATIONHTTP 403•Compliance

Operation violates data residency policy.

Resolution: Ensure data stays within configured region boundaries.
Details
8004REGULATORY_RESTRICTIONHTTP 451•Compliance

Operation restricted by local regulations.

Resolution: This operation is not permitted in the destination country.
Details

Handling patterns

JavaScript / TypeScript
const res = await fetch(url, { method: 'POST', headers, body });

if (!res.ok) {
  const data = await res.json().catch(() => null);
  const code = data?.error?.code;
  if (res.status === 429 || code === 4001) {
    const retryAfter = data?.error?.retry_after ?? 1;
    await new Promise(r => setTimeout(r, retryAfter * 1000));
    // retry…
  }
  throw new Error(data?.error?.message ?? 'Request failed (' + res.status + ')');
}
Python
import time
import requests

res = requests.post(url, headers=headers, json=payload, timeout=15)

if res.status_code >= 400:
  data = {}
  try:
    data = res.json()
  except Exception:
    pass
  if res.status_code == 429 or data.get('error', {}).get('code') == 4001:
    retry_after = data.get('error', {}).get('retry_after', 1)
    time.sleep(retry_after)
    # retry…
  raise Exception(data.get('error', {}).get('message', f"Request failed ({res.status_code})"))
AfriRoute dispatch

Product launches, market moves, and customer growth ideas worth opening.

Join the AfriRoute newsletter for practical rollout notes, operator and market updates, messaging playbooks, and launch-ready ideas across voice, USSD, payments, and AI-powered communications.

Launch Notes
Fresh product releases and roadmap movement.
Market Signals
Country, operator, and rollout insights that matter.
Growth Plays
Messaging and engagement ideas for real campaigns.
Subscribe

Get AfriRoute in your inbox

One practical email stream for builders, operators, and commercial teams. No generic noise.

Why subscribe
Launch alerts, platform ideas, operator context, and deployment guidance for teams moving fast.
Trust CenterSecurity, compliance, and audit posture

Products

  • Messaging API
  • SMS
  • WhatsApp Business
  • Voice API
  • USSD
  • Payments
  • AIT Assist
  • AI Chatbots

Platform

  • Countries
  • Telecom
  • AI Platform
  • Network
  • Onboarding
  • Unified API
  • Security

Solutions

  • Financial Services
  • E-Commerce
  • Healthcare
  • Government
  • Enterprise

Developers

  • Documentation
  • API Reference
  • SDKs
  • Quickstart
  • Status Page
  • Community

Company

  • About Us
  • CareersHiring
  • Blog
  • Partners
  • Trust Center
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Commercial License
  • SLA
A
AfriRoute
© 2026 AfriRoute Communications Platform. All rights reserved.
SOC 2 (2026)99.9%+ Uptime TargetGlobal Coverage

AfriRoute is a global Communications Platform as a Service (CPaaS), infrastructure, and AI orchestration platform built for high-regulation and high-resilience markets. Programmable APIs for messaging, voice, USSD, mobile money payments, and contact center operations. Born in Africa. Built for the world's most complex markets. AfriRoute is not affiliated with mining, logistics, commodity intelligence, or precious metals businesses using a similar name.