API Definitions

Authentication Header


To authenticate API requests, include the following header:

Param Type Description
content-type string application/json;charset=utf-8
accept string application/json
timestamp string Current timestamp, Note: The number of milliseconds since 1970-01-01 00:00:00 to the current time; the timestamp must not exceed 15 minutes from the current time.
authentication string SHA256 encryption of (loginName + password + timestamp), where + is used as a concatenation symbol for representation purposes and does not exist as an actual string in the data.

Replace authentication with the actual authentication token generated for your application.

This header should be included in the HTTP request headers when making API calls to ensure proper authentication and authorization.

Message Send


POST

Description

Send text messages to designated mobile numbers

Endpoint

/sms/v1/inter/send

Request Body

Param Type required Description
spId string yes Assigned Enterprise ID
content string yes Content of the Message, up to 700 characters long.
mobiles string yes Mobile Phone Numbers, Numbers must adhere to the E.164 standard (Country Code + Mobile Number). For example: 60146660000, where 60 is the country code, and 146660000 is the mobile number. Up to 100 numbers, separated by commas
userMsgId string no User Transaction Number, up to 20 characters long.

Response

Param Type Description
result string Result Code, “0” indicates success, while any other value indicates failure
description string Result Description, specifies reason in case of failure
taskid string Message ID, returned in case of success

Request Example

in case of loginName=admin, password = @P7S0J!PT!

Header:
content-type: application/json;charset=utf-8
accept: application/json
timestamp: 11649844986683
authentication:db9d106063a5826a7bfef013a30aef93cda4ea49d537eeac09baf8530168dbc7((loginName+password+timestamp)SHA256 encrypted)

Body:
{
	"mobiles": "9***0000",
	"spId": "1**9",
	"content": "This is a sample message",
	"userMsgId": "888888888"
}

Response Example

{
	"result": "0",
	"description": "Success",
	"taskid": "220323184112559970"
}

Report Query


POST

Description

Query the reports detailing the status of submitted message sending tasks

Endpoint

/sms/v1/inter/report

Request Body

Param Type required Description
spId string yes Assigned Enterprise ID

Response

Param Type Description
result string Result Code, “0” indicates success, while any other value indicates failure
description string Result Description, specifies reason in case of failure
reportList Array List of Returned Reports, with a maximum of 500 entries

reportList:

Param Type Description
msgId string Message ID, the taskid returned by successful calls to Message Send API
mobileNumber string Mobile Phone Number
resultCode string Status Code, “DELIVRD” indicates success, while other codes indicate delivery failure reports
userMsgId string User Transaction Number, submitted by user in calls to Message Send API
reportTime string Report Return Time, formatted as “yyyy-MM-dd HH:mm:ss”

Request Example

in case of loginName=admin, password = @P7S0J!PT!

Header:
content-type: application/json;charset=utf-8
accept: application/json
timestamp: 11649844986683
authentication:db9d106063a5826a7bfef013a30aef93cda4ea49d537eeac09baf8530168dbc7((loginName+password+timestamp)SHA256 encrypted)

Body:
{
	"spId":"2**9"
}

Response Example

{
	"result": "0",
	"reportList": [
		{
			"msgId": "1232132131",
			"mobileNumber": "9***0000",
			"resultCode": "DELIVRD",
			"reportTime": "2021-05-24 18:10:10",
			"userMsgId": "123456789"
		},
		{
			"msgId": "232132133",
			"mobileNumber": "9***0001",
			"resultCode": "DELIVRD",
			"reportTime": "2021-05-24 18:10:10",
			"userMsgId": "123456789"
		}
	]
}

Report Push


POST

Description

Callback interface that pushes reports detailing the status of submitted message sending tasks

Endpoint

The endpoint URL is defined the user

Request Body

Param Type Description
requestId string Unique Request ID, Maximum length of 32 characters
reportList Array List of Returned Reports, with a maximum of 1000 entries

reportList:

Param Type Description
msgId string Message ID, the taskid returned by successful calls to Message Send API
mobileNumber string Mobile Phone Number
resultCode string Status Code, “DELIVRD” indicates success, while other codes indicate delivery failure reports
userMsgId string user Transaction Number, submitted by user in calls to Message Send API
reportTime string Report Return Time, formatted as “yyyy-MM-dd HH:mm:ss”

Response

Param Type Description
code int Result Code, 0 indicates success, while any other value indicates failure
msg string Result Description, specifies reason in case of failure

Request Example

{
	"requestId": "1231233",
	"reportList": [
		{
			"msgId": "1232132131",
			"mobileNumber": "9***0000",
			"resultCode": "DELIVRD",
			"reportTime": "2021-05-24 18:10:10",
			"userMsgId": "123456789"
		},
		{
			"msgId": "232132133",
			"mobileNumber": "9***0001",
			"resultCode": "DELIVRD",
			"reportTime": "2021-05-24 18:10:10",
			"userMsgId": "123456789"
		}
	]
}

Response Example

Success:
{
	"code": 0,
	"msg":"success",
}

Failure:
{
	"code": -1,
	"msg":"system error",
}