Skip to main content
Back to How-to Guides Proactive Notifications let you send timely, relevant updates to users. For the MS Teams channel, you can include interactive elements—such as buttons or links—in the notification payload using Adaptive Cards.

Payload Structure

The API payload includes a message component with the following fields:
FieldValue
typescript
valA stringified JSON Adaptive Card for MS Teams.
The Adaptive Card can include:
  • An image (such as a company logo).
  • Text blocks for status, description, value, and date.
  • An action button (for example, to reopen a ticket).

Sample API Request

curl --location 'https://bots.kore.ai/api/public/bot/{{BotID}}/notify' \
--header 'Content-Type: application/json' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--data-raw '{
    "channel": "msteams",
    "userIdentityType": "resolve",
    "message": {
        "type": "script",
        "val": "{\"type\":\"message\",\"speak\":\"\",\"attachments\":[{\"contentType\":\"application/vnd.microsoft.card.adaptive\",\"content\":{\"$schema\":\"https://adaptivecards.io/schemas/adaptive-card.json\",\"type\":\"AdaptiveCard\",\"version\":\"1.4\",\"body\":[{\"type\":\"ColumnSet\",\"id\":\"idx0\",\"columns\":[{\"type\":\"Column\",\"items\":[{\"type\":\"Image\",\"style\":\"Person\",\"url\":\"https://lever-client-logos.s3.amazonaws.com/965b74f1-3802-484a-9511-459bbdaccb55-1572990729555.png\",\"size\":\"Medium\"}],\"width\":\"auto\"},{\"type\":\"Column\",\"items\":[{\"type\":\"TextBlock\",\"text\":\"Status: **Closed**\",\"spacing\":\"small\",\"wrap\":true},{\"type\":\"TextBlock\",\"text\":\"Description: GDC Sow for development for Golden Fortress\",\"spacing\":\"Small\",\"separator\":true,\"wrap\":true},{\"type\":\"TextBlock\",\"spacing\":\"small\",\"text\":\"Total Value: 33615.00\",\"wrap\":true},{\"type\":\"TextBlock\",\"spacing\":\"small\",\"text\":\"Creation Date: 2021-08-15T16:24:17-07:0\",\"wrap\":true}],\"width\":\"stretch\"},{\"type\":\"Column\",\"items\":[{\"type\":\"ActionSet\",\"actions\":[{\"type\":\"Action.Submit\",\"title\":\"1190148660\",\"data\":{\"msteams\":{\"type\":\"imBack\",\"value\":\"Reopen ticket number INC03004614\"}}}],\"spacing\":\"None\",\"horizontalAlignment\":\"Right\",\"separator\":true}],\"width\":\"auto\",\"spacing\":\"Small\"}],\"separator\":true,\"spacing\":\"Large\"}]}}]}"
    },
    "identities": [
        "john.doe@example.com",
        "jane.doe@example.com"
    ]
}'

Sample Notification

MS Teams notification