APIリファレンス

会話

会話とは、Xでの1人のリードとのDMスレッドで、そのIDはリードのIDと同じです。スレッドのすべてのメッセージを読み取り、まとめて一覧にし、あなたのXアカウントから返信し、会話ボードを整理できます。新しい返信はreply.received Webhookでも届きます。

会話オブジェクト

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"
  }
}

会話を一覧表示

GET/v1/conversationsreadスコープMCPlist_conversations

会話を、最後のメッセージが新しいものから順に返します。

クエリパラメーター

  • unreadboolean
    trueにすると、未読の会話のみを返します。
  • personastring
    このペルソナIDのリードとの会話のみ。
  • include_messagesboolean
    trueにすると、各会話にすべてのメッセージが古い順で含まれ、historyも付きます。ページが重くなるため、limitは25以下にしてください。
  • limitinteger
    返すオブジェクトの数。1から100まで指定でき、デフォルトは25です。
  • cursorstring
    次のページを取得するための、前のページのnext_cursor。ページネーションを参照してください。

戻り値

会話オブジェクトのリスト。messagesはinclude_messagesがtrueの場合のみ含まれます。

エラー

  • APIが受け付けない値のパラメーターがあります。paramにその名前が入ります。
GET/v1/conversations
curl -G https://gemlead.ai/api/v1/conversations \
  -H "Authorization: Bearer $GEMLEAD_API_KEY" \
  -d unread=true
レスポンス200
{
  "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"
}

会話を取得

GET/v1/conversations/:idreadスコープMCPget_conversation

会話を1件返します。すべてのメッセージを古い順に含みます。

パスパラメーター

  • idstring必須
    会話のID。

戻り値

messagesとhistoryを含む会話オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
GET/v1/conversations/:id
curl https://gemlead.ai/api/v1/conversations/msgOtJ8dvT \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "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"
    }
  ]
}

既読にする

POST/v1/conversations/:conversation_id/mark_readwriteスコープMCPupdate_conversation

Gemleadで会話を既読にし、Xでも既読通知を付けます。

パスパラメーター

  • conversation_idstring必須
    会話のID。

戻り値

会話オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
POST/v1/conversations/:conversation_id/mark_read
curl -X POST \
  https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/mark_read \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "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"
  }
}

未読にする

POST/v1/conversations/:conversation_id/mark_unreadwriteスコープMCPupdate_conversation

Gemleadで会話を未読にします。

パスパラメーター

  • conversation_idstring必須
    会話のID。

戻り値

会話オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
POST/v1/conversations/:conversation_id/mark_unread
curl -X POST \
  https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/mark_unread \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "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"
  }
}

会話を移動

POST/v1/conversations/:conversation_id/movewriteスコープMCPupdate_conversation

会話を、会話ボードの別の列に移動します。

パスパラメーター

  • conversation_idstring必須
    会話のID。

ボディパラメーター

戻り値

会話オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • アカウントのボードに、このIDの列はありません。
  • 必須パラメーターがありません。paramにその名前が入ります。
POST/v1/conversations/:conversation_id/move
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"
  }'
レスポンス200
{
  "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"
  }
}

会話をピン留め

POST/v1/conversations/:conversation_id/pinwriteスコープMCPupdate_conversation

Xの受信トレイで会話をピン留めします。

パスパラメーター

  • conversation_idstring必須
    会話のID。

戻り値

会話オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
POST/v1/conversations/:conversation_id/pin
curl -X POST \
  https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/pin \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "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"
  }
}

会話のピン留めを解除

POST/v1/conversations/:conversation_id/unpinwriteスコープMCPupdate_conversation

Xの受信トレイで会話のピン留めを解除します。

パスパラメーター

  • conversation_idstring必須
    会話のID。

戻り値

会話オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
POST/v1/conversations/:conversation_id/unpin
curl -X POST \
  https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/unpin \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "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/v1/conversations/:conversation_idwriteスコープMCPdelete_conversation

Gemleadと、あなたのXの受信トレイから会話を削除します。そのリードはすべてのキャンペーンで停止します。この操作は元に戻せません。

パスパラメーター

  • conversation_idstring必須
    会話のID。

戻り値

会話のidと、trueに設定されたdeletedを含むオブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
DELETE/v1/conversations/:conversation_id
curl -X DELETE \
  https://gemlead.ai/api/v1/conversations/msgOtJ8dvT \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "id": "msgOtJ8dvT",
  "object": "conversation",
  "deleted": true
}

