Send an SMS message

Send an SMS message to a mobile number through GSM/3G/4G trunks.

Scenario: Service personnel can send the detailed information to your mobile phone through PBX when you call to customer service.

Note:
  • A maximum of 1000 Chinese characters (namely 2000 characters) is allowed, and emoji is forbidden.
  • Make sure that PBX can send and receive SMS messages.

Request URL

{base_url}/{api_path}/sms/send?token={token}

Request parameters

Parameter Required Type Description
phonenumber Yes String Mobile number.
message Yes String Encoded message content.

You can encode the message to URL on this website.

trunk Yes String The name of the GSM/3G/4G trunk which is used for sending SMS messages.

Response parameters

Parameter Required Description
status String Request result.
  • Success
  • Failed
smsid String The unique ID of each SMS message.

Example

Request example
Note: Message content must be URL encoded.
POST /api/v2.0.0/sms/send?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
{
    "trunk": "GSM",
    "phonenumber": "18396210850",
    "message": "%E4%BD%A0%E5%A5%BD"
}
Response e
HTTP/1.1 200 OK
Server: Boa/0.94.14rc21
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE

{
    "status": "Success",
    "smsid": "18396210850-1502874159"
}