PUT
/
chat
/
Dialog
/
{chat_dialog_id}
/
notifications.json
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 1319b4991186601ccf4df2d0fa89565f68012bba" \
-d '{  
  "enabled":0
}' \
https://api.quickblox.com/chat/Dialog/5d75651fa0eb4732190b72aa/notifications.json
{
  "notifications": {
    "enabled": 0
  }
}

Recipes

A user can turn on/off push notifications for offline messages in a dialog. The default value is ON.

By default, when a user is offline and other user sent a message to them, they receive a push notification. It is possible to disable this feature. Available only for dialogs type=2 (GROUP) and type=3 (PRIVATE).

Path Parameters

chat_dialog_id
string
required
ID of the dialog to which a current message is connected. Generated automatically by the server after message creation

Body Parameters

enabled
integer
Possible values are: enabled=0, enabled=1.

Headers

QB-Token
string
required
A user or application session token. See our Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.
Authorization
string
default:"ApiKey {your_api_key}"
API key from Dashboard. Expected format: ApiKey {your_api_key}. Must be used either QB-Token or Authorization.
On-Behalf-Of
string
User ID. The user ID of the user on whose behalf the request is being made.

Responses

curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: 1319b4991186601ccf4df2d0fa89565f68012bba" \
-d '{  
  "enabled":0
}' \
https://api.quickblox.com/chat/Dialog/5d75651fa0eb4732190b72aa/notifications.json
{
  "notifications": {
    "enabled": 0
  }
}