Skip to main content

Campaign Update

This service is used to edit a campaign.

Parameters

DescriptionDefined DataExample DataRequired[**]/Optional[*]Parameters
Unique ID obtained from search-6048aa14095d8438aa64e7c9**id_
Campaign Name-imrorteza04*name
Unique Trunk ID obtained from search-60508b4e095d840c3019e1bd*trunk_manager_id
Context Value in autodialer component route-autointerface_context
Text Value in autodialer component route-text1interface_text
Time Interval Between Each Attempt-600*try_interval
Number of Retries-1*try
Campaign Start Time-2021-02-19 15:17*start
Campaign End Time-2021-02-23 15:17*end
Unique Audio File ID obtained from search-lkjaghdfverfg78345893*announcement
Description--description

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/campaigns/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 =>'{
"_id":"6048aa14095d8438aa64e7c9",
"name":"imrorteza04",
"trunk_manager_id":"60508b4e095d840c3019e1bd",
"interface_context":"auto",
"interface_text":"text1",
"try_interval":"600",
"try":"1",
"start":"2021-02-19 15:17",
"end":"2021-02-23 15:17",
"announcement":"lkjaghdfverfg78345893",
"description":"",
"count":3
}',
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;
?>