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)
- 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.
- 2
List your conversations
Verify your key works by fetching conversations. Replace
YOUR_API_KEYwith the key from Step 1.curl https://api.watsi.ai/api/v1/conversations \ -H "Authorization: Bearer YOUR_API_KEY" - 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!" }' - 4
Check message status
The message
statusfield will update as WhatsApp processes delivery. You can also receive real-time status updates via webhooks.