AI

Staff-only endpoints for translating messages, paraphrasing thread titles, fixing grammar, and summarizing threads.

Endpoints

Translate Message

POST/ai/translate

Translates a message.

JSON Params
FieldTypeDescription
contentstringThe content of the message to be translated (1-2000 characters)
localestringThe locale to translate the message into (1-10 characters)
Response Body
FieldTypeDescription
content 1stringThe translated content of the message

1 If the AI cannot translate the message, the original content will be returned.

Paraphrase Thread Title

POST/ai/title

Paraphrases the title of a thread.

JSON Params
FieldTypeDescription
contentstringThe content of the message to be paraphrased (1-2000 characters)
Response Body
FieldTypeDescription
titlestringThe paraphrased title of the thread

Fix Grammar

POST/ai/fix-grammar

Fixes the grammar of a message.

JSON Params
FieldTypeDescription
contentstringThe content of the message to be corrected (1-2000 characters)
Response Body
FieldTypeDescription
contentstringThe message with corrected grammar

Summarize Thread

POST/ai/summarize-thread/{channel.id}

Summarizes the content of a thread. Returns a 204 empty response on success. The summary will be sent as a system message in the thread. Requires the READ_MESSAGE_HISTORY permission.

JSON Params
FieldTypeDescription
ephemeral?booleanWhether the summary message should be ephemeral (default false)