Multi-Channel Messaging
Send WhatsApp messages and push notifications alongside email campaigns
Multi-Channel Messaging
In addition to email, MisarMail supports sending WhatsApp messages and push notifications to contacts. Multi-channel sends can be triggered via API or included as steps in automation workflows.
Auth scope: send
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /api/v1/channels/whatsapp/send | Send a WhatsApp message |
POST | /api/v1/channels/push/send | Send a push notification |
POST /api/v1/channels/whatsapp/send
Send a WhatsApp message to a contact using a pre-approved template or a free-form message (within the 24-hour session window).
curl -X POST https://mail.misar.io/api/v1/channels/whatsapp/send \
-H "Authorization: Bearer msk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919876543210",
"contact_id": "cct_abc123",
"template_name": "order_confirmation",
"parameters": [
{ "type": "text", "text": "ORD-98765" },
{ "type": "text", "text": "$49.99" }
]
}'Request Fields
| Field | Type | Required | Notes |
|---|---|---|---|
to | string | ✓ | E.164 phone number (e.g. +919876543210) |
contact_id | string | — | Link send to an existing contact record |
template_name | string | ✓ (or message) | WhatsApp Business approved template name |
parameters | array | — | Template variable substitutions |
message | string | ✓ (or template_name) | Free-form message — only valid within 24h session |
language | string | — | BCP-47 language code, e.g. en_US (default: en) |
WhatsApp Business Platform requires pre-approved message templates for outbound messages outside a 24-hour contact-initiated session. Contact support to connect your WhatsApp Business account.
Response
{
"success": true,
"message_id": "wamid.HBgLMTIz...",
"status": "sent",
"channel": "whatsapp"
}Errors
| Code | Reason |
|---|---|
400 | Invalid phone number format |
403 | WhatsApp channel not configured for this account |
422 | Template not found or parameters mismatch |
POST /api/v1/channels/push/send
Send a push notification to a contact's registered device(s).
curl -X POST https://mail.misar.io/api/v1/channels/push/send \
-H "Authorization: Bearer msk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact_id": "cct_abc123",
"title": "Your order has shipped!",
"message": "Order #ORD-98765 is on its way.",
"url": "https://yourapp.com/orders/98765",
"icon": "https://yourapp.com/icons/shipping.png"
}'Request Fields
| Field | Type | Required | Notes |
|---|---|---|---|
contact_id | string | ✓ | Contact must have a registered push token |
title | string | ✓ | Notification title |
message | string | ✓ | Notification body text |
url | string | — | Deep-link URL opened on tap |
icon | string | — | Notification icon URL |
data | object | — | Custom payload passed to the app |
Response
{
"success": true,
"delivered": 2,
"failed": 0,
"device_count":2,
"channel": "push"
}delivered and failed reflect the number of registered device tokens the notification was sent to.
Errors
| Code | Reason |
|---|---|
404 | Contact not found or has no push tokens registered |
403 | Push notifications not enabled for this account |
Registering Push Tokens
Push tokens must be registered by your client application using the contacts API before push notifications can be delivered:
curl -X PATCH https://mail.misar.io/api/v1/contacts/cct_abc123 \
-H "Authorization: Bearer msk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"push_tokens": [
{ "platform": "fcm", "token": "fXDtJ9kS..." },
{ "platform": "apns", "token": "a8B2cD3e..." }
]
}'Supported platforms: fcm (Android / web), apns (iOS / macOS).