Subscriptions

When massive messages are sent using HSM, notifications can be generated so that you can subscribe to that relevant information and your team can manage this data of each message using webhooks.

Webhook is a method for one system to notify another system or application about events or updates in real time. Firstly, you should verify if there are any subscriptions configured to be sure that it is already set in your bot or not in order not to duplicate subs. Afterward, you can subscribe to events you need.

Get Subscriptions

GET https://api.jelou.ai/v1/bots/:botId/events/webhook

This endpoint allows you to get information from previous subscriptions

Path Parameters

Headers

{
	"message": [
		"Webhooks retrieved successfully!"
	],
	"statusMessage": "success",
	"status": 1,
	"data": {
		"read": "https://webhook.site/379dd1bd-a753-499d-b9dd-23979020bcd9"
	}
}

Subscribe to Events

POST https://api.jelou.ai/v1/bots/:botId/events/webhook

This endpoint allows you to subscribe to your webhook

Path Parameters

Query Parameters

{
  "message": [
    "Webhooks created successfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": [
    {
      "url": "https://webhook.site/379dd1bd-a753-499d-b9dd-23979020bcd9",
      "events": [
        "delivered_user",
        "delivered_channel"
      ]
    },
    {
      "url": "https://webhook.site/441c4bc1-5d11-4314-b89b-37fb5b3d16f5",
      "events": [
        "failed",
        "reply"
      ]
    }
  ]
}

Last updated