2018-06-26 16:30:46 +02:00
|
|
|
# Delete a message
|
|
|
|
|
|
|
|
Permanently delete a message.
|
|
|
|
|
2019-07-11 12:45:26 +02:00
|
|
|
`DELETE {{ api_url }}/v1/messages/{msg_id}`
|
2018-06-26 16:30:46 +02:00
|
|
|
|
|
|
|
This API corresponds to the
|
|
|
|
[delete a message completely][delete-completely] feature documented in
|
|
|
|
the Zulip Help Center.
|
|
|
|
|
|
|
|
[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:
|
|
|
|
|
|
|
|
{generate_code_example|/messages/{message_id}:delete|fixture(400_invalid_message)}
|
|
|
|
|
|
|
|
An example JSON response for when the user making the query does not
|
|
|
|
have permission to delete the message:
|
|
|
|
|
|
|
|
{generate_code_example|/messages/{message_id}:delete|fixture(400_not_admin)}
|