Omni Link

Trigger event

POST
/v1/events/trigger
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.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT access token returned by Signing In (POST /auth/v1/tokens/).

In: header

Request Body

application/json

name*string

The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page.

payload?

The 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.

to*array<||>
transactionId?string

A unique identifier for this transaction, we will generated a UUID if not provided.

actor?|

It 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

Response Body

application/json

curl -X POST "https://example.com/v1/events/trigger" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "to": [      {}    ]  }'
{  "data": {    "acknowledged": true,    "status": "processed",    "error": [      "string"    ],    "transactionId": "string"  }}