Send multi-channel message via Zalo and SMS

This endpoint is used for sending multi-channel SMS via Zalo and SMS by orderding.

It is ideal to send the personalized messages for use-cases like notifications, alerting or marketing for example with high delivery rate.

HTTP request

POST https://rest.esms.vn/MainService.svc/json/MultiChannelMessage/

  • Content Type: application/json

  • Response Type: application/json

curl --location 'https://rest.esms.vn/MainService.svc/json/MultiChannelMessage/' \
--header 'Content-Type: application/json' \
--data '{
    "ApiKey": "{{ApiKey}}",
    "SecretKey": "{{SecretKey}}",
    "Phone": "{{Phone}}",
    "Channels": [
        "zalo",
        "sms"
    ],
    "Data": [
        {
            "TempID": "{{TempID}}",
            "Params": ["{{param1}}","{{param2}}","{{param3}}"],
            "OAID": "{{OAID}}",
            "campaignid": "{{campaignid}}",
            "CallbackUrl": "{{CallbackUrl}}",
            "RequestId":"{{RequestId}}",
            "Sandbox":"{{Sandbox}}"
        },
        {
            "Content": "{{Content}}",
            "IsUnicode": "{{IsUnicode}}",
            "SmsType": "{{SmsType}}",
            "Brandname": "{{Brandname}}",
            "CallbackUrl": "{{CallbackUrl}}",
            "Sandbox":"{{Sandbox}}"
        }
    ]
}'
  • Request body

Parameter
Type
Required
Description

ApiKey

string

Your API Key.

SecretKey

string

Your Secret Key.

Phone

string

The phone number of receivers.

Params

array

The values that need to pass according to the template variables.

Giá trị cần truyền cho các biến trong Template *Notes:

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

  2. If the parameter is duplicated, just place one.

TempID

string

Template của 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.

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.

RequestId

string

The identification value for the request to prevent the the request from duplicated.

campaignid

string

The campaign name of request.

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.

Content

string

The OTP or marketing content.

IsUnicode

string

Message charset value (default is 0): 1: Unicode.

0: Non-Unicode.

SmsType

string

Message type: 2: Customer care message

Brandname

string

The name of the sender is shown in the header of the customer's message. Pre-registration is required.

Sandbox

string

Sandbox option value (default is 0): 1: For testing purpose to verify the validation of the request. Message is not charged and sent to the receiver. 0: Message will be processed to the receiver properly.


  • Response:

{
    "CodeResult": "100",
    "CountRegenerate": 0,
    "SMSID": "d8e0f1f0702544b2acb456ca9ccfd111250"
}

Valid request.

  • Response body

Parameter
Type
Description

CodeResult

string

Response code.

SMSID

string

The message id of eSMS system.

ErrorMessage

string

The error message if the request is invalid.

Last updated