Skip to main content

Group Add

This service is used to add a group of phone numbers.

Second Method (PHP Example)

In the second method, in the PHP example, you can add .csv as an input field after uploading the file filename.

Parameters

DescriptionDefined DataExample DataRequired[**]/Optional[*]Parameters
Group Name-test_group**name
Phone Numbers-"1111", "2222", "3333"*numbers
Description-just for testdescription

Sample Invocation

Show Full Source Code PHP

	<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "http://192.168.51.21/api/v4/autodialer/groups/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>"{\r\n \"name\":\"test_group\",\r\n \"filename\":"file-20231029073840-53485-book1csv.csv",\r\n \"description\":\"just for test\"\r\n}",
CURLOPT_HTTPHEADER => array(
"X-APIKEY: vZKtIKWsld0egNlkzHo8i5LVBqLNBSWARCQsPOSgDjFmAHM3tG",
"Authorization: Basic dGVzdDpBYTEyMzQ1Ng==",
"Content-Type: application/json"
),
));

$response = curl_exec($curl);

if (!curl_errno($curl)) {
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
echo 'response code:'.$httpcode, '<br/>';
}

curl_close($curl);
echo $response;
?>