メッセージオブジェクト

会話内の1件のDM。あなたまたはリードが送信したものです。

属性

  • idstring
    XでのメッセージのID。
  • objectstring
    常にmessageです。
  • directionstring
    リードが書いた場合はinbound、あなたが書いた場合はoutbound。
    inboundoutbound
  • textstring
    メッセージの本文。
  • created_atstring
    送信された日時。ISO 8601形式です。
  • mediaobjectsの配列
    メッセージの添付ファイル。それぞれtypeとurlを含みます。Xの画像はGemleadのリンク経由で提供されます。
  • reactionsobjectsの配列
    メッセージへの絵文字リアクション。古い順で、人と絵文字の組み合わせごとに1件です。
  • encryptedboolean
    Gemleadがまだ読み取れないX Chatのメッセージの場合はtrue。X Chatのパスコードでロックが解除されるまで、textとmediaは空のままです。
  • 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
}

メッセージを一覧表示

GET/v1/conversations/:conversation_id/messagesreadスコープMCPlist_messages

Xから取得した会話の全履歴を、新しい順に1ページずつ返します。

パスパラメーター

  • conversation_idstring必須
    会話のID。

クエリパラメーター

  • limitinteger
    返すメッセージの数。1から50まで指定でき、デフォルトは25です。
  • cursorstring
    さらに古いメッセージを取得するための、前のページのnext_cursor。

戻り値

メッセージオブジェクトのリスト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • APIが受け付けない値のパラメーターがあります。paramにその名前が入ります。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
GET/v1/conversations/:conversation_id/messages
curl -G \
  https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages \
  -H "Authorization: Bearer $GEMLEAD_API_KEY" \
  -d limit=50
レスポンス200
{
  "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"
}

メッセージを送信

POST/v1/conversations/:conversation_id/messageswriteスコープMCPsend_message

あなたの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のないボイスメッセージなど、この会話では送れない種類のファイルです。
  • Xが現在このアカウントのDMを制限しています。再開のタイミングはRetry-Afterでわかります。
  • 1分間に10件を超えるDMが送信されました。
  • UTCの今日300件のDMが送信されたか、Xが設定したアカウントの1日の上限に達しました。
  • Xが拒否しました。リードがDMを閉じているか、アカウントをブロックしています。
  • この会話には、まだメッセージを送れるXユーザーがいません。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
POST/v1/conversations/:conversation_id/messages
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?"
  }'
レスポンス200
{
  "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"
}

リアクションを追加

POST/v1/conversations/:conversation_id/messages/:message_id/reactionswriteスコープMCPreact_to_message

あなたのXアカウントから、メッセージに絵文字でリアクションします。

パスパラメーター

  • conversation_idstring必須
    会話のID。
  • message_idstring必須
    メッセージのID。会話の最新20件のうちの1件を指定します。

ボディパラメーター

  • emojistring必須
    ❤️や👍などの絵文字。

戻り値

conversation_id、message_id、emojiを含むオブジェクト。

エラー

  • キーのアカウントに、このIDのメッセージはありません。
  • 必須パラメーターがありません。paramにその名前が入ります。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
POST/v1/conversations/:conversation_id/messages/:message_id/reactions
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": "👍"
  }'
レスポンス200
{
  "object": "reaction",
  "conversation_id": "msgOtJ8dvT",
  "message_id": "1985321409876543210",
  "emoji": "👍"
}

リアクションを削除

DELETE/v1/conversations/:conversation_id/messages/:message_id/reactionswriteスコープMCPreact_to_message

メッセージから自分のリアクションを削除します。

パスパラメーター

  • conversation_idstring必須
    会話のID。
  • message_idstring必須
    メッセージのID。会話の最新20件のうちの1件を指定します。

クエリパラメーター

  • emojistring必須
    削除する絵文字。

戻り値

deletedがtrueに設定されたリアクション。

エラー

  • キーのアカウントに、このIDのメッセージはありません。
  • 必須パラメーターがありません。paramにその名前が入ります。
  • Xアカウントのセッションの有効期限が切れています。アプリで再接続してから、もう一度お試しください。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
DELETE/v1/conversations/:conversation_id/messages/:message_id/reactions
curl -X DELETE \
  "https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages/1985321409876543210/reactions?emoji=%F0%9F%91%8D" \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "object": "reaction",
  "conversation_id": "msgOtJ8dvT",
  "message_id": "1985321409876543210",
  "emoji": "👍",
  "deleted": true
}

メッセージを削除

