API reference
Conversations
A conversation is your DM thread with one lead on X, and its ID is the lead's ID. Read every message of a thread, list them in bulk, reply from your X account, and keep the Conversations board in order. New replies also arrive as the reply.received webhook.
- GET/v1/
conversations - GET/v1/
conversations/ :id - POST/v1/
conversations/ :conversation_id/ mark_read - POST/v1/
conversations/ :conversation_id/ mark_unread - POST/v1/
conversations/ :conversation_id/ move - POST/v1/
conversations/ :conversation_id/ pin - POST/v1/
conversations/ :conversation_id/ unpin - DELETE/v1/
conversations/ :conversation_id - GET/v1/
conversations/ :conversation_id/ messages - POST/v1/
conversations/ :conversation_id/ messages - POST/v1/
conversations/ :conversation_id/ messages/ :message_id/ reactions - DELETE/v1/
conversations/ :conversation_id/ messages/ :message_id/ reactions - DELETE/v1/
conversations/ :conversation_id/ messages/ :message_id - GET/v1/
conversations/ :conversation_id/ translation - PATCH/v1/
conversations/ :conversation_id/ translation - POST/v1/
conversations/ :conversation_id/ translate
The conversation object
Your DM thread with one lead on X. Its ID is the lead's ID.
Attributes
- idstringUnique identifier for the conversation, the same as
lead_id. - objectstringAlways
conversation. - lead_idstringThe lead you are talking to.
- profileobjectThe lead's X profile, as on the lead object.
- unreadbooleanTrue when the lead's last message is not read yet.
- last_message_atstringWhen the last message was sent, ISO 8601.
- messages_countintegerMessages in the thread.
- last_messageobject or nullThe last message.
- personaobject or nullThe lead's persona.
- columnobject or nullThe column of your Conversations board the conversation sits in, like Interested. See Pipeline columns.
- historystring
completewhenmessagesis the whole thread.recentwhile Gemlead holds only the latest messages of a long thread, before it reads the rest from X once. Only withmessages.completerecent - messagesarray of objectsEvery message of the thread, oldest first. When you retrieve one conversation, or list them with
include_messages.
{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": true,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
}
}List conversations
Returns your conversations, the most recent message first.
Query parameters
- unreadboolean
truefor unread conversations only. - personastringOnly conversations with leads of this persona ID.
- include_messagesboolean
trueto get each conversation with all its messages, oldest first, andhistory. Pages are heavier, so keeplimitat 25 or less. - limitintegerHow many objects to return, from 1 to 100. Defaults to 25.
- cursorstringThe
next_cursorof the previous page, to get the page after it. See Pagination.
Returns
A list of conversation objects, with messages only when include_messages is true.
Errors
- A parameter has a value the API does not accept.
paramnames it.
curl -G https://gemlead.ai/api/v1/conversations \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-d unread=true{
"object": "list",
"data": [
{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": true,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
}
}
],
"has_more": true,
"next_cursor": "eyJzIjoiMjAyNi0xMS0wNVQxNDowMzo0MC4xMTdaIn0"
}Retrieve a conversation
Returns one conversation with all its messages, oldest first.
Path parameters
- idstringRequiredThe conversation's ID.
Returns
A conversation object with messages and history.
Errors
- No conversation with this ID on the key's account.
curl https://gemlead.ai/api/v1/conversations/msgOtJ8dvT \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": true,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
},
"history": "complete",
"messages": [
{
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
{
"id": "1985329981234567890",
"object": "message",
"direction": "outbound",
"text": "Happy to show you. Do you sell picks monthly or per event?",
"created_at": "2026-11-06T08:20:03.000Z",
"media": [],
"reactions": [
{
"emoji": "👍",
"direction": "inbound",
"created_at": "2026-11-06T08:24:51.000Z"
}
],
"encrypted": false,
"reply_to_message_id": "1985321409876543210"
}
]
}Mark as read
Marks the conversation as read in Gemlead, and on X with a read receipt.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Returns
The conversation object.
Errors
- No conversation with this ID on the key's account.
- The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/mark_read \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": false,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
}
}Mark as unread
Marks the conversation as unread in Gemlead.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Returns
The conversation object.
Errors
- No conversation with this ID on the key's account.
- The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/mark_unread \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": true,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
}
}Move a conversation
Moves the conversation to another column of the Conversations board.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Body parameters
- column_idstringRequiredThe column's ID, from List pipeline columns.
Returns
The conversation object.
Errors
- No conversation with this ID on the key's account.
- No column with this ID on the account's board.
- A required parameter is missing.
paramnames it.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/move \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"column_id": "z3c6lf8a"
}'{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": true,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "z3c6lf8a",
"name": "Call booked"
}
}Pin a conversation
Pins the conversation in your X inbox.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Returns
The conversation object.
Errors
- No conversation with this ID on the key's account.
- The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/pin \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": true,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
}
}Unpin a conversation
Unpins the conversation in your X inbox.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Returns
The conversation object.
Errors
- No conversation with this ID on the key's account.
- The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/unpin \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "msgOtJ8dvT",
"object": "conversation",
"lead_id": "msgOtJ8dvT",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"unread": true,
"last_message_at": "2026-11-06T08:12:44.000Z",
"messages_count": 4,
"last_message": {
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
},
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"column": {
"id": "q7m2xk4p",
"name": "Interested"
}
}Delete a conversation
Deletes the conversation in Gemlead and in your X inbox. Its lead stops in every campaign. This cannot be undone.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Returns
An object with the conversation's id and deleted set to true.
Errors
- No conversation with this ID on the key's account.
- The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X DELETE \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "msgOtJ8dvT",
"object": "conversation",
"deleted": true
}The message object
One DM in a conversation, sent by you or by the lead.
Attributes
- idstringThe message's ID on X.
- objectstringAlways
message. - directionstring
inboundwhen the lead wrote it,outboundwhen you did.inboundoutbound - textstringThe message's text.
- created_atstringWhen it was sent, ISO 8601.
- mediaarray of objectsWhat is attached to the message, each with its
typeandurl. Images on X come through a Gemlead link. - reactionsarray of objectsThe emoji reactions on the message, oldest first, one per person and emoji.
- encryptedboolean
truefor an X Chat message Gemlead cannot read yet. Itstextandmediastay empty until the X Chat passcode unlocks it. - reply_to_message_idstring or nullThe ID of the message it replies to,
nullwhen it replies to none.
{
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
}List messages
Returns the whole history of a conversation from X, newest first, page by page.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Query parameters
- limitintegerHow many messages to return, from 1 to 50. Defaults to 25.
- cursorstringThe
next_cursorof the previous page, for older messages.
Returns
A list of message objects.
Errors
- No conversation with this ID on the key's account.
- A parameter has a value the API does not accept.
paramnames it. - The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -G \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-d limit=50{
"object": "list",
"data": [
{
"id": "1985329981234567890",
"object": "message",
"direction": "outbound",
"text": "Happy to show you. Do you sell picks monthly or per event?",
"created_at": "2026-11-06T08:20:03.000Z",
"media": [],
"reactions": [
{
"emoji": "👍",
"direction": "inbound",
"created_at": "2026-11-06T08:24:51.000Z"
}
],
"encrypted": false,
"reply_to_message_id": "1985321409876543210"
},
{
"id": "1985321409876543210",
"object": "message",
"direction": "inbound",
"text": "Yes, I want to charge for my Discord. How does it work?",
"created_at": "2026-11-06T08:12:44.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null
}
],
"has_more": true,
"next_cursor": "eyJzIjoiMjAyNi0xMS0wNVQxNDowMzo0MC4xMTdaIn0"
}Send a message
Sends a DM to the lead from your X account, right away. Send text, a file, or both. The recipient always comes from the conversation.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Body parameters
- textstringThe message, up to 10 000 characters. Required without
media. - mediaobjectA file to send with the message. Give its
url, or itsdatawith itsmime_type. Gemlead reads its type from the file itself. Images go up to 5 MB and GIFs up to 15 MB. Videos and voice notes go as large as X takes them, send aurlfor those too big for a request body. - reply_to_message_idstringReply to this message, one of the conversation's last 20. A reply with media needs an X Chat conversation.
Returns
The sent message, with its conversation_id, reply_to_message_id and transport, x_chat or classic.
Errors
- No conversation with this ID on the key's account.
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept.
paramnames it. - The conversation cannot take this kind of file, like a voice note without X Chat.
- 429dm_pausedX limits the account's DMs for now.
Retry-Aftersays when they start again. - More than 10 DMs in the minute.
- 300 DMs today in UTC, or X's own daily quota for the account.
- X refused, the lead closed their DMs or blocked the account.
- The conversation has no X user to write to yet.
- The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Happy to show you. Do you sell picks monthly or per event?"
}'{
"id": "1985329981234567890",
"object": "message",
"conversation_id": "msgOtJ8dvT",
"direction": "outbound",
"text": "Happy to show you. Do you sell picks monthly or per event?",
"created_at": "2026-11-06T08:20:03.000Z",
"media": [],
"reactions": [],
"encrypted": false,
"reply_to_message_id": null,
"transport": "x_chat"
}Add a reaction
Reacts to a message with an emoji, from your X account.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
- message_idstringRequiredThe message's ID, one of the conversation's last 20.
Body parameters
- emojistringRequiredThe emoji, like ❤️ or 👍.
Returns
An object with the conversation_id, the message_id and the emoji.
Errors
- No message with this ID on the key's account.
- A required parameter is missing.
paramnames it. - The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages/1985321409876543210/reactions \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emoji": "👍"
}'{
"object": "reaction",
"conversation_id": "msgOtJ8dvT",
"message_id": "1985321409876543210",
"emoji": "👍"
}Remove a reaction
write scopeMCPreact_to_messageRemoves your reaction from a message.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
- message_idstringRequiredThe message's ID, one of the conversation's last 20.
Query parameters
- emojistringRequiredThe emoji to remove.
Returns
The reaction with deleted set to true.
Errors
- No message with this ID on the key's account.
- A required parameter is missing.
paramnames it. - The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X DELETE \
"https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages/1985321409876543210/reactions?emoji=%F0%9F%91%8D" \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"object": "reaction",
"conversation_id": "msgOtJ8dvT",
"message_id": "1985321409876543210",
"emoji": "👍",
"deleted": true
}Delete a message
Deletes a message for you, or for both sides when it is yours and the conversation is on X Chat.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
- message_idstringRequiredThe message's ID, one of the conversation's last 20.
Query parameters
- for_everyoneboolean
truedeletes it for both sides, your own messages on X Chat only. Defaultfalse.
Returns
An object with the message's id, its conversation_id, deleted set to true and for_everyone.
Errors
- No message with this ID on the key's account.
- A parameter has a value the API does not accept.
paramnames it. - The X account's session expired. Reconnect it in the app, then try again.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X DELETE \
"https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages/1985329981234567890?for_everyone=true" \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "1985329981234567890",
"object": "message",
"conversation_id": "msgOtJ8dvT",
"deleted": true,
"for_everyone": true
}The conversation translation object
Whether a conversation's messages are translated, and into which language.
Attributes
- objectstringAlways
conversation_translation. - conversation_idstringThe conversation's ID.
- enabledbooleanWhether its messages are translated as they come.
- decidedbooleanWhether someone turned it on or off, rather than Gemlead's default.
- source_languagestring or nullThe lead's language, once detected.
- languagestring or nullThe language messages are translated into.
- shownbooleanWhether the app shows the messages translated.
{
"object": "conversation_translation",
"conversation_id": "msgOtJ8dvT",
"enabled": true,
"decided": true,
"source_language": "es",
"language": "en",
"shown": true
}Retrieve translation settings
Returns whether the conversation is translated, and into which language.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Returns
A conversation translation object.
Errors
- No conversation with this ID on the key's account.
curl \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/translation \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"object": "conversation_translation",
"conversation_id": "msgOtJ8dvT",
"enabled": true,
"decided": true,
"source_language": "es",
"language": "en",
"shown": true
}Update translation settings
Turns the conversation's translation on or off, and whether the app shows the messages translated.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Body parameters
- enabledbooleanTranslate the messages as they come, yours and theirs.
- shownbooleanShow the messages translated in the app. Needs
enabled. - languagestringThe language to translate into. Default your language in Gemlead, else English.
enfresitderuptnljazhkoartrhiidplukvithsv
Returns
The updated conversation translation object.
Errors
- No conversation with this ID on the key's account.
- A parameter has a value the API does not accept.
paramnames it. - The body has a field this endpoint does not take.
curl -X PATCH \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/translation \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"shown": true,
"language": "en"
}'{
"object": "conversation_translation",
"conversation_id": "msgOtJ8dvT",
"enabled": true,
"decided": true,
"source_language": "es",
"language": "en",
"shown": true
}Translate messages
Translates the conversation's recent messages. With translation off, translate one message at a time.
Path parameters
- conversation_idstringRequiredThe conversation's ID.
Body parameters
- message_idsarray of stringsThe messages to translate, among the last 20. Default all of them, with translation on.
- languagestringThe language to translate into. Default your language in Gemlead, else English.
enfresitderuptnljazhkoartrhiidplukvithsv
Returns
An object with the conversation_id, the language, and in data each message's message_id, text and translation.
Errors
- No conversation with this ID on the key's account.
- A parameter has a value the API does not accept.
paramnames it. - Translation is off and you asked for more than one message.
- X or a Gemlead service did not answer. Nothing changed, try again in a minute.
curl -X POST \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/translate \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message_ids": ["1985321409876543210"],
"language": "en"
}'{
"object": "message_translations",
"conversation_id": "msgOtJ8dvT",
"language": "en",
"data": [
{
"message_id": "1985321409876543210",
"text": "Sí, quiero cobrar por mi Discord. Cómo funciona?",
"translation": "Yes, I want to charge for my Discord. How does it work?"
}
]
}