Text Messages
Send WhatsApp text messages: plain text up to 4,096 characters with optional URL previews. The simplest way to start conversations.
Text messages are the simplest WhatsApp message type. They support basic formatting and links.
Send a Text Message
const result = await zavu.messages.send({
to: "+14155551234",
text: "Hello from Zavu!",
channel: "whatsapp",
});
Text Formatting
WhatsApp supports basic formatting in text messages:
| Format | Syntax | Example |
|---|---|---|
| Bold | *text* | Hello |
| Italic | _text_ | Hello |
| Strikethrough | ~text~ | |
| Monospace | `text` | Hello |
Example with Formatting
JSON{ "to": "+14155551234", "text": "Your order *#12345* is _confirmed_.\n\nTotal: `$99.99`", "channel": "whatsapp" }
Specifications
| Property | Requirement |
|---|---|
| Max length | 4096 characters |
| Links | Auto-detected and clickable |
| Emoji | Fully supported |
| Line breaks | Use \n |
Use Cases
- Order confirmations
- Appointment reminders
- Account notifications
- Two-factor authentication codes
- General customer communication