Create Block Number Group (Token authentication)

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

To use this API with the help of a token, follow these steps:

  1. Generate the Token: Use the 'Generate Token' API to obtain an authentication token.
  2. Enter the Token ID: Navigate to the right section of this page, under the 'AUTHORIZATION' tab. Here, input the generated token ID.
  3. With the token entered, pass the below header and body parameters:

Header parameters

ParameterDescription
Content-Typeapplication/json

Body Params

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

ParameterDescription
userNameYour CloudAgent account username
nameName for the block number group
descriptionEnter the description for the group
blockNumbersPhone numbers to be added to the group
expiryDateAdd 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 name key parameter.{ "status": "error","message": "Parameters are mandatory"}
Passing invalid name value parameter{"status": "error","message": "invalid data","errors": {"name": "Name (X) allows 2 to 50 characters only"}}
Passing invalid description key parameter.{ "status": "error","message": "Parameters are mandatory"}
Passing invalid description value 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
Authorization
Bearer
URL
Click Try It! to start a request and see the response here!