To send proactive notifications to the configured channel in bot.
To use this API, the app needs the Bot Builder API scope of Proactive Messages OR the Admin API Scope of Proactive Messages and respective channel should be configured and published with proactive notifications option enabled in the bot.
POST https://{{host}}/api/public/bot/{{BotID}}/notify
.
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Sample Request
curl --location --request
POST \' https://{{host}}/api/public/bot/{{BotID}}/notify' \
--header 'auth: {{JWT}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"channel": "msteams",
"userIdentityType": "resolve",
"message": {
"type": "text",
"val": "hello"
},
"identities": [
"john@kore.com",
"jane@outlook.com",
"sam@slack.com"
]
}'
Sample Response
{
"status": "IN_PROGRESS",
"percentageComplete": 0,
"streamId": "{{botId}}",
"createdBy": "{{userId}}",
"jobType": "PROACTIVE_NOTIFICATIONS_API",
"action": "PROACTIVE_NOTIFICATIONS",
"statusLogs": [],
"_id": "{{requestId}}",
"lMod": "2022-01-25T06:56:48.000Z",
"createdOn": "2022-01-25T06:56:48.891Z",
"requestedTime": "2022-01-25T06:56:48.891Z",
"__v": 0
}