WatsiWatsi Docs

Send your first message in 5 minutes

This guide walks you through creating an API key, listing your conversations, and sending a WhatsApp message via the Watsi API.

Prerequisites
  • A Watsi account with a connected WhatsApp Business number
  • An existing conversation (send a message to your WhatsApp Business number to create one)
Step 1

Create an API key

Open Settings → API Keys in the Watsi dashboard and click Generate new key. Copy the key immediately — it is shown only once.

Step 2

List your conversations

Verify your key works by fetching conversations. Replace YOUR_API_KEY with the key from Step 1.

curl https://api.watsi.ai/api/v1/conversations \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "chats": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "customer": {
        "name": "Maria Garcia",
        "phone": "+5491155551234"
      },
      "last_message_at": "2025-03-15T10:30:00.000Z",
      "status": "open"
    }
  ],
  "hasMore": false
}
Step 3

Send a message

Pick a conversation ID from the previous response and send a text message. Messages can only be sent within the 24-hour WhatsApp messaging window (since the customer's last inbound message).

curl -X POST https://api.watsi.ai/api/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "conversation_id": "550e8400-e29b-41d4-a716-446655440000",
    "body": "Hello from the Watsi API!"
  }'

Response

{
  "message": {
    "id": "msg_01HXYZ987654321",
    "conversation_id": "550e8400-e29b-41d4-a716-446655440000",
    "body": "Hello from the Watsi API!",
    "direction": "outbound",
    "status": "sent",
    "created_at": "2025-03-15T10:35:00.000Z"
  }
}
Step 4

Check message status

The message status field will update as WhatsApp processes delivery. You can also receive real-time status updates via webhooks.

Next steps