Send customer care message using POST TEXT

API dùng để gửi tin Quảng cáo đến khách hàng. Mỗi request tối thiểu 30 số để được duyệt tin và tối đa 5000 số.

HTTP request

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

  • Content Type: application/text/plain

  • Response Type: application/json

curl --location 'https://rest.esms.vn/MainService.svc/json/SendMultipleMessage_V4/' \
--header 'Content-Type: text/plain' \
--data '<RQST>
<APIKEY><{{ApiKey}}</APIKEY>
<SECRETKEY>{{SecretKey}}</SECRETKEY>
<CONTENT>{{Content}}</CONTENT>
<SMSTYPE>2</SMSTYPE>
<BRANDNAME>{{Brandname}}</BRANDNAME>
<SENDDATE>{{senddate}}</SENDDATE>
<CALLBACKURL>{{callbackUrl}}}</CALLBACKURL>
<CONTACTS>
<CUSTOMER><PHONE>{{Phone}}</PHONE></CUSTOMER>
</CONTACTS>
</RQST>'
  • Request body

Paramter
Type
Required
Description

APIKEY

string

Your API Key.

SECRETKEY

string

Your Secret Key.

CONTENT

string

The content of SMS.

SMSTYPE

string

Type of SMS 1: Advertising.

BRANDNAME

string

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

PHONE

string

The phone number of receiver.

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

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 detail at here.


  • Response:

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

Valid request.

  • Response body:

Parameter
Type
Description

CodeResult

string

Response code.

SMSID

string

The message id eSMS system.

ErrorMessage

string

The error message if the request is invalid.

Last updated