---
title: "Notify a single user"
method: POST
path: "/{WSID}/{version}/event"
tags: ["Fire an Event"]
---

# Notify a single user

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

This API enables you to fire a notification event, which sends out notifications to your users.

Before firing your first notification event, you must perform the following actions in your Fyno account:
- Create a Template
- Create a Notification 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

- 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.
    - `event` string, required — Enter the name of the event you wish to fire.
    - `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.
    - `event` string, required — Enter the name of the event you wish to fire.
  - 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.
    - `event` string, required — Enter the name of the event you wish to fire.
    - `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

## Response `202`

Request accepted successfully and it will be processed asynchronously.

- object
  - `event` string, required
  - `received_time` string, date, required
  - `request_id` string, required
  - `response` InlineResponse202Response, required
    - `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
    - `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)
