Skip to main content

Batch Add Agent

This service is used to add a batch of operators to the queue.

Parameters

DescriptionDefined DataSample DataRequired Parameters[**]/Optional[*]Parameters
Queue Number-999**queue
Internal Number-570**source
Operator Number-570**agents
Queue Priority-1penalty

Sample Invocation

Show Full Source Code PHP

	<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'http://192.168.51.20/api/v4/pbx/queues/batchaddagent',
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 =>'{
"agents":[
{"queue": "10000", "source": "570", "agent": "570", "penalty": ""},
{"queue": "10000", "source": "553", "agent": "553", "penalty": ""}
]
}',
CURLOPT_HTTPHEADER => array(
'X-APIKEY: 9UV0BWKRL83PYIH9Gv1fI85d41lO4S932EeX3wHC47sHjMJOMG',
'Authorization: Basic c2Fkcjo=',
'Content-Type: application/json'
),
));

$response = curl_exec($curl);

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