Get a message's raw markdown

Get the raw content of a message.


This is a rarely-used endpoint relevant for clients that primarily work with HTML-rendered messages but might need to occasionally fetch the message's raw markdown (e.g. for pre-filling a message-editing UI).

Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Get the raw content of the message with ID "message_id"
result = client.get_raw_message(message_id)

curl -sSX GET -G \


message_id required in path

Example: 42

The target message's ID.


Return values

  • raw_content: The raw content of the message.

Example response

A typical successful JSON response may look like:

    "msg": "",
    "raw_content": "**Don't** forget your towel!",
    "result": "success"

An example JSON response for when the specified message does not exist or it is not visible to the user making the query (e.g. it was a PM between other two users):

    "code": "BAD_REQUEST",
    "msg": "Invalid message(s)",
    "result": "error"