v1

latestOpenAPI 3.0.3AGPL-3.02026-07-26591738.7 KB
Bots

通过机器人发送消息

通过指定的机器人向目标发送消息。仅支持 API Key 认证。

post/api/v1/platform/bots/{bot_uuid}/send_message

Path parameters

bot_uuidstring uuid required

Request body

target_type'person' | 'group' required

目标类型

target_idstring required

目标 ID(用户 ID 或群组 ID)

Example request

{
  "message_chain": [
    {
      "type": "Plain",
      "text": "Hello, World!"
    }
  ]
}

Response

发送成功

codeinteger

Example response

{
  "data": {
    "sent": true
  }
}