Send Notification
Description
This API is used to send push notifications to a web app.
Note: Catalyst Push Notifications feature is not available to Catalyst users accessing from the EU and IN data centers.
Request URL
https://api.catalyst.zoho.com/baas/v1/project/{project_id}/project-user/notify
project_id - The unique ID of the project
Request Method
POST
Scope
scope= ZohoCatalyst.notifications.web
Request Body
Attributes | Data Type | Mandatory | Description |
---|---|---|---|
recipients | String[] | Yes | Denotes the email address or the user ID of the user that the push notification must be sent to |
message | String | Yes | Denotes the message content of the push notification |
Request
curl -X POST \
'https://api.catalyst.zoho.com/baas/v1/project/3000000002001/project-user/notify \
-H 'Content-Type: application/json' \
-d '{
"recipents":["rhonda.wilkins@zylker.com","isabella.j@zylker.com","harry.sandman@zylker.com"],
"message":"Attention, new employees! Update your profile information in Zylker team app"
}'
Response
{
"status": "success",
"data": true
}
SDK code snippet
String message = "Attention, new employees! Update your profile information in Zylker team app";
Boolean status = ZCWebNotification.getInstance().notifyUser(message, recp); //recp is the array of recipents
SDK code snippet
app.pushNotification().web() // app is the object instance generated from initialisation of sdk
.sendNotification('Attention, new employees! Update your profile information in Zylker team app', ['harry.sanders@zylker.com'])
.then((result) => {
})
.catch((err) => {});