Skip to main content
DELETE

Recipes

1

1. Set dialogs IDs that should be removed

Specify as many dialogs IDs as you need via comma.
2

2. As a result, the dialogs will be removed for a user who has sent the request, not for all dialog participants.

1

1. Specify if you want to delete dialogs for all dialog participants

You can delete dialogs from the histories of all dialog participants. Just set the force=1 and dialogs will be removed for all users participating in the dialog.
2

2. Set dialogs IDs that should be removed

Specify as many dialogs IDs as you need via comma.
3

3. As a result, the API will return the `SuccessfullyDeleted` response.

If you’re not the owner of the dialog, the API will return the following message: “WrongPermissions”. This means that a user doesn’t have permissions to delete dialogs from all users’ histories.
1

1. Use 'Authorization' header to pass API key

2

2. Use 'On-Behalf-Of' header to pass user_id

To execute a request on behalf of a specific user.
3

3. Set dialogs IDs that should be removed

Specify as many dialogs IDs as you need via comma.
4

4. As a result, the dialogs will be removed for a user who has sent the request, not for all dialog participants.

1

1. Use 'Authorization' header to pass API key

2

2. Use 'On-Behalf-Of' header to pass user_id

To execute a request on behalf of a specific user.
3

3. Set dialogs IDs that should be removed

Specify as many dialogs IDs as you need via comma.
4

4. As a result, the dialogs will be removed for all dialog participants.

Each user from a dialog’s occupant_ids field can remove the dialog. It does not mean that this dialog will be removed completely for all users in this dialog. It will be removed only for a current user. To completely remove a dialog, pass force=1. Only the owner can do it.

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

force
integer
Delete a dialog for everyone. Set force=1 to perform. Only the owner can do it.

Headers

QB-Token
string
required
A user or application session token. See 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

A successful response
An error response
errors
array of strings
An error response
type
array of strings