Update Dialog
Update a dialog.
Recipes
Update dialog name
Update dialog name
1. Set a name of the dialog
You can set a name
field for a group
or public
dialog only.
2. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
3. As a result, the API returns a dialog with an updated name.
Add participants to the dialog
Add participants to the dialog
1. Append participants to the array with participants IDs
Use a push_all
operator to append participants to the array with participants IDs.
2. Set the participants that should be added to the dialog
Set the participants IDs to an occupants_ids
array to add participants to the dialog.
3. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
4. As a result, the API returns a dialog with new dialog participants.
Update custom data of the dialog
Update custom data of the dialog
1. Set a custom object that should be updated
Use a data
parameter to refer to a custom object that should be updated. The data stores data as a set of unique keys each having an associated value parameter.
See this section to learn how to create a custom object class.
2. Set a name of the class
Here, we refer to the CoolDialog
custom object class.
3. Specify custom object fields and their new values
Here, we refer to custom object fields of the Cooldialog
class and set new values to these fields.
4. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
5. As a result, the API returns a dialog with updated custom data.
Remove participants from dialog
Remove participants from dialog
1. Specify if you want to remove dialog participants
Use a pull_all
operator to remove participants from the array with participants IDs.
2. Set the participants that should be removed from the dialog
Set participants IDs to an occupants_ids
array to remove the participants from the dialog.
3. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
4. As a result, the API returns a dialog with an updated 'occupants_ids' array list.
Update dialog name with API key
Update dialog name with API key
1. Use 'Authorization' header to pass API key
2. Use 'On-Behalf-Of' header to pass user_id
To execute a request on behalf of a specific user
3. Set a name of the dialog
You can set a name field for a group or public dialog only.
4. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
5. As a result, the API returns a dialog with an updated name.
Add participants to the dialog with API key
Add participants to the dialog with API key
1. Use 'Authorization' header to pass API key
2. Use 'On-Behalf-Of' header to pass user_id
To execute a request on behalf of a specific user.
3. Append participants to the array with participants IDs
Use a push_all
operator to append participants to the array with participants IDs.
4. Set the participants that should be added to the dialog
Set the participants IDs to an occupants_ids
array to add participants to the dialog.
5. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
6. As a result, the API returns a dialog with new dialog participants.
Remove participants from dialog with API key
Remove participants from dialog with API key
1. Use 'Authorization' header to pass API key
2. Use 'On-Behalf-Of' header to pass user_id
To execute a request on behalf of a specific user.
3. Specify if you want to remove dialog participants
Use a pull_all
operator to remove participants from the array with participants IDs.
4. Set the participants that should be removed from the dialog
Set participants IDs to an occupants_ids
array to remove the participants from the dialog.
5. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
6. As a result, the API returns a dialog with an updated 'occupants_ids' array list.
Update custom data of the dialog with API key
Update custom data of the dialog with API key
1. Use 'Authorization' header to pass API key
2. Use 'On-Behalf-Of' header to pass user_id
To execute a request on behalf of a specific user.
3. Set a custom object that should be updated
Use a data parameter to refer to a custom object that should be updated. The data stores data as a set of unique keys each having an associated value parameter.
See this section to learn how to create a custom object class.
4. Set a name of the class
Here, we refer to the CoolDialog
custom object class.
5. Specify custom object fields and their new values
Here, we refer to custom object fields of the Cooldialog
class and set new values to these fields.
6. Set the ID of the dialog that should be updated
To get a dialog ID, use a List Dialogs request.
7. As a result, the API returns a dialog with updated custom data.
Update dialog owner (added in v2.39.0)
Update dialog owner (added in v2.39.0)
1. Set user_id of the dialog
2. Set the ID of the dialog that should be updated
3. As a result, the API returns a dialog with an updated user_id.
The following rules are applied if dialog’s type=3
(PRIVATE):
- Any user from
occupants_ids
can update custom parameters.
The following rules are applied if dialog’s type=2
(GROUP):
- Any user from
occupants_ids
can add other users. - Any user from
occupants_ids
can remove only himself. - Any user from
occupants_ids
can update custom parameters. - Only dialog’s owner (creator) can remove any users from
occupants_ids
.
The following rules are applied if dialog’s type=1
(PUBLIC_GROUP):
- Only dialog’s owner (creator) can update it.
Path Parameters
Body Parameters
Headers
ApiKey {your_api_key}
. Must be used either QB-Token or Authorization.Responses
200
200
400
400
An error response
403
403
An error response