Skip to main content

teams message delete

Auto-generated reference

This page is generated from checked-in CLI metadata for release v0.9.0. Do not edit it by hand.

Delete your own message (a soft delete; undo it with message undelete)

Synopsis​

teams message delete (--team <TEAM> --channel <CHANNEL> [--reply <REPLY>] | --chat <CHAT>) (MESSAGE_ID | --message <MESSAGE>) --yes

Options​

OptionValueRequiredEnvDefaultDescription
--teamTEAMnoTeam ID (for channel messages; requires --channel)
--channelCHANNELnoChannel ID (for channel messages; requires --team)
--chatCHATnoChat ID (for chat messages)
--replyREPLYnoReply ID, to target a reply in a channel thread (MESSAGE_ID is then the parent post)
MESSAGE_IDMESSAGE_IDnoMessage ID
--messageMESSAGEnoMessage ID
--yesYESnofalseConfirm the deletion; without it the command exits with code 2 and sends nothing

Examples​

No command-specific examples are published yet.

Exit Codes​

CodeMeaning
0success
2invalid input
3authentication error
4permission denied
5not found
6rate limited

See Also​