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 |
|
Content Type | application/json |
Authorization |
|
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 --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" ] }'
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 }