Trigger event
Trigger event is the main (and only) way to send notifications to subscribers. The trigger identifier is used to match the particular workflow associated with it. Additional information can be passed according the body interface below. To prevent duplicate triggers, you can optionally pass a transactionId in the request body. If the same transactionId is used again, the trigger will be ignored. The retention period depends on your billing tier.
Authorization
Authorization<token>API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
In: header
Request Body
application/jsonRequirednameRequiredstringThe trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page.
payloadobjectThe payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. This data will also be available when fetching the notifications feed from the API to display certain parts of the UI.
overridesobjectThis could be used to override provider specific configurations
toRequiredarray<object | object | string> | string | object | objectThe recipients list of people who will receive the notification.
transactionIdstringA unique identifier for deduplication. If the same transactionId is sent again, the trigger is ignored. Useful to prevent duplicate notifications. The retention period depends on your billing tier.
actorstring | objectIt is used to display the Avatar of the provided actor's subscriber id or actor object. If a new actor object is provided, we will create a new subscriber in our system
tenantstring | objectIt is used to specify a tenant context during trigger event. Existing tenants will be updated with the provided details.
contextobjectHeader Parameters
idempotency-keystringA header for idempotency purposes
Response Body
Created
acknowledgedRequiredbooleanIndicates whether the trigger was acknowledged or not
statusRequiredstringStatus of the trigger
"error" | "trigger_not_active" | "no_workflow_active_steps_defined" | "no_workflow_steps_defined" | "processed" | "no_tenant_found" | "invalid_recipients"errorarray<string>In case of an error, this field will contain the error message(s)
transactionIdstringThe returned transaction ID of the trigger