Create Block Number Group (Basic authentication)

Using this API, you can create a Block Number group within your Cloud Agent account, allowing you to add multiple numbers.

👍

Note:

Make sure the admin setting 'API Authentication' is set to 'BASIC_AUTH', If you are using this API.

Header parameters

ParameterDescription
apiKey*Your CloudAgent account API Key
Content-Typeapplication/json

Body Params

{
"userName":"xxxxx",
"name":"xxxxxx",
"description":"xxxx",
"blockNumbers":"12345678966",
"expiryDate":"YYYY-MM-DD HH:MM:SS"
}

Parameter

Description

userName

Your CloudAgent account username

name

Name for the block number group

description

Enter the description for the group

blockNumbers

Phone number to be added to the group

expiryDate

Add the expiry date for the number, this indicates the duration you want the number to remain in the blocked list.
Format: YYYY-MM-DD HH:MM:SS

📘

Rate Limit

This API supports the addition of up to 100 phone numbers in a single request.

Possible responses

Passing Invalid 'username' in Authorization

{"status": "error","message": "Authentication failed"}

Passing Invalid 'password' in Authorization

{"status": "error","message": "Authentication failed"}

Passing invalid namekey parameter.

{ "status": "error","message": "Parameters are mandatory"}

Passing invalid namevalue parameter

{"status": "error","message": "invalid data","errors": {"name": "Name (X) allows 2 to 50 characters only"}}

Passing invalid descriptionkey parameter.

{ "status": "error","message": "Parameters are mandatory"}

Passing invalid descriptionvalue parameter.

{"status": "error","message": "invalid data","errors": {"name": "Name (B) allows 2 to 50 characters only"}}

Passing invalid blockNumbers value parameter.

{"status": "error","message": "invalid data","errors": {"blockNumbers": "Blocknumbers data contains invalid format of numbers"}}

Successfully group is created with multiple numbers

"{""status"": ""success"",""message"": ""created"",""input"": {""name"": ""XXXX"",""description"": ""XXXX"",
""blockNumbers"": [ ""97XXX04XX3,98XXXXXX98,97XXXXXX97,90XXXXXX50,99XXXXXX66""]},
""output"": {""affectedRows"": 1,
""lastInsertId"": 20,""succes"": [],""error"": [ ""97XXX04XX3,98XXXXXX98,97XXXXXX97,90XXXXXX50,99XXXXXX66""]}}"

Language
URL
Click Try It! to start a request and see the response here!