Skip to content

Routing

Routing determines which channel (Email, SMS, or Slack) 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

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 Deliveries).

Force a channel

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

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

Supported channels: email, sms, slack

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

  • Events — configure which channels an event supports
  • Contacts — identifiers and to formats
  • Deliveries — track what happened after send

Released under the MIT License.