Skip to content

Zalo — Messages ​

Send text message — zalo.send_text ​

Send a text message to a user, optionally quoting an earlier message. Free inside 48 hours of the user's last interaction, paid after that. The user must have interacted with the OA in the last 7 days.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
user_idstringyesZalo user ID of the OA follower.
textstringyesMessage text, up to 2000 characters. Max length 2000.
quote_message_idstringnomessage_id to quote and reply to.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the send: message_id, user_id, sent_time and the quota used.
data.message_idstringID of the message Zalo accepted.
data.user_idstringZalo user ID of the recipient.
data.sent_timestringWhen Zalo sent the message, Unix time in milliseconds, as a string.
data.quotaobjectThe quota that paid for the message. Missing when the message was charged instead of using a quota.
data.quota.quota_typestringWhich quota paid for the message: reply, welcome_msg, sub_quota, purchase_quota or reward_quota. The reference example for reply omits it.
data.quota.remainstringMessages left in this quota, as a string. Only for reply, welcome_msg and sub_quota. For reply it is always "8" from 1 Jan 2026 and is no longer returned after 1 Mar 2026.
data.quota.totalstringSize of this quota, as a string. Only for reply, welcome_msg and sub_quota. No longer returned for reply after 1 Mar 2026.
data.quota.expired_datestringDate the free package quota expires, dd/MM/yyyy. Only for sub_quota.
data.quota.owner_typestringWho owns the purchased or reward quota: OA or App. Only for purchase_quota and reward_quota.
data.quota.owner_idstringID of the OA or App that owns the quota. Only for purchase_quota and reward_quota.

Send image message — zalo.send_image ​

Send one image or GIF, from a public url or an uploaded attachment_id (exactly one of them). Free inside 48 hours of the user's last interaction, paid after that. The user must have interacted with the OA in the last 7 days.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
user_idstringyesZalo user ID of the OA follower.
media_typestringnoOne of: image, gif. Default image.
urlstringnoHTTPS URL of the image (jpg/png up to 1 MB). Pattern: ^https://.
attachment_idstringnoattachment_id from an upload action.
widthintegernoRequired for gif. Min 1.
heightintegernoRequired for gif. Min 1.
textstringnoOptional caption. Max length 2000.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the send: message_id, user_id, sent_time and the quota used.
data.message_idstringID of the message Zalo accepted.
data.user_idstringZalo user ID of the recipient.
data.sent_timestringWhen Zalo sent the message, Unix time in milliseconds, as a string.
data.quotaobjectThe quota that paid for the message. Missing when the message was charged instead of using a quota.
data.quota.quota_typestringWhich quota paid for the message: reply, welcome_msg, sub_quota, purchase_quota or reward_quota. The reference example for reply omits it.
data.quota.remainstringMessages left in this quota, as a string. Only for reply, welcome_msg and sub_quota. For reply it is always "8" from 1 Jan 2026 and is no longer returned after 1 Mar 2026.
data.quota.totalstringSize of this quota, as a string. Only for reply, welcome_msg and sub_quota. No longer returned for reply after 1 Mar 2026.
data.quota.expired_datestringDate the free package quota expires, dd/MM/yyyy. Only for sub_quota.
data.quota.owner_typestringWho owns the purchased or reward quota: OA or App. Only for purchase_quota and reward_quota.
data.quota.owner_idstringID of the OA or App that owns the quota. Only for purchase_quota and reward_quota.

Send sticker — zalo.send_sticker ​

Send a sticker. Sticker IDs come from stickers.zaloapp.com. Free inside 48 hours of the user's last interaction, paid after that. The user must have interacted with the OA in the last 7 days.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
user_idstringyesZalo user ID of the OA follower.
attachment_idstringyesSticker ID.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the send: message_id, user_id, sent_time and the quota used.
data.message_idstringID of the message Zalo accepted.
data.user_idstringZalo user ID of the recipient.
data.sent_timestringWhen Zalo sent the message, Unix time in milliseconds, as a string.
data.quotaobjectThe quota that paid for the message. Missing when the message was charged instead of using a quota.
data.quota.quota_typestringWhich quota paid for the message: reply, welcome_msg, sub_quota, purchase_quota or reward_quota. The reference example for reply omits it.
data.quota.remainstringMessages left in this quota, as a string. Only for reply, welcome_msg and sub_quota. For reply it is always "8" from 1 Jan 2026 and is no longer returned after 1 Mar 2026.
data.quota.totalstringSize of this quota, as a string. Only for reply, welcome_msg and sub_quota. No longer returned for reply after 1 Mar 2026.
data.quota.expired_datestringDate the free package quota expires, dd/MM/yyyy. Only for sub_quota.
data.quota.owner_typestringWho owns the purchased or reward quota: OA or App. Only for purchase_quota and reward_quota.
data.quota.owner_idstringID of the OA or App that owns the quota. Only for purchase_quota and reward_quota.

Send file — zalo.send_file ​

