---
title: "Translate a text chatroom message into the viewer language."
method: POST
path: "/v1/translate_chatroom_message"
tags: ["Chatrooms"]
---

# Translate a text chatroom message into the viewer language.

`POST /v1/translate_chatroom_message`

## Request

- Base URL: `https://partner.mindupload.app`
- URL: `https://partner.mindupload.app/v1/translate_chatroom_message`
- Auth: API key in header `X-Partner-Key`

Translates one text chatroom message into `preferred_language`. This operation requires an active subscription for the end-user. The message body is translated by Mind Upload, and repeated requests may return a cached translation until the source message changes. Reply quotes and media tags are ignored so only the human-readable text body is translated. Very large text messages may be rejected with a validation error before work starts.

## Request body

- object
  - `preferred_language` string, nullable: BCP-47-ish language code (e.g. 'en', 'zh-cn') for localized messages.
  - `username` string, nullable: The end-user's username.
  - `password` string, nullable: The end-user's password on first sign-in. After login/register, send the returned session token (JWT) here instead — the field accepts either, and reusing the token keeps raw passwords out of your storage.
  - `chatroom_id` string, nullable: Chatroom id as returned by chatroom operations.
  - `message_id` string, nullable: Chatroom message id.

## Response `200`

Result envelope — check the success field.

- object
  - `success` boolean: Whether the call succeeded.
  - `error_message` string, nullable: Human-readable reason when success is false.
  - `error_code` string
  - `translated_text` string, nullable
  - `target_language` string, nullable
  - `cached` boolean, nullable

## Other responses

- `400`: Invalid request payload.
- `401`: Missing or invalid partner key.
- `403`: Partner is not authorized for this operation.
- `429`: Rate limit exceeded — retry later.
- `500`: Internal server error.

---

[API](https://skmtc.dev/mindupload/apis/mind-upload-partner-api.md) · [All operations](https://skmtc.dev/mindupload/apis/mind-upload-partner-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mindupload/apis/mind-upload-partner-api/revisions/0371bdf78533?raw)
