Skip to content

Notify API

The Notify API enables developers to send interactive notifications to AI for Work users. These notifications can include customizable response options and action buttons.

Note

Applicable only for Bot Agents.

Method
Post
Endpoint
https://{{host}}/api/public/agents/{agentId}/notify
Content type
application/json
Authorization
authorization: <authToken>

Note: The access token obtained from the Bot agent settings page will serve as the authorization token. See Bot Agent AuthToken
API Scope
Notification

Path Parameter

Parameter
Required/Optional
Description
host
Required
Environment URL, for example, https://work.kore.ai
agent ID
Required
This portion of the URL is a placeholder for the unique identifier of the specific agent. When making an actual API request, you must replace {agentId} with the actual ID of the agent you want to notify.

Note: Obtain the agent ID from the Post URL field while creating a bot agent. See Bot Agent AgentID

Sample Request

curl --location --request POST 'https://work.kore.ai/api/1.1/public/agents/ag-4405269f-4510-5ae2-bcea-6d356yvsu01/notify' \
--header 'authorization: EypCddcFH6sgaJJkWj6k-Wbz6meimT09RXbTYDnYB3FA8$' \
--header 'Content-Type: application/json' \
--data-raw '{
    "to": "john.doe@kore.com",
    "message": {
        "title": "Agent Update",
        "body": "Notification description"
    },
    "category": "agent",
    "actions": [
        {
            "title": "LaptopRequest",
            "type": "postback",
            "utterance": "submit action 1",
            "payload": {
                "transactionId": "tx-qwe2cd11",
                "sessionId": "s-reryt21rt",
                "event": "laptopRequest"
            }
        }
    ]
}'

Request Body Parameters

Parameter Type Required/Optional Description
to string Required Email address of the AI for Work user (single recipient)
message object Required Contains notification title and body text
category string Required Category of the notification (e.g., "agent")
action array Required Array of interactive response buttons
title string Required Notification Title
body string Required Notification Message
title string Required Button text
type string Required Action type (e.g., "postback")
utterance string Required Text to be sent when button is clicked
payload object Required Custom data passed with the action

Sample Response

{
    "notify": "success"
}

Key Points

  • The email address of the receiver needs to be a valid AI for Work users.
  • Custom payload data can be used for tracking and response handling.
  • The to key in the request payload must be a valid AI for Work user email Id, and it should be singular in the initial implementation.
  • actions in the request payload will be transmitted to AI for Work users as buttons for input.