Buko Docs

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

MethodFieldMax size
sendPhotophoto20 MB
sendDocumentdocument50 MB

Captions can be up to 5000 characters.

sendPhoto

POST https://ims.buko.app/bot/sendPhoto

Multipart fields:

FieldRequiredDescription
chat_idyesTarget Buko space_id.
photoyesImage file. Must have an image MIME type.
captionnoOptional caption.
reply_to_message_idnoMessage 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:

FieldRequiredDescription
chat_idyesTarget Buko space_id.
documentyesFile bytes.
captionnoOptional caption.
reply_to_message_idnoMessage 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 client never needs to know about temporary upload keys.