Send SMS messages

Last Updated on : 2023-06-15 05:32:00

Send verification codes, notifications, or marketing SMS messagesto users.

API address

POST: /v1.0/iot-03/messages/sms/actions/push

Request parameter

Description of body

Parameter name Type IN Required Description
country_code String true The country code.
phone String true The phone numbers that receive the messages.
template_id String true The SMS template ID. Enter the template ID that has been approved.
template_param String false The actual value corresponding to the message template variable, in the JSON format.
sign_name String false The SMS signature.

Return parameter

Parameter name Type Description
result MsgPushRes

Description of result

Parameter name Type Description
send_status Boolean The status of sending a specified message.

Request example

POST: /v1.0/iot-03/messages/sms/actions/push
{ "country_code": "86", "phone": "151********", "template_id": "SMS_1616396456", "template_param": "{\"code\":\"1234\"}" }

Return example

{ "result": { "send_status": true }, "t": 1586153261345, "success": true }

Error code

For more information, see error code.