Delete Group Bulk SMS API Documentation

Delete Group

Delete Group

Caution: When you delete a group, the associated/saved contacts in that group will also be deleted and cannot be retrieved.

Application API URL:

https://www.smsgateway.center/library/api/self/Group/

 

Key Value Description
Login Credentials (Required Parameters)
Authenticate your API request using userId-password or apiKey. You should use either one to authenticate your login.
userId Your Registered Username The registered username parameter to be passed. You can use this if apiKey is not being used.
password Your password The password needs to be urlencoded if there are any special characters used in the password field. You can use this if apiKey is not being used.
apiKey Your unique apiKey apiKey needs to be sent as HTTP header when you are not using userId and password credentials. You can avail this from your user control panel and use instead of userId and password HTTP Request parameter. Please do not disclose this to anyone.
Required Parameters
do delete Action value for do parameter
delGroupname Grourp Name Group name value which needs to be deleted. Associated contacts will also be deleted and cannot be retrieved. Use wisely.
format plain|json|xml Value for response format.

System default is plain. If you need responses in JSON or XML then you have to give value as JSON or XML.

Save this Page on your Favorite Social Media

Sample Request Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/library/api/self/Group/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "userId=YourUsername&password=YourCurrentPassword&do=delete&delGroupname=Grpone&format=json#x22;,
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/library/api/self/Group/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "userId=YourUsername&password=YourCurrentPassword&do=delete&delGroupname=Grpone&format=json",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var qs = require("querystring");
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/library/api/self/Group/",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({ userId: 'YourUsername',
  password: 'YourCurrentPassword',
  do: 'delete',
  delGroupname: 'Grpone',format: 'json' }));
req.end();
var qs = require("querystring");
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/library/api/self/Group/",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({ userId: 'YourUsername',
  password: 'YourCurrentPassword',
  do: 'delete',
  delGroupname: 'Grpone',format: 'json' }));
req.end();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "userId=YourUsername&password=YourCurrentPassword&do=delete&delGroupname=Grpone&format=json");
Request request = new Request.Builder()
  .url("https://www.smsgateway.center/library/api/self/Group/")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "userId=YourUsername&password=YourCurrentPassword&do=delete&delGroupname=Grpone&format=json");
Request request = new Request.Builder()
  .url("https://www.smsgateway.center/library/api/self/Group/")
  .get()
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Response

{
    "status": "success",
    "statusCode": "900",
    "transactionId": "2f305993-e3e1-4a8a-b6b6-0bfd8307746b",
    "reason": "Group and associated contacts successfully deleted permanently."
}
<?xml version="1.0" encoding="UTF-8"?>
<successResponse>
    <reason>Group and associated contacts successfully deleted permanently.</reason>
    <status>success</status>
    <statusCode>900</statusCode>
    <transactionId>4c9b6c6b-0637-4786-b6ea-09a0e1f98d2b</transactionId>
</successResponse>
status=success | transactionId=3900beac-46ae-4018-8f55-1777a232b339 | statusCode=900 | reason=Group and associated contacts successfully deleted permanently.