Notify multiple users

This API enables you to notify multiple users with one event trigger. Before firing your first notification event, you must perform the following actions in your Fyno account: - Create a Template - Create an Event - Create an API Key - And obtain your workspace ID from the API Keys page.

Authentication

AuthorizationBearer
Enter your API Key. If you don't have it already, you can create one from the API Keys page within your Fyno account

Path parameters

WSIDstringRequired
Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.
versionstringRequired
Enter the version for which you wish to fire the notification.

Request

This endpoint expects an object.
batchlist of objectsRequired

Enter an array of recipients. Each item in the array must specify at least distinct_id or to. Choose one of the three options below for each item.

event is set once at the top level of the payload and applies to every item in the batch.

Option 1: to only

Required per item: to

The event uses all destination values from the to object, as they are.

{
"event": "event_name",
"batch": [
{
"to": {
"email": "abcde@fghi.com",
"sms": "+49XXXXXXXXX"
},
"data": {
"placeholder_key_1": "placeholder_value_1"
}
}
]
}

Option 2: distinct_id only

Required per item: distinct_id

The event uses all destination values (such as SMS, WhatsApp, Email, Push, and Voice) from the user’s profile and sends the notification.

{
"event": "event_name",
"batch": [
{
"distinct_id": "XXXXXXXX",
"data": {
"placeholder_key_1": "placeholder_value_1"
}
}
]
}

Option 3: both distinct_id and to

Required per item: distinct_id, to

The to and distinct_id channel data merges, with the to object taking precedence, and the notification is sent. The sent notification is tagged to the ID specified, which you can then use to search the logs by distinct_id.

{
"event": "event_name",
"batch": [
{
"distinct_id": "XXXXXXXX",
"to": {
"email": "abcde@fghi.com"
},
"data": {
"placeholder_key_1": "placeholder_value_1"
}
}
]
}

You can mix options across items in the same batch. data and callback are optional in all three.

eventstringRequired
Enter the name of the event you wish to fire.

Response

Request accepted successfully and it will be processed asynchronously.
eventstringOptional
received_timedoubleOptional
request_idstringOptional
responselist of objectsOptional

Errors

400
Bad Request Error
401
Unauthorized Error