curl --request POST \
--url https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "05261D01CC88F5A8C0C7C3A1EF74E430",
"inbound": true,
"outbound": true,
"mediaType": "AUDIO_AND_VIDEO",
"useDefault": true,
"enabled": false,
"enabledChangedAt": 1622024333000
}
'import requests
url = "https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}"
payload = {
"agentId": "05261D01CC88F5A8C0C7C3A1EF74E430",
"inbound": True,
"outbound": True,
"mediaType": "AUDIO_AND_VIDEO",
"useDefault": True,
"enabled": False,
"enabledChangedAt": 1622024333000
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"agentId\": \"05261D01CC88F5A8C0C7C3A1EF74E430\",\n \"inbound\": true,\n \"outbound\": true,\n \"mediaType\": \"AUDIO_AND_VIDEO\",\n \"useDefault\": true,\n \"enabled\": false,\n \"enabledChangedAt\": 1622024333000\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"05261D01CC88F5A8C0C7C3A1EF74E430\",\n \"inbound\": true,\n \"outbound\": true,\n \"mediaType\": \"AUDIO_AND_VIDEO\",\n \"useDefault\": true,\n \"enabled\": false,\n \"enabledChangedAt\": 1622024333000\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '05261D01CC88F5A8C0C7C3A1EF74E430',
'inbound' => true,
'outbound' => true,
'mediaType' => 'AUDIO_AND_VIDEO',
'useDefault' => true,
'enabled' => false,
'enabledChangedAt' => 1622024333000
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '05261D01CC88F5A8C0C7C3A1EF74E430',
inbound: true,
outbound: true,
mediaType: 'AUDIO_AND_VIDEO',
useDefault: true,
enabled: false,
enabledChangedAt: 1622024333000
})
};
fetch('https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"inbound": true,
"outbound": true,
"autoCompose": false,
"mediaType": "AUDIO_AND_VIDEO",
"videoDownloadPreparation": false,
"enabled": true,
"enabledChangedAt": 1622024333000
}Create agent recording configuration
Use this method to create an agent recording configuration. More info.
Required scope: Enable one of: conversations:manage.
curl --request POST \
--url https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "05261D01CC88F5A8C0C7C3A1EF74E430",
"inbound": true,
"outbound": true,
"mediaType": "AUDIO_AND_VIDEO",
"useDefault": true,
"enabled": false,
"enabledChangedAt": 1622024333000
}
'import requests
url = "https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}"
payload = {
"agentId": "05261D01CC88F5A8C0C7C3A1EF74E430",
"inbound": True,
"outbound": True,
"mediaType": "AUDIO_AND_VIDEO",
"useDefault": True,
"enabled": False,
"enabledChangedAt": 1622024333000
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"agentId\": \"05261D01CC88F5A8C0C7C3A1EF74E430\",\n \"inbound\": true,\n \"outbound\": true,\n \"mediaType\": \"AUDIO_AND_VIDEO\",\n \"useDefault\": true,\n \"enabled\": false,\n \"enabledChangedAt\": 1622024333000\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"05261D01CC88F5A8C0C7C3A1EF74E430\",\n \"inbound\": true,\n \"outbound\": true,\n \"mediaType\": \"AUDIO_AND_VIDEO\",\n \"useDefault\": true,\n \"enabled\": false,\n \"enabledChangedAt\": 1622024333000\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => '05261D01CC88F5A8C0C7C3A1EF74E430',
'inbound' => true,
'outbound' => true,
'mediaType' => 'AUDIO_AND_VIDEO',
'useDefault' => true,
'enabled' => false,
'enabledChangedAt' => 1622024333000
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '05261D01CC88F5A8C0C7C3A1EF74E430',
inbound: true,
outbound: true,
mediaType: 'AUDIO_AND_VIDEO',
useDefault: true,
enabled: false,
enabledChangedAt: 1622024333000
})
};
fetch('https://api.messaging.phonovation.com/ccaas/voice/2/agent-recording-configs/{agentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"inbound": true,
"outbound": true,
"autoCompose": false,
"mediaType": "AUDIO_AND_VIDEO",
"videoDownloadPreparation": false,
"enabled": true,
"enabledChangedAt": 1622024333000
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Path Parameters
Agent id of agent recording config to create.
Body
Specifies whether the recording should be done on audio or both audio and video.
AUDIO, AUDIO_AND_VIDEO Inbound record call direction enabled. At least one of the parameters 'inbound' or 'outbound' must be set to true.
Outbound record call direction enabled. At least one of the parameters 'inbound' or 'outbound' must be set to true.
Use account recording config as default.
Response
OK
ID of the agent to which the recording configuration belongs.
Specifies whether the recording should be done on audio or both audio and video.
AUDIO, AUDIO_AND_VIDEO Inbound record call direction enabled. At least one of the parameters 'inbound' or 'outbound' must be set to true.
Outbound record call direction enabled. At least one of the parameters 'inbound' or 'outbound' must be set to true.
Use account recording config as default.