* Validation error text may vary depending on a source of an error
Description
This method is for removing messages from dialog.
On succes empty response with http code 200 is returned.
Endpoint
https://messapi.btsdapps.net/bot/v1/updates/
Structure
Variable | Obligative | Type | Validation | Description |
---|---|---|---|---|
type | true | String | Must be filled with “DeleteMessage” value | Type of request “DeleteMessage” |
messageId | true | String | Value must be a valid Time UUID | Backend ID of a message to delete |
dialog | true | Peer | For Peer type validation see type page | Peer message to delete was sent to |
Sample request
{
"commands":[
{
"type":"DeleteMessage",
"dialog":{
"type":"USER",
"id":"Uuid_value"
},
"messageId":"Uuid_value"
}
]
}
Updates
This method may asynchronously return following updates:
N/A
Possible business exceptions
Common context
- Service isn't able to delete message if it wasn't found (deleted/ID error);
- Service isn't able to delete messages it doesn't own;
Service to service dialog
Deleting messages from service to service is not available, function is not supported.
Service to user dialog
- Deleting a message sent to a user who banned a service ( put a service into a black list) is not available);
- Service isn't able to delete other users messages;
- Service isn't able to delete message if it was sent more than 2 days ago.
Service to channel dialog
- Deleting a message sent to a channel is not available if a channel wasn't found (deleted/ID error) or channel was banned;
- Deleting a message sent to a channel is not available if a service is not a channel subscriber and has no administrator/owner role assigned and WRITE permission assigned;
- Service isn't able to delete message in a channel those it's not an owner of;
- Service isn't able to delete message ina channel if it was sent more than 30 days ago.
Service to group dialog
- Service isn't able to delete a message sent to a group dialog is it's not a member of this group and has no administrator role and permission to delete;
- Service isn't able to delete message in a group if it was sent more than 2 days ago.