Delete a message

This endpoint is only available to organization administrators.

DELETE https://zulip.taliox.io/api/v1/messages/{message_id}

Permanently delete a message.

This API corresponds to the delete a message completely feature documented in the Zulip Help Center.

Usage examples

#!/usr/bin/env python

import zulip

# The user for this zuliprc file must be an organization administrator
client = zulip.Client(config_file="~/zuliprc-admin")

# Delete a message, given the message's ID.
result = client.delete_message(message_id)
print(result)

curl -sSX DELETE https://zulip.taliox.io/api/v1/messages/43 \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

message_id integer required in path

Example: 43

The target message's ID.


Response

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}

An example JSON response for when the specified message does not exist:

{
    "code": "BAD_REQUEST",
    "msg": "Invalid message(s)",
    "result": "error"
}

An example JSON response for when the user making the query does not have permission to delete the message:

{
    "code": "BAD_REQUEST",
    "msg": "You don't have permission to delete this message",
    "result": "error"
}