Proactive Notifications allow enterprises to engage with their end users (customers or employees) by providing relevant and timely updates.
Proactive notification includes:
- Nudge the employees to reset their password before it expires in certain days
- Remind users to submit expense reports.
- Inform customers about their order status.
- Other reminders which are defined.
Method | POST |
Endpoint | https://{{host}}/api/public/bot/{{BotID}}/notify
|
Content Type | application/json |
Authorization | auth: {{JWT}}
|
API Scope |
|
Path Parameters
Parameter | Description | Mandate |
---|---|---|
host | The environment URL. For example, https://bots.kore.ai |
Required |
BotId | Bot ID or Stream ID can be accessed under General Settings on the Bot Builder.
Note: This is required only for Bot Builder API scope of Proactive Messages. |
Required |
Sample Request
curl --location 'https://{{host}}/api/public/bot/{{BotId}}/notify' \ --header 'Content-Type: application/json' \ --header 'auth: {{jwt-token}}' \ --data-raw '{ "channel": "msteams", "userIdentityType": "resolve", "message": { "type": "text", "val": "Please reset your password" }, "identities": [ "pxxxxxxn@koredxtai.onmicrosoft.com" ] }'
Body Parameters
Parameter | Description | Mandate |
---|---|---|
channel | Name of the channel for which notifications to be sent
Accepted channel types are:“msteams” and “slack“. |
Required |
userIdentityType | Define whether to resolve the user identities provided in the API call to get the channel identities, or to directly use the user identities for delivering the messages
The values is resolve. |
Required |
message | It is an object and accepts two fields
Example 1:Text: Example 2: Script:
|
Required |
identities | It accepts the list of user identities for whom notifications need to be sent.
A maximum of 1000 identities are supported. |
Required |
Sample Response
{ "status": "IN_PROGRESS", "percentageComplete": 0, "streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx", "createdBy": "u-xxxxx-xxx-xxx-xxx-xxxxx", "jobType": "PROACTIVE_NOTIFICATIONS_API", "action": "PROACTIVE_NOTIFICATIONS", "statusLogs": [], "_id": "ds-xxxxx-xxx-xxx-xxx-xxxxx", "lMod": "2022-01-25T06:56:48.000Z", "createdOn": "2022-01-25T06:56:48.891Z", "requestedTime": "2022-01-25T06:56:48.891Z", "__v": 0 }