Send an SMS Message

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

  • Make sure that PBX can send and receive SMS messages.
  • A maximum length of 2000 characters is supported.

Request URL

POST {base_url}/{api_path}/sms/create?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
message Yes String Encoded message content.
Tip: You can encode message content to URL on the website.
number Yes String Mobile number to receive the SMS message.
trunk_name Yes String The name of the GSM/3G/4G trunk, which is used for sending SMS message.

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.


Request example
POST /openapi/v1.0/sms/create?access_token=ojPrvnfzPdwc8OCcRmhG16gEHuZcwFco HTTP/1.1
Content-Type: application/json
Response example
HTTP/1.1 200 OK
    "errcode": 0,
    "errmsg": "SUCCESS"