Send a file using the token returned by the upload_file action. Free inside 48 hours of the user's last interaction, paid after that. The user must have interacted with the OA in the last 7 days.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
user_idstringyesZalo user ID of the OA follower.
tokenstringyesFile token from upload_file.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the send: message_id, user_id, sent_time and the quota used.
data.message_idstringID of the message Zalo accepted.
data.user_idstringZalo user ID of the recipient.
data.sent_timestringWhen Zalo sent the message, Unix time in milliseconds, as a string.
data.quotaobjectThe quota that paid for the message. Missing when the message was charged instead of using a quota.
data.quota.quota_typestringWhich quota paid for the message: reply, welcome_msg, sub_quota, purchase_quota or reward_quota. The reference example for reply omits it.
data.quota.remainstringMessages left in this quota, as a string. Only for reply, welcome_msg and sub_quota. For reply it is always "8" from 1 Jan 2026 and is no longer returned after 1 Mar 2026.
data.quota.totalstringSize of this quota, as a string. Only for reply, welcome_msg and sub_quota. No longer returned for reply after 1 Mar 2026.
data.quota.expired_datestringDate the free package quota expires, dd/MM/yyyy. Only for sub_quota.
data.quota.owner_typestringWho owns the purchased or reward quota: OA or App. Only for purchase_quota and reward_quota.
data.quota.owner_idstringID of the OA or App that owns the quota. Only for purchase_quota and reward_quota.

Send message with buttons — zalo.send_buttons ​

Send text with up to 5 buttons (open URL, quick reply, SMS, phone call). Buttons show on mobile only. The reference has no reply example for buttons; it returns the same reply as the other consultation messages. Free inside 48 hours of the user's last interaction, paid after that. The user must have interacted with the OA in the last 7 days.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
user_idstringyesZalo user ID of the OA follower.
textstringyesMessage text, up to 2000 characters. Max length 2000.
buttonsarray of objectyesButtons, up to 5.
buttons[].titlestringyesMax length 100.
buttons[].typestringyesOne of: oa.open.url, oa.query.show, oa.query.hide, oa.open.sms, oa.open.phone.
buttons[].payloadobject | stringyesoa.open.url: {url}; oa.query.show / oa.query.hide: string up to 1000 chars; oa.open.sms: {content up to 160 chars, phone_code}; oa.open.phone: {phone_code}.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the send: message_id, user_id, sent_time and the quota used.
data.message_idstringID of the message Zalo accepted.
data.user_idstringZalo user ID of the recipient.
data.sent_timestringWhen Zalo sent the message, Unix time in milliseconds, as a string.
data.quotaobjectThe quota that paid for the message. Missing when the message was charged instead of using a quota.
data.quota.quota_typestringWhich quota paid for the message: reply, welcome_msg, sub_quota, purchase_quota or reward_quota. The reference example for reply omits it.
data.quota.remainstringMessages left in this quota, as a string. Only for reply, welcome_msg and sub_quota. For reply it is always "8" from 1 Jan 2026 and is no longer returned after 1 Mar 2026.
data.quota.totalstringSize of this quota, as a string. Only for reply, welcome_msg and sub_quota. No longer returned for reply after 1 Mar 2026.
data.quota.expired_datestringDate the free package quota expires, dd/MM/yyyy. Only for sub_quota.
data.quota.owner_typestringWho owns the purchased or reward quota: OA or App. Only for purchase_quota and reward_quota.
data.quota.owner_idstringID of the OA or App that owns the quota. Only for purchase_quota and reward_quota.

Request user info — zalo.request_user_info ​

Send a card asking the user to share name, phone and address. The answer arrives as a user_submit_info event. Free inside 48 hours of the user's last interaction, paid after that. The user must have interacted with the OA in the last 7 days.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
user_idstringyesZalo user ID of the OA follower.
titlestringyesMax length 100.
subtitlestringyesMax length 500.
image_urlstringyesPattern: ^https://.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectResult of the send: message_id, user_id, sent_time and the quota used.
data.message_idstringID of the message Zalo accepted.
data.user_idstringZalo user ID of the recipient.
data.sent_timestringWhen Zalo sent the message, Unix time in milliseconds, as a string.
data.quotaobjectThe quota that paid for the message. Missing when the message was charged instead of using a quota.
data.quota.quota_typestringWhich quota paid for the message: reply, welcome_msg, sub_quota, purchase_quota or reward_quota. The reference example for reply omits it.
data.quota.remainstringMessages left in this quota, as a string. Only for reply, welcome_msg and sub_quota. For reply it is always "8" from 1 Jan 2026 and is no longer returned after 1 Mar 2026.
data.quota.totalstringSize of this quota, as a string. Only for reply, welcome_msg and sub_quota. No longer returned for reply after 1 Mar 2026.
data.quota.expired_datestringDate the free package quota expires, dd/MM/yyyy. Only for sub_quota.
data.quota.owner_typestringWho owns the purchased or reward quota: OA or App. Only for purchase_quota and reward_quota.
data.quota.owner_idstringID of the OA or App that owns the quota. Only for purchase_quota and reward_quota.

Send template message by user ID — zalo.send_template_by_uid ​

Send an approved ZBS template to a follower by user_id. Charged per message.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
user_idstringyesZalo user ID of the OA follower.
template_idstringyesApproved ZBS template ID.
template_dataobjectyesValues for the template parameters.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.