Skip to content

Chat

Conversations and messages on every channel: read, search, send, recall, react, pin, mark as read. · 44 endpoints

List conversations, most recent first

GET/api/v1/accounts/{accountId}/conversationsScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID.
limit
query · optional
integer
≥ 1 · ≤ 200 · default 50
Maximum number of records (1–200)
offset
query · optional
integer
≥ 0 · default 0
Skip the first N records
search
query · optional
string
max 200
Search by name/phone number
unread_only
query · optional
boolean
folder
query · optional
"all" | "main" | "others"
default "all"
Zalo: main inbox / others

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations" \
  -H "Authorization: Bearer dpk_xxx"

Get a conversation with its labels and pin status

GET/api/v1/accounts/{accountId}/conversations/{threadId}Scope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}" \
  -H "Authorization: Bearer dpk_xxx"

Pin, mute, set a nickname (in Deplao)

PATCH/api/v1/accounts/{accountId}/conversations/{threadId}Scope: chat:manage

Flags stored in Deplao, as in the UI: local pin (db:setLocalPinnedConversation), mute (db:setContactFlags), nickname (db:setContactAlias).

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

pinned
optional
boolean
muted
optional
boolean
mute_until
optional
integer
≥ 0
Epoch ms; 0 = indefinitely
alias
optional
string
max 100

Example request

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"pinned":false,"muted":false,"mute_until":0}'

Delete the conversation (all its messages in Deplao; for Zalo, also deleted on the server)

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}Scope: chat:manage

Cannot be undone: ?confirm=true is required. Same as the "Delete conversation" menu item (Xóa hội thoại): for Zalo it calls zalo:deleteChat with the last message, then deletes the conversation from the DB.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)
confirm
query · optional
boolean
default false
Must be true

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}" \
  -H "Authorization: Bearer dpk_xxx"

Total number of unread messages for the account

GET/api/v1/accounts/{accountId}/unread-countScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID.

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/unread-count" \
  -H "Authorization: Bearer dpk_xxx"

Messages of a conversation, newest → oldest, paginated with `before`

GET/api/v1/accounts/{accountId}/conversations/{threadId}/messagesScope: chat:read

Next page: call again with before = pagination.next_before. Messages sharing the same timestamp may repeat at the page boundary: deduplicate by msg_id.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)
limit
query · optional
integer
≥ 1 · ≤ 200 · default 50
before
query · optional
integer
≥ 0
Only messages with timestamp <= before (epoch ms)
topic_id
query · optional
stringTelegram forum topic
type
query · optional
string
max 50
Filter by msg_type (e.g. photo, file)

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages" \
  -H "Authorization: Bearer dpk_xxx"

Send a message: text, file/photo/video, sticker, link (all channels)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messagesScope: chat:send

Sends exactly as if you clicked Send in the app (same IPC handler, same send queue). Order: attachments → sticker → link → text.

Attachments do NOT accept local file paths: use upload_id (POST /media/uploads), library_uuid or a public url. Zalo videos go through the getVideoMeta → uploadVideoThumb → uploadVideoFile → sendVideo chain, just like the UI. Supports the Idempotency-Key header so you can safely resend after a dropped connection.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

thread_type
optional
"user" | "group"Empty = looked up from the conversation
text
optional
string
max 10000
attachments
optional
object[]
max 10 items
└upload_id
optional
stringID from POST /media/uploads
└library_uuid
optional
stringUUID of an item in the media library
└url
optional
string (uri)Public http/https link; the server downloads it itself (≤ the upload limit)
└kind
optional
"image" | "video" | "audio" | "file"Empty = detected from the file extension
└caption
optional
string
max 2000
sticker_id
optional
string | integer
link
optional
object
└url
required
string (uri)
└text
optional
string
max 2000
quote_msg_id
optional
stringReply to this message
mentions
optional
object[]
max 50 items
└user_id
required
string
max 200
└offset
required
integer
≥ 0
└length
required
integer
≥ 1

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"text":"Đơn #2291 đã giao, cảm ơn anh!","attachments":[{"upload_id":"upl_8f1c..."}]}'

Example response

