Skip to main content

Group Update

This service is used to edit groups.

Parameters

DescriptionDefined DataExample DataRequired[**]/Optional[*]Parameters
Unique ID obtained from Search-6033876dc92de036d1390923**id_
Group Name-test_group_new*name
Group 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/update",
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 \"_id\":\"6033876dc92de036d1390923\",\r\n \"name\":\"test_group_new\",\r\n \"numbers\":[\"1111\", \"2222\", \"3333\"],\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;
?>