Browse documentation

API

Orchestration

Virtual member orchestration APIs.

Auth: Authorization: Bearer sbot_…

GET/api/v1/bots/listChatVirtualMembers
Bot Token

listChatVirtualMemberslistChatVirtualMembers (Value-added Capability)

List dispatchable members in group. Requires bot to be active member; not open by default, apply via support.

  • Required query:chat_id(群会话 ID)
  • Optional query: limit (1-200, default 50), offset (0-1000, default 0), cursor; use cursor for deep pages, without a nonzero offset
  • Returns:{ items: [{ virtual_user_id, name, username, avatar, joined_at }], pagination: { total, limit, offset, has_more, next_cursor, roster_epoch, roster_version } }
  • total is the display count, not the currently eligible count. Follow has_more / next_cursor even when items is empty
  • 403: current bot or group authorization is invalid; 409: roster unavailable or cursor version expired; restart from the first page
POST/api/v1/bots/simulateSendMessage
Bot Token

simulateSendMessagesimulateSendMessage (Value-added Capability)

Send text, photo, document, audio, video, or location messages in a group as a selected dispatchable member. Access requirements match `listChatVirtualMembers`; current eligibility is checked again before the message commits.

  • Required for every message: chat_id and virtual_user_id from listChatVirtualMembers
  • Message type: optional type, default text; accepts text, photo / image, document / file, audio, video, and location
  • Text: text is required and must contain 1-1000 characters
  • Media: file_id is required; optional caption is limited to 1000 characters; use duration, width, height, performer, title, and thumbnail_url where applicable
  • Location: latitude (-90..90) and longitude (-180..180) are required; optional name (≤200) and address (≤500)
  • Optional for all types: reply_to_message_id (≤128); obtain media file_id through upload credentials and the complete endpoint first
  • Returns: the same message object shape as the corresponding send endpoint
  • 400: invalid fields; 403: grant revoked, bot or identity removed, disabled, or muted; 409: roster unavailable. Listing is not a send authorization; success is returned after message commit