Back to Blog
Guide

Slack chat.delete API: Who Can Delete What, Tested

chat.delete removes a message by channel and ts. We deleted bot messages, a person's messages, a thread parent and an already deleted message with bot and user tokens, and list every response, including cant_delete_message and the tombstone a thread parent leaves.

Slack Green Team
October 1, 2026
October 9, 2026
3 min read
Share:
slack api
developers
python

To delete a Slack message with the API, call chat.delete with the channel ID and the message ts, using a token with chat:write. A bot token can delete only messages its own bot posted. For anyone else's message it returns cant_delete_message, and you need that person's user token, or the token of an admin who may delete messages in the workspace. We tested each case on 1 October 2026 in our own test workspace. In a DM, even the workspace Owner got cant_delete_message on the other side's messages in our delete a DM test.

Delete a message with chat.delete

curl -s https://slack.com/api/chat.delete \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN" \
  -d channel=C0C5UGH9QPL -d ts=1790818270.840989
{"ok": true, "channel": "C0C5UGH9QPL", "ts": "1790818270.840989"}

The ts is the one chat.postMessage returned, or the ts of the message in conversations.history. The message vanished from the channel with no "deleted" line in its place. To find the ts of a message by hand, copy its link: the part after /p in /archives/C0C5UGH9QPL/p1790818270840989 is the ts without the dot.

Who can delete which message

Our test user is the workspace's Primary Owner. These are the results:

MessageTokenResult
Posted by our botBot tokenok: true
Posted by our bot in #social, a channel the bot never joinedBot tokenok: true
Typed by a person in the Slack appBot tokencant_delete_message
Posted with the person's user token through our appBot tokencant_delete_message
Typed by a person in the Slack appThat person's user tokenok: true
Posted by our botThe Primary Owner's user tokenok: true

The fourth row is easy to get wrong. A message your app posted with a user token belongs to that user, not to your bot, even though Slack shows it with your app's name. Your bot token cannot delete it.

The last row worked because our user is the Primary Owner. The workspace has no other members, so we could not test a regular member's user token on someone else's message. The cant_delete_message response, in full:

{"ok": false, "error": "cant_delete_message"}

Never appear "away" on Slack again

Cloud-based. No downloads. Works 24/7 even when your laptop is off.

message_not_found and the other errors

What we sentResponse
A ts we had already deleted{"ok": false, "error": "message_not_found"}
A real ts with the wrong channel ID{"ok": false, "error": "message_not_found"}
ts=12345{"ok": false, "error": "message_not_found"}
No ts at allinvalid_arguments, with [ERROR] missing required field: ts
The message_ts of an ephemeral message{"ok": false, "error": "message_not_found"}

message_not_found does not tell you whether the message is gone or your channel ID is wrong. If a delete that should work returns it, check that the channel ID is the one the message was posted in. Ephemeral messages cannot be deleted this way at all; Slack ephemeral messages shows the response_url call that does remove them.

Deleting a thread parent

We posted a parent with two replies from the bot and deleted the parent. The replies stayed, and the parent turned into a placeholder:

In Slack, a deleted thread parent shows "This message was deleted." with "2 replies" still linked below it

conversations.history returned it as a tombstone:

{"subtype": "tombstone", "text": "This message was deleted.", "user": "USLACKBOT", "hidden": true, "type": "message", "ts": "1790818289.911899", "thread_ts": "1790818289.911899", "reply_count": 2}

When we then deleted both replies, the tombstone left the channel and conversations.history too. Deleting the tombstone itself returned message_not_found. So to remove a whole thread without a trace, delete the replies as well as the parent. Replies come from conversations.replies, as in our channel history script.

In the Slack app, the owner's message menu offered Delete on bot and webhook messages but not on system lines; our delete someone else's message test compares the menu with the API.

FAQ

Does a deleted message leave a trace in the channel? Not a plain message. Ours disappeared with nothing in its place; only the thread parent left a placeholder. Whether the company can still read a deleted message depends on the workspace's retention settings, explained in can Slack see deleted messages.

Can I delete many messages at once? No, chat.delete takes one ts per call. Loop over the ts values, and keep under the rate limits in Slack API rate limits.

Always Active

Stop Jiggling Your Mouse.

Join hundreds of remote workers who never worry about their Slack status. Set it up once, stay green forever.

Related Articles

Guide

How to Bulk Delete Slack Messages (Tested Script)

The Slack app deletes one message at a time. We ran a script that deleted 120 of our messages in 108 seconds and handled the rate limits.

Slack Green Team
Guide

Slack Work Objects: A Working Unfurl, Flexpane and the Errors We Hit

We built a Work Object unfurl for a fake ticket tracker in a free Slack workspace: the manifest setting, the chat.unfurl metadata that rendered the card, the entity_details_requested event behind the flexpane, and every error on the way.

Slack Green Team
Guide

Slack Bolt for Python Example: An HTTP App With Flask, Tested

A Bolt for Python app over HTTP that answers a message, a slash command and a button through the Flask adapter, then the same app as AsyncApp on aiohttp. Console logs from a real run, and the errors a wrong signing secret and an unhandled event gave.

Slack Green Team