Send personized message via Zalo
This endpoint is used for sending SMS by batch (1 request for multiple SMS) via Zalo with shared or personized content/properties.
It is ideal to send any kind of massive personalized announcement.
HTTP request
POST
https://rest.esms.vn/MainService.svc/json/Send_zns_bulk_v4_post_json/
Content Type: application/json
Response Type: application/json
curl --location 'https://rest.esms.vn/MainService.svc/json/Send_zns_bulk_v4_post_json/' \
--header 'Content-Type: application/json' \
--data '{
"ApiKey": "{{ApiKey}}",
"SecretKey": "{{SecretKey}}",
"campaignid": "Chiến dịch 1",
"OAID": "4097311281936189049",
"TempID": "267247",
"Sandbox": "0",
"CallbackUrl": "https://esms.vn/webhook/",
"Data": [
{
"Phone": "0901888484",
"RequestId": "96accf59-0c41-4bc7-a5c1",
"Params": [ "Chị A", "Gội đầu", "KH001", "19/03/2025" ]
},
{
"Phone": "0918238965",
"RequestId": "96accf59-0c41-4bc7-a5c2",
"Params": [ "Chị B", "Uốn", "KH002", "19/03/2025" ]
},
{
"Phone": "0765418062",
"RequestId": "96accf59-0c41-4bc7-a5c3",
"Params": [ "Chị C", "Nhuộm", "KH003", "19/03/2025" ]
}
]
}'
Request body
ApiKey
string
Your API Key.
SecretKey
string
Your Secret Key.
TempID
string
The ID of template for the OA that is registered and provided by eSMS at Zalo to partner. Each template will have a specified structure of body.
Data
Array
An array of objects containing information about each message you want to send. Note: The array has a maximum size of 500 elements.
Data: Phone
string
The phone number of receivers.
Data: RequestId
string
Partner Message ID, used to check whether this ID has been previously received by the esms system.
Ex: RequestId=123456
.
Data: Params
string
The values that need to pass according to the template variables.
Giá trị cần truyền cho các biến trong Template
*Note:
The values must be placed in the correct order with the registered template.
If the parameter is duplicated, just place one.
SendDate
string
Scheduler the message to the receiver. If it's empty, the message will be instantly sent to the receiver. Format: yyyy-mm-dd hh:MM:ss
OAID
string
Zalo OA Id is the Zalo Official Account Id of the organization. It can be obtained by accessing to the Zalo administrator page.
Note: Pre-registration is required.
CallbackUrl
string
SendingMode
string
Sending Modes: 1 Default (Normal Sending): Messages are sent using the standard ZNS delivery mechanism. 3 Exceed Quota Sending: Allows OA to send ZNS tagged messages exceeding the quota limits.
Note: Exceed Quota Sending (SendingMode = 3) is only available for whitelisted OAs. Contact the Customer Support team for access.
Response:
{
"CodeResult": "100",
"Message": "Sucess",
"TotalSuccess": 2,
"detail": [
{
"CodeResult": "100",
"Phone": "{Phone}",
"SMSID": "a037b928-cb7e-4bfc-bdf9-0286318163aa264"
},
{
"CodeResult": "100",
"Phone": "{Phone}",
"SMSID": "b83ff06e-8989-4b0d-818e-795b96699e86264"
}
]
}
Valid request.
Response body
CodeResult
string
Response code
Message
string
The error message if the request is invalid.
TotalSuccess
string
Number of successfully requests.
detail : CodeResult
string
The detail response code
detail : Phone
string
Phone number of receiver
detail : SMSID
string
The message id corresponding to the phone number.
Note: This API does not allow sending except for zns free wallet whether the account is enabled or not, zns free news will be reconciled at the end of the month.
The detail of error code can refer at Table of error codes .
Get the sample of code for programing languagues to use in Postman refer at Link of code samples.
Last updated