Batch create a blacklist of mobile phone numbers - BatchCreateUSMSBlacklistPhone
Overview
Batch create a blacklist of mobile phone numbers
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is BatchCreateUSMSBlacklistPhone . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See Region and Zone List | No |
Zone | string | Zone. See Region and Zone List | No |
ProjectId | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the GetProjectList API | Yes |
IsGlobal | boolean | Whether the entire project is effective | Yes |
BlackList | string | Blacklist list of mobile phone numbers, this parameter is the base64 encoding result of the json array, with no more than 1000 items at a time. Sub-item parameter description: { “Phone”: “13900000001”, mobile phone number type :string ”Purpose”: 2, SMS type int :0- No filtering 1- Verification Code 2- Notification 3- Marketing ”Remark”: “Test Data 001” Note type: string(maximum 256 characters) } Remark: Note (maximum 256 characters) Example: Example: Send content json array (before base64 encoding): [ { “Phone”: “13900000001”, “Purpose”: 2, “Remark”: “Test Data 001 } ] Example: Send content json array (encoded in base64): Ww0KICAgICB7DQogICAgICAiUGhvbmUiOiAiMTM5MDAwMDAwMDEiLA0KICAgICAgIlB1cnBvc2UiOiAyLA0KICAgICAgIlJlbWFyayI6ICLmtYvor5XmlbDm ja4wMDEiIA0KICAgIH0NCl0= Others Supported mobile phone number formats The mobile phone number in parentheses, with the country code (a)xxxxx inside the parentheses 2. Mobile phone number axxxxxx without parentheses 3. Mobile phone number with a plus sign +axxxxx | Yes |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
ReqUuid | string | Request Uuid this time | Yes |
SuccessList | array[string] | Create a list of successfully registered mobile phone numbers. | Yes |
FailedList | array[string] | List of failed mobile phone numbers for creation | Yes |
Example
Request Example
https://api.surfercloud.com/?Action=BatchCreateUSMSBlacklistPhone
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=tHdAlChQ
&IsGlobal=true
&BlackList=Ww0KICAgICB7DQogICAgICAiUGhvbmUiOiAiMTM5MDAwMDAwMDEiLA0KICAgICAgIlB1cnBvc2UiOiAyLA0KICAgICAgIlJlbWFyayI6ICLmtYvor5XmlbDmja4wMDEiIA0KICAgIH0NCl0=
Response Example
{
"Action": "BatchCreateUSMSBlacklistPhoneResponse",
"FailedList": [
"13900000003",
"13900000004"
],
"Message": "Success",
"ReqUuid": "ezKmluyR",
"RetCode": 0,
"SuccessList": [
"13900000001",
"13900000002"
]
}