Skip to content

Notifications API

Send a notification by calling an event. Sendivent selects a channel automatically (Routing), or you can force one.

Endpoints

  • POST /v1/send/{event} — auto-routing
  • POST /v1/send/{event}/{channel} — force channel (email, sms, slack, push, telegram, whatsapp, discord)
  • GET /v1/notifications/{id} — get notification status and messages
  • POST /v1/cancel/{event} — cancel pending notifications for a contact

Request body

FieldTypeRequiredDescription
tostring | object | arrayYesRecipient(s). See Contacts.
payloadobjectNoTemplate variables (available as {{key}}).
languagestringNoLanguage code (en, sv, de).
overridesobjectNoChannel overrides and brand overrides. See Email, SMS.
fromstring | objectNoCustom sender. Must be verified.

If Sendivent can't route (missing identifier, missing template, or unverified sender), the request fails. See Routing, Email, and Errors.

Responses

Success (200)

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "event": "welcome",
  "status": "accepted"
}

The id is the notification identifier. Use it with GET /v1/notifications/{id} to track message status.

Multiple recipients

When to is an array, each recipient gets a separate notification with their own personalized content:

json
{
  "to": [
    { "email": "alice@example.com", "name": "Alice" },
    { "email": "bob@example.com", "name": "Bob" }
  ],
  "payload": { "company": "ACME" }
}

Each contact's data is merged with payload for template rendering — Alice sees "Hi Alice" and Bob sees "Hi Bob".


GET /v1/notifications/

Retrieve the status of a notification and its individual messages.

Response (200)

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "event": "welcome",
  "contact": {
    "email": "user@example.com",
    "name": "Alice"
  },
  "status": "completed",
  "started_at": "2026-04-01T12:00:00.000Z",
  "completed_at": "2026-04-01T12:00:05.000Z",
  "messages": [
    {
      "id": "a1b2c3d4-5678-9012-3456-789012345678",
      "channel": "email",
      "status": "delivered",
      "sent_at": "2026-04-01T12:00:01.000Z",
      "delivered_at": "2026-04-01T12:00:04.000Z",
      "error": null
    }
  ]
}
FieldTypeDescription
idstringNotification identifier
eventstringEvent name
contactobjectContact summary (email, name)
statusstringrunning, waiting, completed, failed, stopped
started_atstringISO 8601 timestamp
completed_atstring | nullSet when all messages are resolved
messagesarrayOne entry per channel attempt

Message fields:

FieldTypeDescription
idstringMessage identifier
channelstringemail, sms, slack, push, telegram, whatsapp, discord
statusstringqueued, sent, delivered, failed
sent_atstring | nullWhen handed to provider
delivered_atstring | nullWhen provider confirmed
errorstring | nullError message if failed

For single-channel events, messages contains one entry. For sequence events with multiple SEND steps, it contains one entry per step.


POST /v1/cancel/

Cancel pending notifications for a contact on a given event. Only cancels notifications that haven't completed yet — already-sent messages are not recalled.

Request body

FieldTypeRequiredDescription
tostring | objectYesContact to cancel for. See Contacts.
json
{
  "to": "user@example.com"
}

Response (200)

json
{
  "success": true,
  "cancelled": 1
}
FieldTypeDescription
successbooleanWhether the request succeeded
cancelledintegerNumber of notifications stopped

Examples & SDKs

For copy-paste recipes and language-specific usage:

Errors

Errors return a non-2xx status and a JSON body with an error field.

See Errors for status codes and examples.

See also

Released under the MIT License.