Skip to content

Zalo — ZBS templates ​

Send ZBS template message — zalo.send_template ​

Send an approved ZBS template to a phone number. Costs money per message (from 200 VND).

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
phonestringyesRecipient phone: 84987654321, +84987654321 or 0987654321. Pattern: ^\+?[0-9]{9,15}$.
template_idstringyesZBS template ID.
template_dataobjectyesTemplate parameters; names come from get_template listParams.
tracking_idstringyesYour reference for reconciliation; no special characters. Max length 48.
sending_modeanyno1 normal (default); 3 over-quota, whitelisted OAs and tag 3 only. One of: 1, 3.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Send ZBS template message by hashed phone — zalo.send_template_hashphone ​

Send an approved ZBS template to a SHA-256 hashed phone number. Costs money per message.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesno—

Input

FieldTypeRequiredDescription
hash_phonestringyesSHA-256 of the phone number.
template_idstringyesZBS template ID.
template_dataobjectyesTemplate parameters; names come from get_template listParams.
tracking_idstringyesYour reference for reconciliation; no special characters. Max length 48.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Send ZBS template message (development mode) — zalo.send_template_dev ​

Test-send a ZBS template in development mode. Only admins of the App or OA can receive it.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
phonestringyesRecipient phone: 84987654321, +84987654321 or 0987654321. Pattern: ^\+?[0-9]{9,15}$.
template_idstringyesZBS template ID.
template_dataobjectyesTemplate parameters; names come from get_template listParams.
tracking_idstringyesYour reference for reconciliation; no special characters. Max length 48.
modeanynoSet by FLAE Always development.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Get ZBS message status — zalo.get_message_status ​

Get the delivery status of a ZBS message: -1 not found, 0 pushed, 1 delivered.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
message_idstringyesmsg_id returned by the send.
phonestringno

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Get ZBS quota — zalo.get_quota ​

Get the daily and remaining ZBS message quota of the OA.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

No input.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Get ZBS quality — zalo.get_quality ​

Get the OA's ZBS sending quality (last 48 hours and 7 days).

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

No input.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

List ZBS templates — zalo.list_templates ​

List ZBS templates, newest first.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
offsetintegeryesMin 0.
limitintegeryesMin 1. Max 100.
statusintegerno1 ENABLE, 2 PENDING_REVIEW, 3 REJECT, 4 DISABLE; omit for all. Min 1. Max 4.
filterPresetintegerno0 all OA templates, 1 only those created by this App. One of: 0, 1.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Get ZBS template — zalo.get_template ​

Get a ZBS template: status, listParams, listButtons, price_sdt (phone) and price_uid.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
template_idstringyesZBS template ID.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Get ZBS template sample data — zalo.get_template_sample_data ​

Get sample values for the parameters of a ZBS template.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
template_idstringyesZBS template ID.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Create ZBS template — zalo.create_template ​

Create a ZBS template (100 per day). It starts as PENDING_REVIEW; Zalo reports the result by webhook.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
template_namestringyesMax length 60.
template_typeintegeryes1 custom, 2 OTP, 3 payment request, 4 voucher, 5 service rating. One of: 1, 2, 3, 4, 5.
tagstringyes1 transaction, 2 customer care, 3 promotion. One of: 1, 2, 3.
layoutobjectyes{header, body, footer}, each with a components list.
paramsarray of objectyes[{name, type, sample_value}].
notestringyesMax length 400.
tracking_idstringyesMax length 48.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Edit ZBS template — zalo.edit_template ​

Edit a ZBS template. Only templates in REJECT status can be edited (100 per day).

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
template_idstringyesZBS template ID.
template_namestringyesMax length 60.
template_typeintegeryes1 custom, 2 OTP, 3 payment request, 4 voucher, 5 service rating. One of: 1, 2, 3, 4, 5.
tagstringyes1 transaction, 2 customer care, 3 promotion. One of: 1, 2, 3.
layoutobjectyes{header, body, footer}, each with a components list.
paramsarray of objectyes[{name, type, sample_value}].
notestringyesMax length 400.
tracking_idstringyesMax length 48.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

Upload ZBS template image — zalo.upload_template_image ​

Upload a JPG or PNG (max 500 KB) for a ZBS template. Returns media_id.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesno—

Input

FieldTypeRequiredDescription
file_urlstringyesHTTPS URL of the file to upload (max 500000 bytes). Pattern: ^https://.
file_namestringnoFile name to send to Zalo.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

List ZBS ratings — zalo.list_ratings ​

List customer ratings for a service-rating ZBS template created by this App.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
template_idstringyesZBS template ID.
from_timeintegeryesStart, ms timestamp.
to_timeintegeryesEnd, ms timestamp.
offsetintegeryesMin 0.
limitintegeryesMin 1. Max 100.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.

List ZBS quick responses — zalo.list_quick_responses ​

List quick-response button replies customers sent to a ZBS template.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
template_idstringyesZBS template ID.
from_timeintegeryesStart, ms timestamp.
to_timeintegeryesEnd, ms timestamp.
offsetintegeryesMin 0.
limitintegeryesMin 1. Max 100.

Extra fields: ignored.

Output

FieldTypeDescription
dataobjectZalo response data.