API

Chat write

Update chat profile and pins; usually requires admin.

Auth: Authorization: Bearer sbot_…

POST/api/v1/bots/setChatTitle
Bot Token

setChatTitle

Change group title; bot must be owner / admin.

  • 必填:chat_idtitle (1..128)
  • 失败 403 时提示机器人需先成为群主或群管理员
POST/api/v1/bots/setChatDescription
Bot Token

setChatDescription

Change group description; bot must be owner / admin.

  • Required:chat_iddescription (≤512)
POST/api/v1/bots/setChatPhoto
Bot Token

setChatPhoto

Change group photo URL; bot must be owner / admin.

  • Required:chat_idphoto (公开可访问的图片 URL)
  • 可改用先 /files/upload-credentials + /files/completeobjectUrl 再传
POST/api/v1/bots/pinChatMessage
Bot Token

pinChatMessage

Pin a message in chat; writes `Conversation.pinnedMessageId`。

  • Required:chat_idmessage_id
  • Must be owner / admin in group; both can pin in private chat by default
POST/api/v1/bots/unpinChatMessage
Bot Token

unpinChatMessage

Unpin a single message.

  • Required: chat_id
  • Optional: message_id (if set, must match the current pin or 400; omit to clear the pin)
POST/api/v1/bots/unpinAllChatMessages
Bot Token

unpinAllChatMessages

Unpin all messages in chat.

  • Required:chat_id