メインコンテンツへスキップ
POST
/
api
/
v1
/
platform
/
bots
/
{bot_uuid}
/
send_message
curl --request POST \
  --url http://localhost:5300/api/v1/platform/bots/{bot_uuid}/send_message \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "target_type": "group",
  "target_id": "123456789",
  "message_chain": [
    {
      "type": "Plain",
      "text": "Hello, World!"
    }
  ]
}
'
{
  "code": 0,
  "msg": "ok",
  "data": {
    "sent": true
  }
}

承認

X-API-Key
string
header
必須

API Key authentication using X-API-Key header. Example: X-API-Key: lbk_your_api_key_here

パスパラメータ

bot_uuid
string
必須

Bot UUID

ボディ

application/json
target_type
enum<string>
必須

Target type

利用可能なオプション:
person,
group
target_id
string
必須

Target ID (user ID or group ID)

message_chain
object[]
必須

Message chain (array of MessageComponent)

レスポンス

Message sent successfully

code
integer
:

0

msg
string
:

"ok"

data
object