json
{
  "success": true,
  "data": {
    "channel": "zalo",
    "thread_id": "8899001122",
    "sent": [
      {
        "type": "file",
        "msg_id": "7712",
        "cli_msg_id": null
      },
      {
        "type": "text",
        "msg_id": "7713",
        "cli_msg_id": "1760000000123"
      }
    ]
  },
  "request_id": "3f0c0b6e-6d0a-4b8e-9d1a-1d2f3a4b5c6d"
}

Get a message

GET/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}Scope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}" \
  -H "Authorization: Bearer dpk_xxx"

Edit the text of a sent message (Facebook, Telegram)

PATCH/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}Scope: chat:send

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Request body (JSON)

text
required
string
max 10000

Example request

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"text":"string"}'

Delete a message on your side only

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}Scope: chat:manage

Zalo: zalo:deleteMessage (onlyMe), then marks it in the DB as the UI does. Other channels: only removed from Deplao's DB.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}" \
  -H "Authorization: Bearer dpk_xxx"

Messages around a message (to reopen its context)

GET/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/aroundScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)
limit
query · optional
integer
≥ 1 · ≤ 100 · default 30

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/around" \
  -H "Authorization: Bearer dpk_xxx"

Search messages by content (full-text)

GET/api/v1/accounts/{accountId}/messages/searchScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID.
q
query · required
string
max 200
Keyword
thread_id
query · optional
stringOnly within one conversation
limit
query · optional
integer
≥ 1 · ≤ 200 · default 50

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/messages/search" \
  -H "Authorization: Bearer dpk_xxx"

Photos/videos, files or links shared in the conversation

GET/api/v1/accounts/{accountId}/conversations/{threadId}/mediaScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)
kind
query · optional
"media" | "file" | "link"
default "media"
limit
query · optional
integer
≥ 1 · ≤ 200 · default 50
Maximum number of records (1–200)
offset
query · optional
integer
≥ 0 · default 0
Skip the first N records

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/media" \
  -H "Authorization: Bearer dpk_xxx"

Forward a message to other conversations (same account)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/forwardScope: chat:send

Supports text, photos, videos and files (re-sent from the local file, as in the UI) and native Facebook/Telegram forwarding. Other types return 422.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Request body (JSON)

targets
required
object[]
max 20 items
└thread_id
required
string
max 200
└thread_type
optional
"user" | "group"
default "user"
user = 1-1 chat, group = group chat

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/forward" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"targets":[]}'

Add a reaction (emoji or a Zalo code such as HEART, LIKE)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/reactionsScope: chat:send

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Request body (JSON)

emoji
required
string
max 32

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/reactions" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"emoji":"string"}'

Remove your reaction

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/reactionsScope: chat:send

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/reactions" \
  -H "Authorization: Bearer dpk_xxx"

Recall (unsend) a message for everyone, then mark it as recalled in the DB

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/recallScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/recall" \
  -H "Authorization: Bearer dpk_xxx"

Pin a message in the conversation

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/pinScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/pin" \
  -H "Authorization: Bearer dpk_xxx"

