Registering SMS template

This endpoint is used for registering the SMS template.

HTTP request

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

  • Content Type: application/json

  • Response Type: application/json

curl --location 'https://rest.esms.vn/MainService.svc/json/SubServicePreviewJson/' \
--header 'Content-Type: application/json' \
--data '{
    "ApiKey": "{{ApiKey}}",
    "AssetsUrl": "{{AssetsUrl}}",
    "Brandname": "{{Brandname}}",
    "CallbackUrl": "{{CallbackUrl}}",
    "Content": "{{Content}}",
    "IsUnicode": "{{IsUnicode}}",
    "CustomerEmail": "{{CustomerEmail}}",
    "CustomerName": "{{CustomerName}}",
    "CustomerPhone": "{{CustomerPhone}}",
    "SecretKey": "{{SecretKey}}",
    "ServiceType": 2,
    "SmsType": {{SmsType}}
}'
  • Request body:

Paramter
Type
Required
Description

ApiKey

string

Your API key.

SecretKey

string

Your Secret key.

Content

string

The content of template.

AssetsUrl

string

The URL download of the document that used for registration.

Brandname

string

The brandname that the template is registered for. Note: Brandname must be registered before calling this request.

IsUnicode

string

Template charset 1. Unicode 0. Non-unicode

CustomerEmail

string

The email of customer end that request the registration.

CustomerName

string

The name of customer end that request the registration.

CustomerPhone

string

The phonemail of customer end that request the registration.

ServiceType

string

ServiceType = 2: Register the customer care template or fixed number.

SmsType

string

2: Customer care template. 8: Fixed number template.

CallbackUrl

string

The webhook URL that will be received the result of the registration process. 0: Failed 1: eSMS is received the submit 2: The template is registered successfully


  • Response:

{
    "CodeResult": "100",
    "ErrorMessage": "ViHAT is moderating your template",
    "ServicePreviewId": 52353
}

Valid request.

  • Response body:

Paramter
Type
Description

CodeResult

string

Response code.

ErrorMessage

string

The message error in case of invalid request.

ServicepreviewId

string

ID of template

Last updated