Fire an Event

Notify a single user

Changed on

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.
post/{WSID}/{version}/event

Request

  • Base URL
    https://api.fyno.io/v1
  • URL
    https://api.fyno.io/v1/{WSID}/{version}/event
  • Auth
    HTTP bearer

Path parameters

WSIDstring required

Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.

version'live' | 'test' required

Enter the version for which you wish to fire the notification.

Headers

Idempotency-Keystring

A unique key that makes this request idempotent, for example a UUID such as XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. If Fyno receives another request with the same key, it returns the stored response from the first request without firing the notification again, including the original status code and any error. Use this to safely retry a request after a network failure without sending duplicate notifications. The key is scoped to this endpoint.

x-idempotency-expirationstring

How long the idempotency key stays valid, as a Unix epoch timestamp in seconds (for example 1789012345) or an ISO 8601 date string (for example 2026-09-16T12:40:20.997+05:30). Applies only when Idempotency-Key is sent. If omitted, the key is retained for 24 hours. The maximum is 1 year.

Request body

OR
OR

Example request

{
  "callback": {
    "custom_id": "ID001",
    "custom1": "EV001",
    "custom2": "P001",
    "custom3": "C001",
    "enable": true
  },
  "data": {
    "placeholder_key_1": "placeholder_value_1",
    "placeholder_key_2": "placeholder_value_2"
  },
  "event": "event_name",
  "to": {
    "discord": "101XXXXXXXXXX7XXXXX",
    "email": "abcde@fghi.com",
    "inapp": "12345",
    "push": "ExponentPushToken[XXXXX]",
    "slack": "CXXXXXXXXXX",
    "sms": "+419XXXXXX",
    "teams": "General",
    "voice": "+19XXXXXXXX",
    "whatsapp": "+419879XXXXXX"
  }
}

Response

Request accepted successfully and it will be processed asynchronously.

eventstring required
received_timestring date required
request_idstring required

Example response

{
  "event": "event_name",
  "received_time": "2025-02-17T07:49:13.352Z",
  "request_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "response": {
    "discord": {
      "destination": "101XXXXXXXXXX7XXXXX",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "email": {
      "destination": "abcde@fghi.com",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "inapp": {
      "destination": "12345",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "push": {
      "destination": "ExponentPushToken[XXXXX]",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "slack": {
      "destination": "CXXXXXXXXXX",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "sms": {
      "destination": "+49XXXXXXXXX",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "teams": {
      "destination": "General",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "voice": {
      "destination": "+49XXXXXXXXX",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    },
    "whatsapp": {
      "destination": "+49XXXXXXXXX",
      "msg_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXX",
      "status": "ok"
    }
  }
}

Changes

    • breaking

      removed subschema #1 subschema #2 subschema #3 from the request body oneOf list

    • breaking

      the path request parameter version was restricted to a list of enum values

    • info

      added the new optional header request parameter Idempotency-Key

    • info

      added the new optional header request parameter x-idempotency-expiration

    • info

      added subschema #1: Option 1: to only subschema #2: Option 2: distinct_id only subschema #3: Option 3: distinct_id and to to the request body oneOf list

    • info

      added the new enum value live to the path request parameter version

    • info

      added the new enum value test to the path request parameter version

    • breaking

      removed subschema #1 subschema #3 from the request body oneOf list

    • breaking

      removed the enum value live from the path request parameter version

    • breaking

      removed the enum value test from the path request parameter version

    • info

      added subschema #1 subschema #3 to the request body oneOf list