Render message


Render a message to HTML.

Usage examples

#!/usr/bin/env python3

import zulip

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

# Render a message.
request = {
    "content": "**foo**",
result = client.render_message(request)

More examples and documentation can be found here.

const zulipInit = require("zulip-js");

// Pass the path to your zuliprc file here.
const config = { zuliprc: "zuliprc" };

(async () => {
    const client = await zulipInit(config);

    // Render a message
    const params = {
        content: "**foo**",

    console.log(await client.messages.render(params));

curl -sSX POST \
    --data-urlencode content=Hello


content string required

Example: "Hello"

The content of the message.

Clients should use the max_message_length returned by the POST /register endpoint to determine the maximum message size.


Return values

  • rendered: string

    The rendered HTML.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

    "msg": "",
    "rendered": "<p><strong>foo</strong></p>",
    "result": "success"