API Documentation

Public API for sending messages and building integrations with automation tools

Quick Start

The Infini Reach API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.

Base URL

https://api.infinireach.io

Authentication

All API requests require authentication using an API key. Include your API key in the request headers:

X-API-Key: YOUR_API_KEY
Content-Type: application/json

⚠️ Security: Keep your API keys secure. Don't share them in publicly accessible code or repositories.

Send Message

Send an SMS or WhatsApp message through your registered devices.

POST /api/v1/messages

Request Body

{
  "to": "+1234567890",
  "message": "Hello from Infini Reach!",
  "from": "+15559876543",  // required: sender phone number
  "channel": "sms",  // required: "sms" or "whatsapp"
  "externalId": "optional-unique-id"  // optional: for idempotency
}

Parameters

to
✅ Required. Recipient phone number in E.164 format (+1234567890)
message
✅ Required. Message text (max 1600 characters)
from
✅ Required. Sender phone number from your registered devices/WhatsApp instances. Must match exactly.
channel
✅ Required. Message channel: "sms" or "whatsapp"
externalId
Optional. Your unique ID for idempotency (prevents duplicate sends)

⚠️ Multi-Tenant Security: The from and channel fields are required for security in our multi-tenant system. You must specify exactly which device/WhatsApp instance to use. The system will verify that the specified device belongs to your account.

Response

{
  "success": true,
  "queued": true,
  "messageId": "6741234567890abcdef12345",
  "jobId": "job-6741234567890abcdef12345"
}

Example Requests (cURL)

Send SMS

curl -X POST https://api.infinireach.io/api/v1/messages \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "message": "Hello from Infini Reach!",
    "from": "+15559876543",
    "channel": "sms"
  }'

Send WhatsApp

curl -X POST https://api.infinireach.io/api/v1/messages \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "message": "Hello via WhatsApp!",
    "from": "+15559876543",
    "channel": "whatsapp"
  }'

Webhooks

Receive real-time notifications about message events, device status changes, and more.

Configure Webhook URL

Set your webhook URL in the dashboard under Settings → Webhooks. Infini Reach will send POST requests to your URL for configured events.

Webhook Events

message.inbound

Triggered when an inbound message is received

message.delivered

Triggered when a message is successfully delivered

message.failed

Triggered when a message fails to send

ℹ️ Note: Message delivery status is available via webhooks. Configure webhook events to receive real-time status updates for your sent messages.

Webhook Payload Example

{
  "event": "message.inbound",
  "timestamp": "2024-10-25T10:30:00Z",
  "data": {
    "messageId": "6741234567890abcdef12345",
    "direction": "inbound",
    "from": "+1234567890",
    "to": "+0987654321",
    "body": "Hello! I need support",
    "deviceId": "device-123",
    "timestamp": "2024-10-25T10:30:00Z",
    "status": "delivered"
  }
}

🔒 Webhook Security: All webhook requests include a signature headerX-Infini-Reach-Signature that you can verify.

HTTP Status Codes

200

OK

Request succeeded

201

Created

Resource successfully created

400

Bad Request

Invalid request parameters

401

Unauthorized

Invalid or missing API key

404

Not Found

Resource not found

429

Too Many Requests

Rate limit exceeded

500

Internal Server Error

Something went wrong on our end

Rate Limits

The API has the following rate limits per API key:

Message Sending100 requests/minute

ℹ️ Note: Rate limits may vary based on your subscription plan. Contact us if you need higher limits.