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}}",
"TempID": "{{TempID}}",
"Data": [
{"Phone":"{{Phone}}","Params":["{{value1}}","{{value2}}","{{value3}}"]},
{"Phone":"{{Phone}}","Params":["{{value1}}","{{value2}}","{{value3}}"]},
{"Phone":"{{Phone}}","Params":["{{value1}}","{{value2}}","{{value3}}"]}
],
"SendDate":"{{SendDate}}",
"OAID":"{{OAID}}",
"CallbackUrl":"{{CallbackUrl}}"
}'
  • Request body

Paramter
Type
Required
Description

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: Phone

string

he phone number of receivers.

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 *Lưu ý:

  1. The values must be placed in the correct order with the registered template.

  2. 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

The webhook URL that will receive the status of message after it processed to the operator. It is used for determine whether the SMS is succcessfully delivered to the receiver or failed. See the sample request at here. More details at here.


  • 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

Parameter
Type
Description

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.

Last updated