---
title: "Notify multiple users"
method: POST
path: "/{WSID}/{version}/event/bulk"
tags: ["Fire an Event"]
---

# Notify multiple users

`POST /{WSID}/{version}/event/bulk`

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.

## Path parameters

- `WSID` string, required
- `version` 'live' | 'test', required

## Request body

- EventBulkBody
  - `batch` union[], required — Your batch payload must specify at least *`distinct_id`* or *`to`* while firing a notification event. If the payload contains: - **Option 1:** ONLY *`to`* (and no *`distinct_id`*) - the event uses all destination values from the *`to`* object (as it is). - **Option 2:** ONLY *`distinct_id`* (and no *`to`*) - the event uses all destination values (such as SMS, WhatsApp, Email, Push, Voice and so on) from the user's profile and sends the notification. - **Option 3:** BOTH *`distinct_id`* and *`to`* - the `to` and `distinct_id` channel data merges (`to` object take precedences) and sends the notification. The sent notification is tagged to the ID specified, which can be then used to search the logs by using `distinct_id`.
    - union
      - object
        - `callback` Callback — (Optional) You can enable callback for an event by specifying the `callback` attribute in the payload of the event. By enabling callback, you will be able to receive delivery status of the events onto your webhook URL specified in the "Allowlist URL" section of the application. See [Configuring Allowlist URL/SQS to receive Delivery Report](../../configuring-allowlist-url-sqs-to-receive-delivery-report) for more details.
          - `custom_id` string, required — Use this parameter to send an ID that you would want to receive as a response (for reconciliation) in your delivery callback.
          - `custom1` string — (Optional) Use this parameter to send another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `custom2` string — (Optional) Use this parameter to send yet another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `custom3` string — (Optional) Use this parameter to send yet another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `enable` true | false — (Optional) Set `true` to enable delivery callback or `false` to disable delivery callback. The default value is `true` if `custom_id` is specified.
          - `allowlist_url` union — (Optional) Allowlist URL name where you want to receive delivery reports. Can be array of Allowlist URL names too if you want the delivery reports in multiple URLs. If `allowlist_url` is not specified, but callback object has `enable=true` and `custom_id` is specified, then the delivery reports will be sent to the default endpoint set to receive delivery reports in the [Configuring Allowlist URL](../../configuring-allowlist-url-sqs-to-receive-delivery-report) settings.
            - string
            - string[]
        - `data` Data — (Optional) Enter the keys and values of your replaceabale placeholders. These values are replaced in the respective keys of the template when the notification is sent.
        - `to` To, required
          - `discord` string — Enter the discord ID of the user.
          - `email` string — Enter the email address of the user.
          - `inapp` string — Enter the distinct ID or the generated token of the user.
          - `push` string — If you use multiple Push providers, add the following prefix for the respective provider tokens: For Expo: `expo_token:`<your_pushtoken> For FCM: `fcm_token:`<your_pushtoken> For OneSignal playerId: `onesignal_player_id:`<enter_playerid> For OneSignal externalId: `onesignal_external_id:`<enter_externalid> For Mi Push: `mi_token:`<your_pushtoken> If you use just one provider, then the prefix is not required. However, if you wish to use OneSignal with playerId token, then the prefix is required.
          - `slack` string — Enter the channel ID, user ID, or email address of the user.
          - `sms` string — Enter the mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX.
          - `teams` string — Enter the channel name. For teams, we currently support sending to one channel only. To send to multiple channels, do get in touch and we can share a workaround.
          - `voice` string — Enter the mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX.
          - `whatsapp` string — Enter the WhatsApp mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX
      - object
        - `callback` Callback — (Optional) You can enable callback for an event by specifying the `callback` attribute in the payload of the event. By enabling callback, you will be able to receive delivery status of the events onto your webhook URL specified in the "Allowlist URL" section of the application. See [Configuring Allowlist URL/SQS to receive Delivery Report](../../configuring-allowlist-url-sqs-to-receive-delivery-report) for more details.
          - `custom_id` string, required — Use this parameter to send an ID that you would want to receive as a response (for reconciliation) in your delivery callback.
          - `custom1` string — (Optional) Use this parameter to send another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `custom2` string — (Optional) Use this parameter to send yet another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `custom3` string — (Optional) Use this parameter to send yet another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `enable` true | false — (Optional) Set `true` to enable delivery callback or `false` to disable delivery callback. The default value is `true` if `custom_id` is specified.
          - `allowlist_url` union — (Optional) Allowlist URL name where you want to receive delivery reports. Can be array of Allowlist URL names too if you want the delivery reports in multiple URLs. If `allowlist_url` is not specified, but callback object has `enable=true` and `custom_id` is specified, then the delivery reports will be sent to the default endpoint set to receive delivery reports in the [Configuring Allowlist URL](../../configuring-allowlist-url-sqs-to-receive-delivery-report) settings.
            - string
            - string[]
        - `data` Data — (Optional) Enter the keys and values of your replaceabale placeholders. These values are replaced in the respective keys of the template when the notification is sent.
        - `distinct_id` string, required — Enter the distinct ID that you use to identify the recipient.
      - object
        - `callback` Callback — (Optional) You can enable callback for an event by specifying the `callback` attribute in the payload of the event. By enabling callback, you will be able to receive delivery status of the events onto your webhook URL specified in the "Allowlist URL" section of the application. See [Configuring Allowlist URL/SQS to receive Delivery Report](../../configuring-allowlist-url-sqs-to-receive-delivery-report) for more details.
          - `custom_id` string, required — Use this parameter to send an ID that you would want to receive as a response (for reconciliation) in your delivery callback.
          - `custom1` string — (Optional) Use this parameter to send another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `custom2` string — (Optional) Use this parameter to send yet another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `custom3` string — (Optional) Use this parameter to send yet another ID that you want to receive as a response (for reconciliation) in your delivery callback.
          - `enable` true | false — (Optional) Set `true` to enable delivery callback or `false` to disable delivery callback. The default value is `true` if `custom_id` is specified.
          - `allowlist_url` union — (Optional) Allowlist URL name where you want to receive delivery reports. Can be array of Allowlist URL names too if you want the delivery reports in multiple URLs. If `allowlist_url` is not specified, but callback object has `enable=true` and `custom_id` is specified, then the delivery reports will be sent to the default endpoint set to receive delivery reports in the [Configuring Allowlist URL](../../configuring-allowlist-url-sqs-to-receive-delivery-report) settings.
            - string
            - string[]
        - `data` Data — (Optional) Enter the keys and values of your replaceabale placeholders. These values are replaced in the respective keys of the template when the notification is sent.
        - `distinct_id` string, required — Enter the distinct ID that you use to identify the recipient.
        - `to` To, required
          - `discord` string — Enter the discord ID of the user.
          - `email` string — Enter the email address of the user.
          - `inapp` string — Enter the distinct ID or the generated token of the user.
          - `push` string — If you use multiple Push providers, add the following prefix for the respective provider tokens: For Expo: `expo_token:`<your_pushtoken> For FCM: `fcm_token:`<your_pushtoken> For OneSignal playerId: `onesignal_player_id:`<enter_playerid> For OneSignal externalId: `onesignal_external_id:`<enter_externalid> For Mi Push: `mi_token:`<your_pushtoken> If you use just one provider, then the prefix is not required. However, if you wish to use OneSignal with playerId token, then the prefix is required.
          - `slack` string — Enter the channel ID, user ID, or email address of the user.
          - `sms` string — Enter the mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX.
          - `teams` string — Enter the channel name. For teams, we currently support sending to one channel only. To send to multiple channels, do get in touch and we can share a workaround.
          - `voice` string — Enter the mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX.
          - `whatsapp` string — Enter the WhatsApp mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX
  - `event` string, required — Enter the name of the event you wish to fire.

## Response `202`

Request accepted successfully and it will be processed asynchronously.

- object
  - `event` string
  - `received_time` number
  - `request_id` string
  - `response` InlineResponse2021Response[]
    - `discord` InlineResponse202ResponseDiscord
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `email` InlineResponse202ResponseEmail
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `inapp` InlineResponse202ResponseInapp
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `push` InlineResponse202ResponsePush
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `seq` integer
    - `slack` InlineResponse202ResponseSlack
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `sms` InlineResponse202ResponseSms
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `teams` InlineResponse202ResponseTeams
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `voice` InlineResponse202ResponseSms
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required
    - `whatsapp` InlineResponse202ResponseSms
      - `destination` string, required
      - `msg_id` string, required
      - `status` string, required

## Other responses

- `400` — Event name does not exist
- `401` — API Key or Workspace ID is invalid. User is unauthorised.

---

[API](https://skmtc.net/fynoio/apis/fyno-rest-api.md) · [All operations](https://skmtc.net/fynoio/apis/fyno-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fynoio/fyno-rest-api/revisions/021088e9cb30/schema)
