Skip to Content
Short Message Service(USMS)BatchCreateUSMSBlacklistPhone

Batch create a blacklist of mobile phone numbers - BatchCreateUSMSBlacklistPhone

Overview

Batch create a blacklist of mobile phone numbers

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is BatchCreateUSMSBlacklistPhone.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See Region and Zone ListNo
ZonestringZone. See Region and Zone ListNo
ProjectIdstringProject ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the GetProjectList APIYes
IsGlobalbooleanWhether the entire project is effectiveYes
BlackListstringBlacklist 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 NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
ReqUuidstringRequest Uuid this time
Yes
SuccessListarray[string]Create a list of successfully registered mobile phone numbers.Yes
FailedListarray[string]List of failed mobile phone numbers for creationYes

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" ] }