Rooms messages delete

Open in

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

The name of the chat room containing the message.

message-serial
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" --json

See also

  • Rooms — Explore all ably rooms commands.
  • CLI reference — Full list of available commands.