Methods
All methods use Authorization: Bot <token>.
getMe
POST https://ims.buko.app/bot/getMe
Returns the authenticated bot identity. See Authentication.
sendMessage
POST https://ims.buko.app/bot/sendMessage
Sends a text message to a private bot chat or a group where the bot is a member.
Request:
{
"chat_id": "spc_abc123",
"text": "Hello",
"reply_to_message_id": "42",
"parse_mode": "plain"
}
Fields:
| Field | Required | Description |
|---|---|---|
chat_id | yes | Target Buko space_id. |
text | yes | 1-5000 characters. |
reply_to_message_id | no | Message seq in the same chat. |
parse_mode | no | Only plain is supported now. |
Example:
curl -sS https://ims.buko.app/bot/sendMessage \
-X POST \
-H "Authorization: Bot $BUKO_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "spc_abc123",
"text": "Got it.",
"reply_to_message_id": "42"
}'
Response:
{
"ok": true,
"result": {
"message_id": "43",
"chat": { "id": "spc_abc123", "type": "private" },
"date": 1783000000,
"text": "Got it."
}
}
sendChatAction
POST https://ims.buko.app/bot/sendChatAction
Shows a lightweight activity indicator, such as typing.
Request:
{
"chat_id": "spc_abc123",
"action": "typing"
}
Supported actions:
typingupload_photoupload_documentrecord_voiceupload_voice
Example:
curl -sS https://ims.buko.app/bot/sendChatAction \
-X POST \
-H "Authorization: Bot $BUKO_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"chat_id":"spc_abc123","action":"typing"}'
editMessageText
POST https://ims.buko.app/bot/editMessageText
Edits a text message previously sent by the same bot.
This method is tier-gated. Free bots cannot use it. Even when enabled, Buko checks ownership inside the chat before applying the edit.
Request:
{
"chat_id": "spc_abc123",
"message_id": "43",
"text": "Updated text",
"parse_mode": "plain"
}
Example:
curl -sS https://ims.buko.app/bot/editMessageText \
-X POST \
-H "Authorization: Bot $BUKO_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "spc_abc123",
"message_id": "43",
"text": "Updated text"
}'
deleteMessage
POST https://ims.buko.app/bot/deleteMessage
Deletes a message previously sent by the same bot.
This method is tier-gated. Free bots cannot use it. The bot cannot delete human messages or messages from other bots.
Request:
{
"chat_id": "spc_abc123",
"message_id": "43"
}
Example:
curl -sS https://ims.buko.app/bot/deleteMessage \
-X POST \
-H "Authorization: Bot $BUKO_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"chat_id":"spc_abc123","message_id":"43"}'
Permission rules
For private chats:
- the user must have started the bot
- neither side can have blocked the other
- the bot must still be a member of the DM space
For groups:
- the bot must be a group member
- the group must not be dissolved
- group permissions must allow bot sending
Bot messages go through the same SpaceDO injection path as human messages.