2018-06-26 16:30:46 +02:00
|
|
|
# Delete a message
|
|
|
|
|
2020-04-28 20:00:46 +02:00
|
|
|
{generate_api_description(/messages/{message_id}:delete)}
|
2018-06-26 16:30:46 +02:00
|
|
|
|
|
|
|
[delete-completely]: /help/edit-or-delete-a-message#delete-a-message-completely
|
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-06-26 16:30:46 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{generate_code_example(python)|/messages/{message_id}:delete|example(admin_config=True)}
|
|
|
|
|
|
|
|
{tab|curl}
|
2018-06-26 16:30:46 +02:00
|
|
|
|
2019-10-09 11:04:58 +02:00
|
|
|
{generate_code_example(curl)|/messages/{message_id}:delete|example}
|
2018-06-26 16:30:46 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{end_tabs}
|
2018-06-26 16:30:46 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/messages/{message_id}:delete}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/messages/{message_id}:delete|fixture(200)}
|
|
|
|
|
|
|
|
An example JSON response for when the specified message does not exist:
|
|
|
|
|
2020-04-17 19:16:43 +02:00
|
|
|
{generate_code_example|/messages/{message_id}:delete|fixture(400_0)}
|
2018-06-26 16:30:46 +02:00
|
|
|
|
|
|
|
An example JSON response for when the user making the query does not
|
|
|
|
have permission to delete the message:
|
|
|
|
|
2020-04-17 19:16:43 +02:00
|
|
|
{generate_code_example|/messages/{message_id}:delete|fixture(400_1)}
|