Use the ably rooms messages delete command to delete a message in an Ably Chat room.
Synopsis
ably rooms messages delete <room-name> <message-serial> [options]Arguments
room-name Required
Required
The name of the chat room containing the message.
message-serial Required
Required
The serial identifier of the message to delete.
Options
--description
A description of the reason for deleting the message.
--client-id
A client ID to use when deleting the message.
--json
Output results as compact JSON. Mutually exclusive with --pretty-json.
--pretty-json
Output results in formatted JSON. Mutually exclusive with --json.
--verbose | -v
Enable verbose logging. Can be combined with --json or --pretty-json.
Examples
Delete a message:
ably rooms messages delete my-room "msg-serial"Delete a message with a description:
ably rooms messages delete my-room "msg-serial" --description "Removed inappropriate content"Delete a room message and output the result in JSON format:
ably rooms messages delete my-room "msg-serial" --jsonSee also
- Rooms — Explore all
ably roomscommands. - CLI reference — Full list of available commands.