Appearance
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-routingPOST /v1/send/{event}/{channel}— force channel (email,sms,slack,push,telegram,whatsapp,discord)GET /v1/notifications/{id}— get notification status and messagesPOST /v1/cancel/{event}— cancel pending notifications for a contact
Request body
| Field | Type | Required | Description |
|---|---|---|---|
to | string | object | array | Yes | Recipient(s). See Contacts. |
payload | object | No | Template variables (available as {{key}}). |
language | string | No | Language code (en, sv, de). |
overrides | object | No | Channel overrides and brand overrides. See Email, SMS. |
from | string | object | No | Custom 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
}
]
}| Field | Type | Description |
|---|---|---|
id | string | Notification identifier |
event | string | Event name |
contact | object | Contact summary (email, name) |
status | string | running, waiting, completed, failed, stopped |
started_at | string | ISO 8601 timestamp |
completed_at | string | null | Set when all messages are resolved |
messages | array | One entry per channel attempt |
Message fields:
| Field | Type | Description |
|---|---|---|
id | string | Message identifier |
channel | string | email, sms, slack, push, telegram, whatsapp, discord |
status | string | queued, sent, delivered, failed |
sent_at | string | null | When handed to provider |
delivered_at | string | null | When provider confirmed |
error | string | null | Error 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
| Field | Type | Required | Description |
|---|---|---|---|
to | string | object | Yes | Contact to cancel for. See Contacts. |
json
{
"to": "user@example.com"
}Response (200)
json
{
"success": true,
"cancelled": 1
}| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request succeeded |
cancelled | integer | Number of notifications stopped |
Examples & SDKs
For copy-paste recipes and language-specific usage:
- Examples — Common patterns (welcome, password reset, 2FA, invoices, Slack alerts)
- Node.js SDK | Python SDK | PHP SDK
Errors
Errors return a non-2xx status and a JSON body with an error field.
See Errors for status codes and examples.
See also
- Events — how events map to templates
- Routing — how auto-routing selects a channel
- Contacts — supported
toformats and metadata - Templates — variables and helpers
- Messages & Statuses — tracking status and failures