Skip to content

Routing ​

Routing determines which channel (Email, SMS, Slack, Push, Telegram, WhatsApp, or Discord) delivers an event. Sendivent can auto-select based on contact data, or you can force a specific channel.

Auto-routing ​

If you don't specify a channel, Sendivent selects the first eligible channel based on:

  1. The event's channel priority order (set in dashboard)
  2. Whether the contact has a valid identifier for that channel
bash
curl -X POST "https://api.sendivent.com/v1/send/welcome" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "to": "user@example.com" }'

Eligibility rules ​

ChannelRequired identifier
EmailEmail address
SMSPhone number (E.164)
SlackSlack user ID
PushPush token (Expo, FCM, or APNs)
TelegramChat ID or @username
WhatsAppPhone number (E.164)
DiscordDiscord user ID (Snowflake)

If the contact has multiple identifiers, Sendivent uses the event's channel order to pick the first eligible one.

If no channel is eligible, the send fails (see Messages & Statuses).

Force a channel ​

Override auto-routing by adding the channel to the URL:

POST /v1/send/{event}/{channel}

Supported channels: email, sms, slack, push, telegram, whatsapp, discord

Forced channels still require the matching identifier (e.g. SMS requires a phone number).

bash
curl -X POST "https://api.sendivent.com/v1/send/verification/sms" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "to": "+1234567890" }'

When to force a channel ​

Use caseRecommendation
General notificationsAuto-routing
Verification codesForce SMS — see OTP Auto-Fill
Documents / receiptsForce Email
Internal alertsForce Slack

No automatic fallback ​

Sendivent sends to one channel per request. If delivery fails, it does not automatically retry via another channel. To implement fallback logic, catch failures in your application and re-send to an alternate channel if needed.

Common pitfalls ​

  • No template for forced channel — the event must have a template for that channel
  • Missing identifier — can't send SMS without a phone number
  • Wrong phone format — SMS requires E.164 format (e.g. +1234567890)

See also ​

Released under the MIT License.