APIリファレンス
会話
会話とは、Xでの1人のリードとのDMスレッドで、そのIDはリードのIDと同じです。スレッドのすべてのメッセージを読み取り、まとめて一覧にし、あなたのXアカウントから返信し、会話ボードを整理できます。新しい返信は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
会話オブジェクト
Xでの1人のリードとのDMスレッド。IDはリードのIDと同じです。
属性
- idstring会話の一意の識別子。
lead_idと同じです。 - objectstring常に
conversationです。 - lead_idstring会話の相手のリード。
- profileobjectリードオブジェクトと同じ形式の、リードのXプロフィール。
- unreadbooleanリードの最後のメッセージが未読の場合はtrue。
- last_message_atstring最後のメッセージが送信された日時。ISO 8601形式です。
- messages_countintegerスレッド内のメッセージ数。
- last_messageobjectまたはnull最後のメッセージ。
- personaobjectまたはnullリードのペルソナ。
- columnobjectまたはnull会話ボードで会話が置かれている列。「興味あり」などです。パイプラインの列を参照してください。
- historystring
messagesがスレッド全体の場合はcomplete。長いスレッドについてGemleadが最新のメッセージしか保持しておらず、残りをまだXから一度読み込んでいない間はrecentです。messagesがある場合のみ含まれます。completerecent - messagesobjectsの配列スレッドのすべてのメッセージ。古い順です。1件の会話を取得したとき、または
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"
}
}会話を一覧表示
会話を、最後のメッセージが新しいものから順に返します。
クエリパラメーター
- unreadboolean
trueにすると、未読の会話のみを返します。 - personastringこのペルソナIDのリードとの会話のみ。
- include_messagesboolean
trueにすると、各会話にすべてのメッセージが古い順で含まれ、historyも付きます。ページが重くなるため、limitは25以下にしてください。 - limitinteger返すオブジェクトの数。1から100まで指定でき、デフォルトは25です。
- cursorstring次のページを取得するための、前のページの
next_cursor。ページネーションを参照してください。
戻り値
会話オブジェクトのリスト。messagesはinclude_messagesがtrueの場合のみ含まれます。
エラー
- APIが受け付けない値のパラメーターがあります。
paramにその名前が入ります。
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"
}会話を取得
会話を1件返します。すべてのメッセージを古い順に含みます。
パスパラメーター
- idstring必須会話のID。
戻り値
messagesとhistoryを含む会話オブジェクト。
エラー
- キーのアカウントに、このIDの会話はありません。
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"
}
]
}既読にする
Gemleadで会話を既読にし、Xでも既読通知を付けます。
パスパラメーター
- conversation_idstring必須会話のID。
戻り値
エラー
- キーのアカウントに、このIDの会話はありません。
- Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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"
}
}未読にする
Gemleadで会話を未読にします。
パスパラメーター
- conversation_idstring必須会話のID。
戻り値
エラー
- キーのアカウントに、このIDの会話はありません。
- Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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"
}
}会話を移動
会話を、会話ボードの別の列に移動します。
パスパラメーター
- conversation_idstring必須会話のID。
ボディパラメーター
- column_idstring必須パイプラインの列を一覧表示で取得した列のID。
戻り値
エラー
- キーのアカウントに、このIDの会話はありません。
- アカウントのボードに、このIDの列はありません。
- 必須パラメーターがありません。
paramにその名前が入ります。
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"
}
}会話をピン留め
Xの受信トレイで会話をピン留めします。
パスパラメーター
- conversation_idstring必須会話のID。
戻り値
エラー
- キーのアカウントに、このIDの会話はありません。
- Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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"
}
}会話のピン留めを解除
Xの受信トレイで会話のピン留めを解除します。
パスパラメーター
- conversation_idstring必須会話のID。
戻り値
エラー
- キーのアカウントに、このIDの会話はありません。
- Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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"
}
}会話を削除
Gemleadと、あなたのXの受信トレイから会話を削除します。そのリードはすべてのキャンペーンで停止します。この操作は元に戻せません。
パスパラメーター
- conversation_idstring必須会話のID。
戻り値
会話のidと、trueに設定されたdeletedを含むオブジェクト。
エラー
- キーのアカウントに、このIDの会話はありません。
- Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
curl -X DELETE \
https://gemlead.ai/api/v1/conversations/msgOtJ8dvT \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "msgOtJ8dvT",
"object": "conversation",
"deleted": true
}メッセージオブジェクト
会話内の1件のDM。あなたまたはリードが送信したものです。
属性
- idstringXでのメッセージのID。
- objectstring常に
messageです。 - directionstringリードが書いた場合は
inbound、あなたが書いた場合はoutbound。inboundoutbound - textstringメッセージの本文。
- created_atstring送信された日時。ISO 8601形式です。
- mediaobjectsの配列メッセージの添付ファイル。それぞれ
typeとurlを含みます。Xの画像はGemleadのリンク経由で提供されます。 - reactionsobjectsの配列メッセージへの絵文字リアクション。古い順で、人と絵文字の組み合わせごとに1件です。
- encryptedboolean
- reply_to_message_idstringまたはnull返信先のメッセージのID。返信でない場合は
nullです。
{
"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
}メッセージを一覧表示
Xから取得した会話の全履歴を、新しい順に1ページずつ返します。
パスパラメーター
- conversation_idstring必須会話のID。
クエリパラメーター
- limitinteger返すメッセージの数。1から50まで指定でき、デフォルトは25です。
- cursorstringさらに古いメッセージを取得するための、前のページの
next_cursor。
戻り値
メッセージオブジェクトのリスト。
エラー
- キーのアカウントに、このIDの会話はありません。
- APIが受け付けない値のパラメーターがあります。
paramにその名前が入ります。 - Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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"
}メッセージを送信
あなたのXアカウントから、すぐにリードにDMを送ります。テキスト、ファイル、またはその両方を送れます。宛先は常に会話の相手です。
パスパラメーター
- conversation_idstring必須会話のID。
ボディパラメーター
- textstringメッセージ。10 000文字までです。
mediaがない場合は必須です。 - mediaobjectメッセージと一緒に送るファイル。
urlを指定するか、dataとmime_typeを指定します。Gemleadはファイル自体から種類を判別します。画像は5 MBまで、GIFは15 MBまでです。動画とボイスメッセージはXが受け付けるサイズまで送れます。リクエストボディに収まらない大きさの場合はurlで送ってください。 - reply_to_message_idstringこのメッセージに返信します。会話の最新20件のうちの1件を指定します。メディア付きの返信には、X Chatの会話が必要です。
戻り値
送信されたメッセージ。conversation_id、reply_to_message_idと、x_chatまたはclassicのtransportを含みます。
エラー
- キーのアカウントに、このIDの会話はありません。
- 必須パラメーターがありません。
paramにその名前が入ります。 - APIが受け付けない値のパラメーターがあります。
paramにその名前が入ります。 - X Chatのないボイスメッセージなど、この会話では送れない種類のファイルです。
- 429dm_pausedXが現在このアカウントのDMを制限しています。再開のタイミングは
Retry-Afterでわかります。 - 1分間に10件を超えるDMが送信されました。
- UTCの今日300件のDMが送信されたか、Xが設定したアカウントの1日の上限に達しました。
- Xが拒否しました。リードがDMを閉じているか、アカウントをブロックしています。
- この会話には、まだメッセージを送れるXユーザーがいません。
- Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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"
}リアクションを追加
あなたのXアカウントから、メッセージに絵文字でリアクションします。
パスパラメーター
- conversation_idstring必須会話のID。
- message_idstring必須メッセージのID。会話の最新20件のうちの1件を指定します。
ボディパラメーター
- emojistring必須❤️や👍などの絵文字。
戻り値
conversation_id、message_id、emojiを含むオブジェクト。
エラー
- キーのアカウントに、このIDのメッセージはありません。
- 必須パラメーターがありません。
paramにその名前が入ります。 - Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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": "👍"
}リアクションを削除
メッセージから自分のリアクションを削除します。
パスパラメーター
- conversation_idstring必須会話のID。
- message_idstring必須メッセージのID。会話の最新20件のうちの1件を指定します。
クエリパラメーター
- emojistring必須削除する絵文字。
戻り値
deletedがtrueに設定されたリアクション。
エラー
- キーのアカウントに、このIDのメッセージはありません。
- 必須パラメーターがありません。
paramにその名前が入ります。 - Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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
}メッセージを削除
メッセージを自分の側だけで削除します。自分のメッセージで、会話がX Chatの場合は、双方から削除できます。
パスパラメーター
- conversation_idstring必須会話のID。
- message_idstring必須メッセージのID。会話の最新20件のうちの1件を指定します。
クエリパラメーター
- for_everyoneboolean
trueにすると双方から削除します。X Chatでの自分のメッセージのみが対象です。デフォルトはfalseです。
戻り値
メッセージのid、そのconversation_id、trueに設定されたdeleted、for_everyoneを含むオブジェクト。
エラー
- キーのアカウントに、このIDのメッセージはありません。
- APIが受け付けない値のパラメーターがあります。
paramにその名前が入ります。 - Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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
}会話の翻訳オブジェクト
会話のメッセージが翻訳されているかどうかと、翻訳先の言語。
属性
- objectstring常に
conversation_translationです。 - conversation_idstring会話のID。
- enabledbooleanメッセージが届くたびに翻訳されるかどうか。
- decidedbooleanGemleadのデフォルトのままではなく、誰かが手動でオンまたはオフにしたかどうか。
- source_languagestringまたはnull検出されたリードの言語。
- languagestringまたはnullメッセージの翻訳先の言語。
- shownbooleanアプリでメッセージを翻訳して表示するかどうか。
{
"object": "conversation_translation",
"conversation_id": "msgOtJ8dvT",
"enabled": true,
"decided": true,
"source_language": "es",
"language": "en",
"shown": true
}翻訳の設定を取得
会話が翻訳されているかどうかと、翻訳先の言語を返します。
パスパラメーター
- conversation_idstring必須会話のID。
戻り値
エラー
- キーのアカウントに、このIDの会話はありません。
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
}翻訳の設定を更新
会話の翻訳のオンとオフ、アプリでメッセージを翻訳して表示するかどうかを切り替えます。
パスパラメーター
- conversation_idstring必須会話のID。
ボディパラメーター
- enabledbooleanあなたのメッセージもリードのメッセージも、届くたびに翻訳します。
- shownbooleanアプリでメッセージを翻訳して表示します。
enabledが必要です。 - languagestring翻訳先の言語。デフォルトはGemleadでのあなたの言語で、ない場合は英語です。
enfresitderuptnljazhkoartrhiidplukvithsv
戻り値
更新された会話の翻訳オブジェクト。
エラー
- キーのアカウントに、このIDの会話はありません。
- APIが受け付けない値のパラメーターがあります。
paramにその名前が入ります。 - ボディに、このエンドポイントが受け付けないフィールドがあります。
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
}メッセージを翻訳
会話の最近のメッセージを翻訳します。翻訳がオフの場合は、1件ずつ翻訳します。
パスパラメーター
- conversation_idstring必須会話のID。
ボディパラメーター
- message_idsstringsの配列翻訳するメッセージ。最新20件の中から指定します。翻訳がオンの場合、デフォルトはそのすべてです。
- languagestring翻訳先の言語。デフォルトはGemleadでのあなたの言語で、ない場合は英語です。
enfresitderuptnljazhkoartrhiidplukvithsv
戻り値
conversation_id、languageと、data内に各メッセージのmessage_id、text、translationを含むオブジェクト。
エラー
- キーのアカウントに、このIDの会話はありません。
- APIが受け付けない値のパラメーターがあります。
paramにその名前が入ります。 - 翻訳がオフの状態で、複数のメッセージを指定しました。
- XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
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?"
}
]
}