Sending Messages
TimelinesAI provides multiple ways to send WhatsApp messages depending on your use case.Sending methods
| Method | Best for | Endpoint |
|---|---|---|
| By phone number | New contacts, phone from your CRM | POST /messages |
| By chat ID | Existing conversations | POST /chats/{chat_id}/messages |
| By chat name | When you know the contact name | POST /messages/to_chat_name |
| By JID | Groups, technical integrations | POST /messages/to_jid |
Send to phone number
The most common method. Works even if you haven’t messaged this number before.Phone number format
Use international format with country code:- ✅
+14155551234 - ✅
14155551234 - ❌
(415) 555-1234 - ❌
415-555-1234
Send to existing chat
When you have achat_id (from listing chats or webhook events):
Choosing a WhatsApp account
If you have multiple WhatsApp numbers connected, specify which one to send from:If you don’t specify
whatsapp_account_id, the most recently connected account is used.Message formatting
Line breaks
Use\n for line breaks:
Hello! Here’s your summary:
- Item 1
- Item 2
Emojis
Emojis are fully supported:Auto-apply labels
Automatically label chats when sending messages:Tracking delivery
Get message status
After sending, use themessage_uid to track delivery:
Status values
| Status | Meaning |
|---|---|
queued | Message is waiting to be sent |
sent | Message sent to WhatsApp servers |
delivered | Message delivered to recipient’s device |
read | Recipient opened the message |
failed | Message could not be sent |
Status history
Get the complete timeline:Rate limits
Messages are sent with a ~2 second delay between each to avoid WhatsApp spam detection. If you have high-volume needs, contact support to discuss Business plan options.Credits usage
| Message type | Credits |
|---|---|
| Text only | 1 |
| Text + attachment | 2 |
| Failed (refunded) | 0 |
Common errors
Invalid phone number
Invalid phone number
+14155551234)WhatsApp account not connected
WhatsApp account not connected
Insufficient quota
Insufficient quota

