Labels & quick replies
Conversation labels (local), quick replies, stickers. · 30 endpoints
- GET/accounts/{accountId}/labels
- POST/labels
- PATCH/labels/{labelId}
- DELETE/labels/{labelId}
- GET/accounts/{accountId}/conversations/{threadId}/labels
- PUT/accounts/{accountId}/conversations/{threadId}/labels
- POST/accounts/{accountId}/conversations/{threadId}/labels/{labelId}
- DELETE/accounts/{accountId}/conversations/{threadId}/labels/{labelId}
- GET/accounts/{accountId}/zalo-labels
- GET/accounts/{accountId}/quick-messages
- POST/accounts/{accountId}/quick-messages
- DELETE/accounts/{accountId}/quick-messages/{id}
- GET/stickers/recent
- GET/sticker-packs
- GET/sticker-packs/{catId}/stickers
- GET/stickers/search
- GET/accounts/{accountId}/labels/{labelId}/conversations
- POST/accounts/{accountId}/labels/bulk-assign
- PUT/labels/order
- PUT/labels/{labelId}/active
- POST/labels/clone
- POST/accounts/{accountId}/zalo-labels/{labelId}/conversations/{threadId}
- DELETE/accounts/{accountId}/zalo-labels/{labelId}/conversations/{threadId}
- PUT/accounts/{accountId}/quick-messages/order
- PUT/accounts/{accountId}/quick-messages/{id}/active
- POST/accounts/{accountId}/quick-messages/clone
- GET/accounts/{accountId}/zalo-quick-messages
- POST/accounts/{accountId}/zalo-quick-messages
- PATCH/accounts/{accountId}/zalo-quick-messages/{itemId}
- DELETE/accounts/{accountId}/zalo-quick-messages/{itemId}
(Local) labels available to the account
/api/v1/accounts/{accountId}/labelsScope: chat:readParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Example request
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/labels" \
-H "Authorization: Bearer dpk_xxx"Create a label
/api/v1/labelsScope: chat:manageRequest body (JSON)
namerequired | string max 100 | |
coloroptional | string max 20 · default "#3B82F6" | |
text_coloroptional | string max 20 · default "#FFFFFF" | |
emojioptional | string max 16 · default "🏷️" | |
account_idsoptional | string[] max 200 items | Only shown for these accounts; empty = all accounts |
shortcutoptional | string max 20 |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/labels" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string","color":"#3B82F6","text_color":"#FFFFFF"}'Update a label
/api/v1/labels/{labelId}Scope: chat:manageParameters
labelIdpath · required | integer ≥ 1 |
Request body (JSON)
nameoptional | string max 100 | |
coloroptional | string max 20 · default "#3B82F6" | |
text_coloroptional | string max 20 · default "#FFFFFF" | |
emojioptional | string max 16 · default "🏷️" | |
account_idsoptional | string[] max 200 items | Only shown for these accounts; empty = all accounts |
shortcutoptional | string max 20 |
Example request
curl -X PATCH "http://127.0.0.1:9900/api/v1/labels/{labelId}" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string","color":"#3B82F6","text_color":"#FFFFFF"}'Delete a label (removes it from every conversation)
/api/v1/labels/{labelId}Scope: chat:manageParameters
labelIdpath · required | integer ≥ 1 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/labels/{labelId}" \
-H "Authorization: Bearer dpk_xxx"Labels assigned to the conversation
/api/v1/accounts/{accountId}/conversations/{threadId}/labelsScope: chat:readParameters
accountIdpath · required | string max 200 | Account ID |
threadIdpath · required | string max 200 | Conversation ID (the channel's user id or group id) |
Example request
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/labels" \
-H "Authorization: Bearer dpk_xxx"Set the conversation's exact set of labels (assigns missing ones, removes extra ones)
/api/v1/accounts/{accountId}/conversations/{threadId}/labelsScope: chat:manageEach assignment/removal goes through the same handler the UI uses, so "When a label is assigned or removed" (Khi gán hoặc gỡ nhãn) workflows still run.
Parameters
accountIdpath · required | string max 200 | Account ID |
threadIdpath · required | string max 200 | Conversation ID (the channel's user id or group id) |
Request body (JSON)
label_idsrequired | integer[] max 100 items |
Example request
curl -X PUT "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/labels" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"label_ids":[]}'Assign a label to the conversation
/api/v1/accounts/{accountId}/conversations/{threadId}/labels/{labelId}Scope: chat:manageParameters
accountIdpath · required | string max 200 | |
threadIdpath · required | string max 200 | |
labelIdpath · required | integer ≥ 1 |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/labels/{labelId}" \
-H "Authorization: Bearer dpk_xxx"Remove a label from the conversation
/api/v1/accounts/{accountId}/conversations/{threadId}/labels/{labelId}Scope: chat:manageParameters
accountIdpath · required | string max 200 | |
threadIdpath · required | string max 200 | |
labelIdpath · required | integer ≥ 1 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/conversations/{threadId}/labels/{labelId}" \
-H "Authorization: Bearer dpk_xxx"The account's labels on the Zalo server (Zalo only, must be online)
/api/v1/accounts/{accountId}/zalo-labelsScope: chat:readParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Example request
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo-labels" \
-H "Authorization: Bearer dpk_xxx"The account's quick replies (/keyword)
/api/v1/accounts/{accountId}/quick-messagesScope: chat:readParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Example request
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/quick-messages" \
-H "Authorization: Bearer dpk_xxx"Create or update a quick reply (by keyword)
/api/v1/accounts/{accountId}/quick-messagesScope: chat:manageParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Request body (JSON)
keywordrequired | string max 50 | |
titlerequired | string max 5000 | |
mediaoptional | any | Media in the app's own format, kept as is (optional) |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/quick-messages" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"keyword":"string","title":"string","media":null}'Delete a quick reply
/api/v1/accounts/{accountId}/quick-messages/{id}Scope: chat:manageParameters
accountIdpath · required | string max 200 | |
idpath · required | integer ≥ 1 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/quick-messages/{id}" \
-H "Authorization: Bearer dpk_xxx"Recently used stickers
/api/v1/stickers/recentScope: chat:readParameters
limitquery · optional | integer ≥ 1 · ≤ 100 · default 30 |
Example request
curl "http://127.0.0.1:9900/api/v1/stickers/recent" \
-H "Authorization: Bearer dpk_xxx"Saved sticker packs
/api/v1/sticker-packsScope: chat:readExample request
curl "http://127.0.0.1:9900/api/v1/sticker-packs" \
-H "Authorization: Bearer dpk_xxx"Stickers in a pack
/api/v1/sticker-packs/{catId}/stickersScope: chat:readParameters
catIdpath · required | integer |
Example request
curl "http://127.0.0.1:9900/api/v1/sticker-packs/{catId}/stickers" \
-H "Authorization: Bearer dpk_xxx"Sticker IDs by keyword (cached)
/api/v1/stickers/searchScope: chat:readParameters
keywordquery · required | string max 50 |
Example request
curl "http://127.0.0.1:9900/api/v1/stickers/search" \
-H "Authorization: Bearer dpk_xxx"Conversations that have a given label
/api/v1/accounts/{accountId}/labels/{labelId}/conversationsScope: chat:readParameters
accountIdpath · required | string max 200 | |
labelIdpath · required | integer ≥ 1 |
Example request
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/labels/{labelId}/conversations" \
-H "Authorization: Bearer dpk_xxx"Assign several labels to several conversations in one go
/api/v1/accounts/{accountId}/labels/bulk-assignScope: chat:manageOne transaction, like bulk assignment in the app. Unlike assigning labels one at a time, it does not fire "When a label is assigned" (Khi gán nhãn) workflows.
Parameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Request body (JSON)
label_idsrequired | integer[] max 50 items | |
thread_idsrequired | string[] max 1000 items |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/labels/bulk-assign" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"label_ids":[],"thread_ids":[]}'Reorder labels (by an array of ids)
/api/v1/labels/orderScope: chat:manageRequest body (JSON)
label_idsrequired | integer[] max 300 items |
Example request
curl -X PUT "http://127.0.0.1:9900/api/v1/labels/order" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"label_ids":[]}'Show / hide a label
/api/v1/labels/{labelId}/activeScope: chat:manageParameters
labelIdpath · required | integer ≥ 1 |
Request body (JSON)
activerequired | boolean |
Example request
curl -X PUT "http://127.0.0.1:9900/api/v1/labels/{labelId}/active" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"active":false}'Copy this account's set of labels to another account
/api/v1/labels/cloneScope: chat:manageRequest body (JSON)
from_account_idrequired | string max 200 | |
to_account_idrequired | string max 200 |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/labels/clone" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"from_account_id":"string","to_account_id":"string"}'Assign a Zalo label to a conversation (one label per conversation)
/api/v1/accounts/{accountId}/zalo-labels/{labelId}/conversations/{threadId}Scope: chat:manageSynced to Zalo (visible on the phone). Assigning a new label removes the conversation's previous Zalo label, as in the app; "When a label is assigned or removed" (Khi gán hoặc gỡ nhãn) workflows still run.
Parameters
accountIdpath · required | string max 200 | |
labelIdpath · required | integer ≥ 0 | |
threadIdpath · required | string max 200 |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo-labels/{labelId}/conversations/{threadId}" \
-H "Authorization: Bearer dpk_xxx"Remove the Zalo label from a conversation
/api/v1/accounts/{accountId}/zalo-labels/{labelId}/conversations/{threadId}Scope: chat:manageSynced to Zalo (visible on the phone). Assigning a new label removes the conversation's previous Zalo label, as in the app; "When a label is assigned or removed" (Khi gán hoặc gỡ nhãn) workflows still run.
Parameters
accountIdpath · required | string max 200 | |
labelIdpath · required | integer ≥ 0 | |
threadIdpath · required | string max 200 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo-labels/{labelId}/conversations/{threadId}" \
-H "Authorization: Bearer dpk_xxx"Reorder quick replies
/api/v1/accounts/{accountId}/quick-messages/orderScope: chat:manageParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Request body (JSON)
idsrequired | integer[] max 300 items |
Example request
curl -X PUT "http://127.0.0.1:9900/api/v1/accounts/{accountId}/quick-messages/order" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"ids":[]}'Enable / disable a quick reply
/api/v1/accounts/{accountId}/quick-messages/{id}/activeScope: chat:manageParameters
accountIdpath · required | string max 200 | |
idpath · required | integer ≥ 1 |
Request body (JSON)
activerequired | boolean |
Example request
curl -X PUT "http://127.0.0.1:9900/api/v1/accounts/{accountId}/quick-messages/{id}/active" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"active":false}'Copy quick replies to another account
/api/v1/accounts/{accountId}/quick-messages/cloneScope: chat:manageParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Request body (JSON)
to_account_idrequired | string max 200 |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/quick-messages/clone" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"to_account_id":"string"}'Quick replies stored on Zalo (also usable on the phone)
/api/v1/accounts/{accountId}/zalo-quick-messagesScope: chat:readParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Example request
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo-quick-messages" \
-H "Authorization: Bearer dpk_xxx"Create a quick reply on Zalo
/api/v1/accounts/{accountId}/zalo-quick-messagesScope: chat:manageParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Request body (JSON)
keywordrequired | string max 50 | |
titlerequired | string max 5000 |
Example request
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo-quick-messages" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"keyword":"string","title":"string"}'Update a quick reply on Zalo
/api/v1/accounts/{accountId}/zalo-quick-messages/{itemId}Scope: chat:manageParameters
accountIdpath · required | string max 200 | |
itemIdpath · required | integer ≥ 1 |
Request body (JSON)
keywordrequired | string max 50 | |
titlerequired | string max 5000 |
Example request
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo-quick-messages/{itemId}" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"keyword":"string","title":"string"}'Delete a quick reply on Zalo
/api/v1/accounts/{accountId}/zalo-quick-messages/{itemId}Scope: chat:manageParameters
accountIdpath · required | string max 200 | |
itemIdpath · required | integer ≥ 1 |
Example request
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo-quick-messages/{itemId}" \
-H "Authorization: Bearer dpk_xxx"