Unpin a message

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/pinScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID
msgId
path · required
string
max 200
Message ID (msg_id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/{msgId}/pin" \
  -H "Authorization: Bearer dpk_xxx"

Pinned messages of the conversation

GET/api/v1/accounts/{accountId}/conversations/{threadId}/pinned-messagesScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/pinned-messages" \
  -H "Authorization: Bearer dpk_xxx"

Mark as read (DB + reports "seen" to the channel)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/readScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/read" \
  -H "Authorization: Bearer dpk_xxx"

Show the "typing" indicator

POST/api/v1/accounts/{accountId}/conversations/{threadId}/typingScope: chat:send

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

thread_type
optional
"user" | "group"user = 1-1 chat, group = group chat

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/typing" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"thread_type":"user"}'

Draft being composed

GET/api/v1/accounts/{accountId}/conversations/{threadId}/draftScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/draft" \
  -H "Authorization: Bearer dpk_xxx"

Save a draft (shown in the app's composer)

PUT/api/v1/accounts/{accountId}/conversations/{threadId}/draftScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

content
required
string
max 10000

Example request

bash
curl -X PUT "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/draft" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"content":"string"}'

Delete the draft

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/draftScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/draft" \
  -H "Authorization: Bearer dpk_xxx"

Mark as unread (synced to Zalo)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/unreadScope: chat:manage

Same as the "Mark as unread" menu item (Đánh dấu chưa đọc): for Zalo, sets the unread mark on the server (zalo:addUnreadMark). Remove the mark with DELETE …/unread.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/unread" \
  -H "Authorization: Bearer dpk_xxx"

Clear the unread mark (marks as read + removes the mark on Zalo)

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/unreadScope: chat:manage

Same as the "Mark as read" menu item (Đánh dấu đã đọc): marks as read like POST …/read; for Zalo, also removes the unread mark on the server (zalo:removeUnreadMark).

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/unread" \
  -H "Authorization: Bearer dpk_xxx"

Pin the conversation (on the channel, if the channel supports it)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/pinScope: chat:manage

Same as the "Pin conversation" menu item (Ghim hội thoại): Zalo/Telegram pin on the server (visible on every device); on channels without support it is pinned in Deplao. where tells you where it was pinned.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/pin" \
  -H "Authorization: Bearer dpk_xxx"

Unpin the conversation

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/pinScope: chat:manage

Same as the "Pin conversation" menu item (Ghim hội thoại): Zalo/Telegram pin on the server (visible on every device); on channels without support it is pinned in Deplao. where tells you where it was pinned.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/pin" \
  -H "Authorization: Bearer dpk_xxx"

Mute notifications (stored in Deplao + synced to Zalo/Telegram)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/muteScope: chat:manage

until = expiry time in epoch ms; empty or 0 = indefinitely. synced = whether it was synced to the channel (if the channel doesn't support it or there is a network error, it is still muted in Deplao).

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

until
optional
integer
≥ 0 · default 0

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/mute" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"until":0}'

Unmute notifications

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/muteScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/mute" \
  -H "Authorization: Bearer dpk_xxx"

Move to "Others (archive)" ("Khác (lưu trữ)"): mutes notifications; archives on Telegram

POST/api/v1/accounts/{accountId}/conversations/{threadId}/othersScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/others" \
  -H "Authorization: Bearer dpk_xxx"

Move back to the main list (unmutes notifications)

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/othersScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/others" \
  -H "Authorization: Bearer dpk_xxx"

Load older messages from the channel's server into Deplao

POST/api/v1/accounts/{accountId}/conversations/{threadId}/history/syncScope: chat:read

Saved to the DB; read them with GET …/messages. Telegram: set before_msg_id to the oldest msg_id you have to get an older page. Facebook: pass the previous call's next_cursor as before_cursor. Zalo: groups only (Zalo doesn't allow loading 1-1 chat history).

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

limit
optional
integer
≥ 1 · ≤ 200 · default 50
before_msg_id
optional
string
max 64
before_cursor
optional
string
max 500
topic_id
optional
string
max 64
Telegram forum topic

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/history/sync" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"limit":50,"before_msg_id":"string","before_cursor":"string"}'

All drafts of the account (most recently edited first)

GET/api/v1/accounts/{accountId}/draftsScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID.

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/drafts" \
  -H "Authorization: Bearer dpk_xxx"

Send a contact card (Zalo: by user_id; Telegram bot: by phone number)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messages/contact-cardScope: chat:send

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

user_id
optional
string
max 200
Zalo: ID of the contact being shared
phone
optional
string
max 30
Zalo: optional; Telegram bot: required
name
optional
string
max 100
Telegram bot: display name (required)
thread_type
optional
"user" | "group"user = 1-1 chat, group = group chat
quote_msg_id
optional
string

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/contact-card" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"8412345678901234567","phone":"0912345678"}'

Send a bank card (Zalo), a saved card or details entered directly

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messages/bank-cardScope: chat:send

Pass bank_card_id (from GET /accounts/{accountId}/bank-cards) or all of bin_bank, account_number, account_name.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

bank_card_id
optional
integer
≥ 1
bin_bank
optional
integer
≥ 100000 · ≤ 999999
Bank BIN code (6 digits)
account_number
optional
string
max 40
account_name
optional
string
max 100
thread_type
optional
"user" | "group"user = 1-1 chat, group = group chat

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/bank-card" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"bin_bank":970436,"account_number":"0011001234567","account_name":"NGUYEN VAN A"}'

Send a voice message (Zalo, Telegram bot)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/messages/voiceScope: chat:send

An audio file (m4a/mp3/ogg…) via upload_id, library_uuid or url. Zalo: uploaded, then sent as a voice recording like the microphone button in the app. Other channels: send the audio file with POST …/messages.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

upload_id
optional
stringID from POST /media/uploads
library_uuid
optional
stringUUID of an item in the media library
url
optional
string (uri)Public http/https link; the server downloads it itself

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/messages/voice" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"upload_id":"string","library_uuid":"string","url":"https://example.com/file.jpg"}'

Reminders in the conversation (Zalo)

GET/api/v1/accounts/{accountId}/conversations/{threadId}/remindersScope: chat:read

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)
limit
query · optional
integer
≥ 1 · ≤ 50 · default 20

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/reminders" \
  -H "Authorization: Bearer dpk_xxx"

