Document navigation

AddSNSSmsReceiver

API Request

URLs
POST zstack/v1/sns/sms-endpoints/receivers
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "phoneNumber": "13333333333",
    "phoneNumberList": [
      "13333333333"
    ],
    "endpointUuid": "467e77c4cc42492f9794429e689a9874",
    "type": "AliyunSms",
    "description": "description"
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"phoneNumber":"13333333333","phoneNumberList":["13333333333"],"endpointUuid":"467e77c4cc42492f9794429e689a9874","type":"AliyunSms","description":"description"}}' \
http://localhost:8080/zstack/v1/sns/sms-endpoints/receivers
Request Parameters
Name Type Location Description Optional Value Starting Version
phoneNumber String body (contained in the params structure) Optional. The single receiver phone number. At least one of this field and phoneNumberList must be provided. If both are provided, phoneNumberList is used. 3.7.0
phoneNumberList List body (contained in the params structure) Optional. The list cannot contain duplicates or existing numbers. The total number of receivers cannot exceed 200 after the addition. 5.1.8
endpointUuid String body (contained in the params structure) The SMS endpoint UUID. 3.7.0
type String body (contained in the params structure) The SMS endpoint type. Set this field to Plugin for an SMS plugin notification endpoint.
  • AliyunSms
  • UniversalSms
  • Plugin
3.7.0
description String body (contained in the params structure) Optional. The SMS receiver description. 3.7.0
resourceUuid String body (contained in the params structure) Optional. 3.7.0
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 3.7.0
systemTags List body Optional. The system tags. 3.7.0
userTags List body Optional. The user tags. 3.7.0

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "f577c6472842420a87efff64634ba8ea",
      "phoneNumber": "18912345678",
      "endpointUuid": "f2d20aa7077147d29c6d40fc7b6d6d6a",
      "type": "AliyunSms",
      "description": "description",
      "createDate": "Sep 17, 2026 2:34:51 PM",
      "lastOpDate": "Sep 17, 2026 2:34:51 PM"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.7.0
inventories List For more information, see inventories. 5.1.8
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 5.3.20
description String The brief description of the error. 5.3.20
details String The details about the error. 5.3.20
elaboration String The reserved field. Default value: null. 5.3.20
opaque LinkedHashMap The reserved field. Default value: null. 5.3.20
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 5.3.20
#inventories
Name Type Description Starting Version
uuid String The resource UUID, which uniquely identifies the resource. 3.7.0
phoneNumber String The SMS receiver phone number. 3.7.0
endpointUuid String The SMS endpoint UUID. 3.7.0
description String The SMS receiver description. 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
type SmsReceiverType For more information, see type. 3.7.0
#type
Name Type Description Starting Version
AliyunSms SmsReceiverType Aliyun SMS 3.7.0

SDK Sample

Java SDK
AddSNSSmsReceiverAction action = new AddSNSSmsReceiverAction();
action.phoneNumber = "13333333333";
action.phoneNumberList = java.util.Arrays.asList("13333333333");
action.endpointUuid = "467e77c4cc42492f9794429e689a9874";
action.type = "AliyunSms";
action.description = "description";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSNSSmsReceiverAction.Result res = action.call();
Python SDK
action = AddSNSSmsReceiverAction()
action.phoneNumber = "13333333333"
action.phoneNumberList = ["13333333333"]
action.endpointUuid = "467e77c4cc42492f9794429e689a9874"
action.type = "AliyunSms"
action.description = "description"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
API Reference | 5.5.38 | ZStack Cloud · ZCF | ZStack Resource Center