delete_message
To delete a message, use the messages/delete_message method.
You can delete only a message of a unit that is already loaded in the current session by messages/load_interval or messages/load_last. The access right to the unit that you need depends on the message type. For details, see Message types.
Endpoint
svc=messages/delete_message¶ms={"msgIndex":<uint>}
For an example of this request, see Message request examples.
Parameters
The required parameters are marked with an asterisk (*).
| Parameter | Description |
|---|---|
msgIndex* |
Message index. |
Response
{} /* an empty object if the execution is successful; if not, an error code */
Error codes
| Error code | Description |
|---|---|
| 4 | There is no such message or this message is the last one and can’t be deleted, or failed to fetch the unit. |
| 6 | Error deleting message. |
| 7 | User not found, or the user doesn’t have the access right to the unit that is required to delete this message type. |