post http://{{url}}/v1/notifications
Creates a trigger to send a notification to a customer or endpoint. To send an email or SMS to a customer, use swap values (eg {{PHONE}} or {{EMAIL}}) which are loaded from the customer (See Swap Values for templates for the full list).
Request body
field | required | type | description |
---|---|---|---|
type | + | string | Type of notification: webhook, email, sms |
destination | + | string | Where to send notification (secure https:// URL for webhook, email address for email ({{EMAIL}} of the current customer), phone number in international E.164 format ({{PHONE}} of the current customer)) |
template_id | +email, +sms | string | Custom template, which can be used with email, sms or webhook notifications |
event | + | string | Event to trigger a notification. Look at the Event table |
from | - | string | FROM email address parameter |
subject | - | string | Set subject of an email notification |
transaction_only | -webhook | bool | If true, the payload of an event will include information on the latest transaction only and a charge ID. The rest of the fields will be omitted. By default, it is set to false. |
notification_service_id | -webhook | string | Authentication service ID (secure https:// links only) |