Create a new sender configuration with phone numbers and routing policy.
Request
Display name for the sender (e.g., “Transactional”, “Marketing”)
How to route messages: auto, prefer_sms, prefer_whatsapp, prefer_telegram
Channel configurations
SMS configuration
Phone number in E.164 format
channels.sms.messagingServiceSid
Twilio Messaging Service SID (optional)
WhatsApp configuration
channels.whatsapp.phoneNumber
WhatsApp Business phone number
channels.whatsapp.businessId
WhatsApp Business Account ID (optional)
Make this the default sender for the project
Response
{
"id": "snd_abc123",
"name": "Transactional",
"routingPolicy": "prefer_sms",
"channels": {
"sms": {
"phoneNumber": "+15551234567"
}
},
"isDefault": true,
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
Example
curl -X POST https://api.zavu.dev/v1/senders \
-H "Authorization: Bearer zv_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Transactional",
"routingPolicy": "prefer_sms",
"channels": {
"sms": {
"phoneNumber": "+15551234567"
},
"whatsapp": {
"phoneNumber": "+15551234567"
}
},
"setAsDefault": true
}'
Routing Policies
| Policy | Behavior |
|---|
auto | Zavu selects the best channel based on cost, deliverability, and contact preferences |
prefer_sms | Use SMS when available, fall back to other channels |
prefer_whatsapp | Use WhatsApp when available, fall back to other channels |
prefer_telegram | Use Telegram when available, fall back to other channels |