Skip to content

Sending messages & files

POST /api/v1/accounts/{accountId}/conversations/{threadId}/messages

Field Type Notes
text string Text (≤ 10000 characters)
attachments array Up to 10 files, each with one of: upload_id, library_uuid, url
sticker_id string/number Zalo, Telegram
link {url, text} Zalo sends a link card; other channels send it as text
quote_msg_id string Reply to a message
mentions [{user_id, offset, length}] Tag members (Zalo, Telegram)
thread_type user/group Empty = looked up automatically

Send order: files → sticker → link → text. The response lists every message sent, with its msg_id when the channel returns one.

Upload the file first

bash
# Raw body (recommended for large files, written straight to disk)
curl -X POST -H "Authorization: Bearer dpk_xxx" -H "X-Filename: bao-gia.pdf" \
  --data-binary @bao-gia.pdf http://127.0.0.1:9900/api/v1/media/uploads

# multipart/form-data
curl -X POST -H "Authorization: Bearer dpk_xxx" -F "file=@anh.jpg" http://127.0.0.1:9900/api/v1/media/uploads

The result contains an upload_id (expires after 24 hours; only the key that uploaded it can use it).

Sending with attachments

json
{ "text": "Here is your quote", "attachments": [{ "upload_id": "upl_..." }] }
  • url: Deplao downloads the file from a public link itself (links into the local network are blocked).
  • library_uuid: a file in the account's Media library (Thư viện media).
  • Zalo videos are sent as videos that play right away (not as files).

Per-channel notes

Action Zalo Facebook Telegram
Text, photos, files ✓ ✓ ✓
Video ✓ (real video) ✓ ✓
Sticker ✓ - ✓
Edit message - ✓ ✓
Recall ✓ ✓ ✓ (delete)
Reaction ✓ (emoji or codes HEART, LIKE…) ✓ ✓
Forward text, photos, videos, files + native forward + native forward

Didn't find your answer?

Message us on Telegram