Send Regular SMS


Send regular text messages through specified SMS operators. Some SMS operators can add an SMS signature before the text. When the SMS sending request is sent successfully, the request will be added into the message queue, and users will receive an eventId to query the actual sending results.

Request Format


POST https://{apigw-address}/notification-center-service/v2.0/simple/sms

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

The OU ID. How to get orgId >>

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

phones

Required

List<Phone>

The recipient’s mobile phone area code and phone number.

tunnelCode

Optional, required if tunnelIdentifier is not specified.

String

SMS channel codes, all available channel codes are listed in Useful Constants > SMS Tunnel Code. Specify at least one of tunnelCode and tunnelIdentifier. If both are specified at the same time and conflict, tunnelIdentifier will prevail.

tunnelIdentifier

Optional, required if tunnelCode is not specified.

String

SMS channel ID, used to specify different SMS channels of the same operator (limited to channels defined in the specified OU and system OU). If not specified, defaults to null. Specify at least one of tunnelCode and tunnelIdentifier. If both are specified at the same time and conflict, tunnelIdentifier will prevail.

signatureCode

Optional

String

When sending a text message, you need to add the display of the text message signature before the text message. You need to go to EnOS Management Console and select Notification Management > Messages > Configurations > SMS page to view, different OUs and supplies There are different configurations for the merchant, which can only be used after the OU can apply for a signature and is approved by the administrator.

priority

Optional

Enum

Message sending priority, default P2, no special configuration Required.

content

Required

String

Text message content.

Response Parameter


Name

Required/Optional

Data Type

Description

eventId

Required

String

After you send an email or SMS request, you can use the eventId to query the results.

Useful Constants


Name

Value

Description

SMS Tunnel code

  • System: NOTICE_GW

  • OU: HDB_SCS, TWILIO, NEXMO, GENERIC

SMS channel code. System channel codes are available in all OUs. The OU channel code is the operator code of the channel that has been set up in this OU.

Email sender code

NOTICE_GW

Mail sender code, system default, available in all OUs.

Error Codes


Code

Error Message

Description

32404

signature is not exist

SMS signature does not exist

32404

sms template is not exist

SMS template does not exist

32400

variable not in template

Custom variable error in template

32400

tunnel code is not existed

SMS channel parameter error

32435

operation not allowed, the signature is not approved

SMS signature failed to pass approval

Samples

Request Sample


url: https://{apigw-address}/notification-center-service/v2.0/simple/sms?orgId=yourOrgId
method: POST
requestBody:
{
  "signatureCode": "xx",
  "phones": [
    {
      "area": "87",
      "number": "23"
    }
  ],
  "priority": "P2",
  "tunnelCode": "",
  "content": "sms content"
}

Return Sample


{"code":0, "msg":"OK", "submsg":"", "requestId": null, "data":{"eventId": "evt16062008765401}}

Exception Sample


{"code":32403, "msg":"the quota is run out, test quota is limited", "submsg":"Permission denied: tunnel.quota.run.out", "data": null, "requestId": null}