To fetch the status of Proactive Notifications API.
To use this API, the app needs the Bot Builder API scope of Proactive Messages OR the Admin API Scope of Proactive Messages.
POST https://{{host}}/api/public/bot/{{BotID}}/notify/status/{{requestId}}
.
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Sample Request
curl --
GET \ 'https://{{host}}/api/public/bot/{{BotID}}/notify/status/{{requestId}}' \
--header 'auth: {{JWT}}' \
--header 'Content-Type: application/json'
Sample Response
{
"_id": "{{requestId}}",
"status": "PARTIAL_SUCCESS", // can be “SUCCESS” / “FAILURE” / “PARTIAL_SUCCESS”
"percentageComplete": 100,
"streamId": "{{botId}}",
"createdBy": "{{userId}}",
"jobType": "PROACTIVE_NOTIFICATIONS_API",
"action": "PROACTIVE_NOTIFICATIONS",
"statusLogs": [
{
"_id": "nl-7e443a4e-e9ef-51f3-899e-80a0597d4fab",
"requestId": "{{requestId}}",
"originalId": "{{identity1}}",
"status": "FAILURE",
"createdBy": "{{userId}}",
"comments": "'Identity is not associated with the channel'",
"streamId": "{{botId}}",
"channel": "msteams",
"createdOn": "2022-01-24T20:55:21.918Z",
"__v": 0
},
{
"_id": "nl-e3c3a60d-6f21-594d-895d-ee9dc5a180e8",
"requestId": "{{requestId}}”,
"createdBy": "{{userId}}",
"channel": "msteams",
"comments": "Notification has been sent successfully",
"streamId": "{{botId}}",
"koreId": "{{kore_userId}}",
"channelId": "{{channelId}}",
"messagestoreId": "{{messageId}}",
"originalId": "{{identity2}}",
"status": "SUCCESS",
"createdOn": "2022-01-24T20:55:23.029Z",
"__v": 0
}
],
"lMod": "2022-01-24T20:55:23.000Z",
"createdOn": "2022-01-24T20:55:21.254Z",
"requestedTime": "2022-01-24T20:55:21.254Z",
"__v": 0,
"count": 2
}