Kore.ai supports sending push notifications to mobile devices over the Mobile SDK channel.
Kore mobile SDKs get embedded with the native host mobile application, which is responsible for managing push notification subscriptions with APNS and GCM provider. The Host Mobile application server needs to host a webhook to receive updates from Kore.ai. It sends these updates as push notifications to the devices.
User Device Registration
For each user who opts to receive the notification, the Mobile Application needs to send the device and user details to Kore.ai. Kore.ai sends device details and the user ID while making the webhook call.
Subscription API
- Endpoint
POST https://bots.kore.ai/api/users/:userId/sdknotifications/subscribe - Authorization Header
authorization: “bearer xxxxxxxxxxxxxxx”
- Payload
{deviceId : , (required) osType : ios / android (required) }
- Sample Request
curl -X POST \ https://bots.kore.ai/api/users/u-46b5fdXXXXXXXXX-4b85347a38ea/sdknotifications/subscribe \ -H 'authorization: bearer jmABumfQUt8AaMXXXXXXXXXXXXXXXXXz0hsvVI' \ -H 'content-type: application/json' \ -d ' { "deviceId" : "device123", "osType" : "ios" }'
Unsubscription API
- Endpoint
DELETE https://bots.kore.ai/api/users/:userId/sdknotifications/unsubscribe - Authorization Header
authorization: “bearer xxxxxxxxxxxxxxx”
- Payload
{deviceId : , (required) osType : ios / android (required) }
- Sample Request
curl -X DELETE \ https://bots.kore.ai/api/users/u-46b5fdXXXXXXXXX-4b85347a38ea/sdknotifications/unsubscribe \ -H 'authorization: bearer jmABumfQUt8AaMXXXXXXXXXXXXXXXXXz0hsvVI' \ -H 'content-type: application/json' \ -d ' { "deviceId" : "device123", "osType" : "ios" }'