Skip to main content

Documentation Index

Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Back to API List Proactive Notifications allow enterprises to engage with end users (customers or employees) with relevant and timely updates. Use cases include:
  • Nudge employees to reset their password before it expires.
  • Remind users to submit expense reports.
  • Inform customers about their order status.
  • Send other defined reminders.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/bot/{{BotID}}/notify
Content Typeapplication/json
Authorizationauth: {{JWT}} — See How to generate the JWT Token.
API ScopeApp Builder: Proactive Messages; Admin Console: Channel Management > Proactive Messages

Path Parameters

ParameterRequired/OptionalDescription
hostRequiredThe environment URL. For example, https://platform.kore.ai
BotIdRequiredBot ID or Stream ID. Accessible under General Settings on the App Builder. Note: Required only for App Builder API scope of Proactive Messages.

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": [
"john.doe@example.com"
]
}'

Body Parameters

ParameterRequired/OptionalDescription
channelRequiredName of the channel for notifications. Accepted values: "msteams" and "slack".
userIdentityTypeRequiredDefines whether to resolve user identities to channel identities or use them directly. Value: resolve.
messageRequiredObject with two fields: type (message type: "text" for plain text, "script" for JavaScript templates) and val (message content).
identitiesRequiredList of user identities to notify. Maximum of 1000 identities supported.
Example — Text message:
{
  "type": "text",
  "val": "Hi User"
}
Example — Script message:
{
   "type": "script",
   "val": "var envMsg = 'John'; var channel = context.session.BotUserSession.lastMessage.channel; print(JSON.stringify({text: 'Hi ' + envMsg + ' message is from ' + channel + ' channel'}));"
}

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
}