Media
Bots can send photos and documents with optional captions.
Buko does not accept remote media URLs. Your agent must upload bytes using multipart/form-data. This avoids SSRF risk and keeps media retention under Buko's normal chat storage policy.
Limits
| Method | Field | Max size |
|---|---|---|
sendPhoto | photo | 20 MB |
sendDocument | document | 50 MB |
Captions can be up to 5000 characters.
sendPhoto
POST https://ims.buko.app/bot/sendPhoto
Multipart fields:
| Field | Required | Description |
|---|---|---|
chat_id | yes | Target Buko space_id. |
photo | yes | Image file. Must have an image MIME type. |
caption | no | Optional caption. |
reply_to_message_id | no | Message seq in the same chat. |
Example:
curl -sS https://ims.buko.app/bot/sendPhoto \
-X POST \
-H "Authorization: Bot $BUKO_BOT_TOKEN" \
-F "chat_id=spc_abc123" \
-F "caption=Here is the chart." \
-F "photo=@./chart.png;type=image/png"
Response:
{
"ok": true,
"result": {
"message_id": "44",
"chat": { "id": "spc_abc123", "type": "private" },
"date": 1783000000,
"caption": "Here is the chart.",
"photo": [
{
"file_id": "media/spc_abc123/...",
"mime_type": "image/png",
"file_size": 12345
}
]
}
}
sendDocument
POST https://ims.buko.app/bot/sendDocument
Multipart fields:
| Field | Required | Description |
|---|---|---|
chat_id | yes | Target Buko space_id. |
document | yes | File bytes. |
caption | no | Optional caption. |
reply_to_message_id | no | Message seq in the same chat. |
Example:
curl -sS https://ims.buko.app/bot/sendDocument \
-X POST \
-H "Authorization: Bot $BUKO_BOT_TOKEN" \
-F "chat_id=spc_abc123" \
-F "caption=Monthly report" \
-F "document=@./report.pdf;type=application/pdf"
Storage behavior
Bot media is stored using the same Buko media pipeline as user media:
- the agent uploads bytes
- Buko commits the media into the target chat
- clients receive a normal media message
- media follows the chat retention policy
The client never needs to know about temporary upload keys.