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}}
.
Path Parameters
Parameter | Required/Optional | Description |
---|---|---|
host | Required | Environment URL, for example, https://bots.kore.ai |
BotID | Required |
Bot ID or Stream ID. You can access it from the General Settings page of the bot. Note: This is required only for Bot Builder API scope of Proactive Messages. |
requestId | Required | The unique ‘Request ID’ returned by the Proactive Notifications API to track the progress. |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response Content Type
application/json
Sample Request
curl -- GET \ 'https://{{host}}/api/public/bot/{{BotID}}/notify/status/{{requestId}}' \ --header 'auth: {{JWT}}' \ --header 'Content-Type: application/json'
Sample Response
{ "_id": "ds-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "status": "PARTIAL_SUCCESS", // can be “SUCCESS” / “FAILURE” / “PARTIAL_SUCCESS” "percentageComplete": 100, "streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx", "createdBy": "u-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "jobType": "PROACTIVE_NOTIFICATIONS_API", "action": "PROACTIVE_NOTIFICATIONS", "statusLogs": [ { "_id": "nl-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "requestId": "ds-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "originalId": "john@abc.com", "status": "FAILURE", "createdBy": "u-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "comments": "'Identity is not associated with the channel'", "streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx", "channel": "msteams", "createdOn": "2022-01-24T20:55:21.918Z", "__v": 0 }, { "_id": "nl-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "requestId": "ds-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”, "createdBy": "u-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "channel": "msteams", "comments": "Notification has been sent successfully", "streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx", "koreId": "u-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "channelId": "29:1964-sxxxxxxxxxxxx-1MxxxxxxxxxxxxxxLqSODuQ", "messagestoreId": "ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", "originalId": "john@abc.com", "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 }