Create a reminder (Zalo)

POST/api/v1/accounts/{accountId}/conversations/{threadId}/remindersScope: chat:manage

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

title
required
string
max 200
start_time
required
integer
≥ 0
Epoch ms, must be in the future
repeat
optional
"none" | "daily" | "weekly" | "monthly"
default "none"
emoji
optional
string
max 16 · default "⏰"

Example request

bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/reminders" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"title":"Gọi lại cho khách","start_time":1767225600000,"repeat":"none"}'

Update a reminder (Zalo)

PATCH/api/v1/accounts/{accountId}/conversations/{threadId}/reminders/{reminderId}Scope: chat:manage

Parameters

accountId
path · required
string
max 200
threadId
path · required
string
max 200
reminderId
path · required
string
max 200

Request body (JSON)

title
required
string
max 200
start_time
required
integer
≥ 0
repeat
optional
"none" | "daily" | "weekly" | "monthly"
default "none"
emoji
optional
string
max 16 · default "⏰"

Example request

bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/reminders/{reminderId}" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"title":"string","start_time":0,"repeat":"none"}'

Delete a reminder (Zalo)

DELETE/api/v1/accounts/{accountId}/conversations/{threadId}/reminders/{reminderId}Scope: chat:manage

Parameters

accountId
path · required
string
max 200
threadId
path · required
string
max 200
reminderId
path · required
string
max 200

Example request

bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/reminders/{reminderId}" \
  -H "Authorization: Bearer dpk_xxx"

The conversation's auto-delete messages setting on Zalo

GET/api/v1/accounts/{accountId}/conversations/{threadId}/auto-deleteScope: chat:read

Read back from Zalo (Zalo doesn't report changes made on the phone). ttl_ms (ms): 0 = Off, 86400000 = 1 day, 604800000 = 7 days, 1209600000 = 14 days. Zalo deletes the messages on Zalo devices; Deplao keeps the messages it has saved.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Example request

bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/auto-delete" \
  -H "Authorization: Bearer dpk_xxx"

Turn auto-delete messages on / off on Zalo

PUT/api/v1/accounts/{accountId}/conversations/{threadId}/auto-deleteScope: chat:manage

Same as the "Auto-delete messages" item (Tự xoá tin nhắn) in the conversation details. ttl_ms (ms): 0 = Off, 86400000 = 1 day, 604800000 = 7 days, 1209600000 = 14 days. Zalo deletes the messages on Zalo devices; Deplao keeps the messages it has saved. A group may allow only the owner / deputies to change it.

Parameters

accountId
path · required
string
max 200
Account ID
threadId
path · required
string
max 200
Conversation ID (the channel's user id or group id)

Request body (JSON)

ttl_ms
required
integer
≥ 0
0 = off; 86400000 = 1 day; 604800000 = 7 days; 1209600000 = 14 days
thread_type
optional
"user" | "group"
default "user"
user = 1-1 chat, group = group chat

Example request

bash
curl -X PUT "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/auto-delete" \
  -H "Authorization: Bearer dpk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"ttl_ms":0,"thread_type":"user"}'