Translate a message

POST https://connect.suryojasvi.com/api/v1/messages/{message_id}/translate

Translate a message into the user's language, with the AI model the server uses for topic summaries, keeping its Markdown, mentions, emoji, code and links. Available to the users who may use AI summaries, and counted against their monthly allowance for AI features.

Changes: New in Zulip 13.0 (feature level ZF-592235).

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for Zulip users and bots.

curl -sSX POST https://connect.suryojasvi.com/api/v1/messages/43/translate \
    -u EMAIL_ADDRESS:API_KEY

Parameters

message_id integer required in path

Example: 43

The target message's ID.


Response

Return values

  • rendered_translation: string

    The translation, rendered as HTML.

  • language: string

    The name of the language translated into.

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:

{
    "language": "English",
    "msg": "",
    "rendered_translation": "<p>Release on Friday.</p>",
    "result": "success"
}