Quickstart

Send your first WhatsApp message through ChatYug in four steps.

Prerequisites

  • Active ChatYug account with a connected WABA
  • Approved API key — see API Keys
  • Your WhatsApp phoneNumberId (from GET /me or the portal)
  • Recipient mobile number with country code (e.g. 919876543210)

Step 1 — Health check (optional)

Unauthenticated connectivity test:

GET /api/external/test
{
  "success": true,
  "message": "External API is working!",
  "timestamp": "2026-07-13T07:00:00.000Z"
}

Step 2 — Validate your API key

GET /api/external/me
{
  "success": true,
  "userId": 42,
  "wabaId": "100000000000002",
  "businessName": "Example Business Pvt Ltd",
  "phoneNumbers": [
    {
      "Phone_Number_Id": "100000000000001",
      "Phone_Number": "919876543210",
      "Display_Phone_Number": "+91 98765 43210"
    }
  ]
}

Step 3 — Send a text message

POST /api/external/send-message
curl -X POST https://chatyug.com/api/external/send-message \
  -H "Authorization: Bearer ck_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumberId": "100000000000001",
    "to": "919876543210",
    "type": "text",
    "text": "Hello from ChatYug!"
  }'
const axios = require('axios');

const res = await axios.post(
  'https://chatyug.com/api/external/send-message',
  {
    phoneNumberId: '100000000000001',
    to: '919876543210',
    type: 'text',
    text: 'Hello from ChatYug!'
  },
  { headers: { Authorization: 'Bearer ck_your_api_key_here' } }
);
console.log(res.data);
import requests

r = requests.post(
    'https://chatyug.com/api/external/send-message',
    json={
        'phoneNumberId': '100000000000001',
        'to': '919876543210',
        'type': 'text',
        'text': 'Hello from ChatYug!'
    },
    headers={'Authorization': 'Bearer ck_your_api_key_here'}
)
print(r.json())
$client = new GuzzleHttp\Client();
$response = $client->post('https://chatyug.com/api/external/send-message', [
    'headers' => ['Authorization' => 'Bearer ck_your_api_key_here'],
    'json' => [
        'phoneNumberId' => '100000000000001',
        'to' => '919876543210',
        'type' => 'text',
        'text' => 'Hello from ChatYug!'
    ]
]);
echo $response->getBody();

Success response:

{
  "success": true,
  "message": "Message sent successfully",
  "requestId": "req_1720856400000_abc123def",
  "data": {
    "messageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQjAwMDAwMDAwMDAwMDAwAA==",
    "conversationId": 1001,
    "status": "sent",
    "to": "919876543210",
    "type": "text",
    "timestamp": "2026-07-13T07:00:00.000Z"
  }
}

Step 4 — Check delivery status

Use the messageId from the send response:

GET /api/external/delivery-status/:messageId

See Delivery Status for the full response shape.

Next — Receive inbound events

Configure an HTTPS webhook URL in the ChatYug portal to receive customer replies and delivery receipts. See Webhooks Overview.

Session vs template: Text messages require an open 24-hour customer service window. Meta — Send messages