Channels delete

Open in

Use the ably channels delete command to delete a message on an Ably Pub/Sub channel.

Synopsis

ably channels delete <channel-name> <message-serial> [options]

Arguments

channel-name
Required

The name of the channel containing the message.

message-serial
Required

The serial of the message to delete.

Options

--description

A description for the deletion.

--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 channels delete my-channel "msg-serial"

Delete a message with a description:

ably channels delete my-channel "msg-serial" --description "Removed inappropriate content"

Delete a message and output the result in JSON format:

ably channels delete my-channel "msg-serial" --json

Delete a message and output the result in formatted JSON:

ably channels delete my-channel "msg-serial" --pretty-json

See also

  • Channels — Explore all ably channels commands.
  • CLI reference — Full list of available commands.