Skip to main content

Prerequisites


Step 1: Create an instance

An instance represents a WhatsApp number. You must create one before placing any calls.
curl -X POST https://cawme.com/api/v1/instances \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-first-instance"}'
{
  "id": "inst_abc123",
  "name": "my-first-instance",
  "status": "CREATED",
  "created_at": "2026-03-01T10:00:00Z"
}

Step 2: Pair your WhatsApp number

Fetch the QR code and scan it with WhatsApp on your phone to link the number:
curl https://cawme.com/api/v1/instances/inst_abc123/configure \
  -H "Authorization: Bearer <your-token>"
{
  "instanceId": "inst_abc123",
  "qrCodeBase64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
Decode qrCodeBase64 into an image and scan it. Once scanned, your instance status will move to CONFIGURED and eventually ACTIVE.

Step 3: Make a call

Place a Text-to-Speech (TTS) call:
curl -X POST https://cawme.com/api/v1/calls \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "instanceId": "inst_abc123",
    "type": "FIXED_TTS",
    "target": { "phoneNumber": "+14155550123" },
    "tts": {
      "text": "Hello, this is a call from ACME Corp.",
      "voiceId": "en-US-001"
    }
  }'
{
  "id": "call_xyz789",
  "type": "FIXED_TTS",
  "status": "QUEUED"
}

Step 4: Check call status

curl https://cawme.com/api/v1/calls/call_xyz789 \
  -H "Authorization: Bearer <your-token>"
The status field progresses: QUEUED → RINGING → IN_PROGRESS → COMPLETED.

Next steps