Developer Docs · v1

Build WhatsApp in minutes, not months.

A public REST API with a single x-api-key header. Send messages, register webhooks, dispatch templates, and receive live delivery events - with zero Meta OAuth on your side.

Single-header auth AI-agent ready Meta Cloud API v25.0
first-message.sh
$ curl -X POST https://api.aionechat.com/api/v1/public/v1/messages \
  -H "x-api-key: aoc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"919876543210","type":"text","text":"Hello!"}'
Response · 200 OK
{ "success": true,
  "data": {
    "wamid": "wamid.HBg...",
    "wallet_balance": 99.42
  }
}
< 500ms
p95 send latency
99.98%
API uptime
v25.0
Meta Cloud API
AES-256
at-rest encryption
1 / 7

Quick Start

Three steps to your first message from an external project. This page uses the platform's public API - auth is by x-api-key header, no OAuth on your side.

Copy a key from the API Keys page first. Every request needs it and it's only shown once at creation.

1Send your first message

Text messages only reach a customer inside the 24-hour service window (they must have messaged you within the last 24 h). For fresh sends, use an approved template - see step 3.

curl -X POST https://api.aionechat.com/api/v1/public/v1/messages \
  -H "x-api-key: aoc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "YOUR_CONNECTION_ID",
    "to": "919876543210",
    "type": "text",
    "text": "Hello from AiOneChat API!"
  }'

2Fetch your connection ID

Every send needs the connection_id of the WhatsApp number the message goes out on.

curl "https://api.aionechat.com/api/v1/public/v1/connections" -H "x-api-key: aoc_live_YOUR_KEY"

3Send an approved template

Templates work anytime, even outside the 24-hour window. Create and get approval on the Templates page first.

curl -X POST https://api.aionechat.com/api/v1/public/v1/messages \
  -H "x-api-key: aoc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "YOUR_CONNECTION_ID",
    "to": "919876543210",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": { "code": "en_US" },
      "components": [
        { "type": "body", "parameters": [
          { "type": "text", "text": "Rahul" },
          { "type": "text", "text": "#ORD-1234" }
        ]}
      ]
    }
  }'

Response shape

Every 2xx response has this envelope. Errors return non-2xx with a message field.

json
{
  "success": true,
  "data": {
    "wamid": "wamid.HBg...",
    "message_id": "64abc...",
    "cost": { "amount": 0.58, "currency": "INR", "category": "service" },
    "wallet_balance": 99.42
  }
}

What to do next

  • Check the API Reference tab for every endpoint + scope
  • Set up a webhook to receive incoming messages
  • Watch your key's Analytics page to see calls, latency, errors in real time