DELETE/v1/conversations/:conversation_id/messages/:message_idwriteスコープMCPdelete_message

メッセージを自分の側だけで削除します。自分のメッセージで、会話が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分後にもう一度お試しください。
DELETE/v1/conversations/:conversation_id/messages/:message_id
curl -X DELETE \
  "https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/messages/1985329981234567890?for_everyone=true" \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "id": "1985329981234567890",
  "object": "message",
  "conversation_id": "msgOtJ8dvT",
  "deleted": true,
  "for_everyone": true
}

会話の翻訳オブジェクト

会話のメッセージが翻訳されているかどうかと、翻訳先の言語。

属性

  • objectstring
    常にconversation_translationです。
  • conversation_idstring
    会話のID。
  • enabledboolean
    メッセージが届くたびに翻訳されるかどうか。
  • decidedboolean
    Gemleadのデフォルトのままではなく、誰かが手動でオンまたはオフにしたかどうか。
  • source_languagestringまたはnull
    検出されたリードの言語。
  • languagestringまたはnull
    メッセージの翻訳先の言語。
  • shownboolean
    アプリでメッセージを翻訳して表示するかどうか。
会話の翻訳オブジェクト
{
  "object": "conversation_translation",
  "conversation_id": "msgOtJ8dvT",
  "enabled": true,
  "decided": true,
  "source_language": "es",
  "language": "en",
  "shown": true
}

翻訳の設定を取得

GET/v1/conversations/:conversation_id/translationreadスコープMCPupdate_conversation_translation

会話が翻訳されているかどうかと、翻訳先の言語を返します。

パスパラメーター

  • conversation_idstring必須
    会話のID。

戻り値

会話の翻訳オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
GET/v1/conversations/:conversation_id/translation
curl \
  https://gemlead.ai/api/v1/conversations/msgOtJ8dvT/translation \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
レスポンス200
{
  "object": "conversation_translation",
  "conversation_id": "msgOtJ8dvT",
  "enabled": true,
  "decided": true,
  "source_language": "es",
  "language": "en",
  "shown": true
}

翻訳の設定を更新

PATCH/v1/conversations/:conversation_id/translationwriteスコープMCPupdate_conversation_translation

会話の翻訳のオンとオフ、アプリでメッセージを翻訳して表示するかどうかを切り替えます。

パスパラメーター

  • conversation_idstring必須
    会話のID。

ボディパラメーター

  • enabledboolean
    あなたのメッセージもリードのメッセージも、届くたびに翻訳します。
  • shownboolean
    アプリでメッセージを翻訳して表示します。enabledが必要です。
  • languagestring
    翻訳先の言語。デフォルトはGemleadでのあなたの言語で、ない場合は英語です。
    enfresitderuptnljazhkoartrhiidplukvithsv

戻り値

更新された会話の翻訳オブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • APIが受け付けない値のパラメーターがあります。paramにその名前が入ります。
  • ボディに、このエンドポイントが受け付けないフィールドがあります。
PATCH/v1/conversations/:conversation_id/translation
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"
  }'
レスポンス200
{
  "object": "conversation_translation",
  "conversation_id": "msgOtJ8dvT",
  "enabled": true,
  "decided": true,
  "source_language": "es",
  "language": "en",
  "shown": true
}

メッセージを翻訳

POST/v1/conversations/:conversation_id/translatewriteスコープMCPtranslate_messages

会話の最近のメッセージを翻訳します。翻訳がオフの場合は、1件ずつ翻訳します。

パスパラメーター

  • conversation_idstring必須
    会話のID。

ボディパラメーター

  • message_idsstringsの配列
    翻訳するメッセージ。最新20件の中から指定します。翻訳がオンの場合、デフォルトはそのすべてです。
  • languagestring
    翻訳先の言語。デフォルトはGemleadでのあなたの言語で、ない場合は英語です。
    enfresitderuptnljazhkoartrhiidplukvithsv

戻り値

conversation_id、languageと、data内に各メッセージのmessage_id、text、translationを含むオブジェクト。

エラー

  • キーのアカウントに、このIDの会話はありません。
  • APIが受け付けない値のパラメーターがあります。paramにその名前が入ります。
  • 翻訳がオフの状態で、複数のメッセージを指定しました。
  • XまたはGemleadのサービスが応答しませんでした。何も変更されていないので、1分後にもう一度お試しください。
POST/v1/conversations/:conversation_id/translate
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"
  }'
レスポンス200
{
  "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?"
    }
  ]
}