Get Campaigns
curl --request GET \
--url https://app.agentika.site/api/v1/campaign/import requests
url = "https://app.agentika.site/api/v1/campaign/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.agentika.site/api/v1/campaign/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentika.site/api/v1/campaign/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.agentika.site/api/v1/campaign/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.agentika.site/api/v1/campaign/")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/campaign/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"campaigns": [
{
"id": 123,
"name": "<string>",
"workflow_id": 123,
"workflow_name": "<string>",
"state": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"total_rows": 123,
"processed_rows": 123,
"failed_rows": 123,
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"retry_config": {
"enabled": true,
"max_retries": 123,
"retry_delay_seconds": 123,
"retry_on_busy": true,
"retry_on_no_answer": true,
"retry_on_voicemail": true,
"retry_on_voicemail_no_message": false,
"retry_on_screening_timeout": false,
"retry_on_screening_limit": false,
"retry_on_screening_message_missing": false,
"retry_on_ivr_detected": false,
"retry_on_ai_secretary": false,
"retry_on_machine_guard_timeout": false,
"retry_on_carrier_announcement": false,
"retry_on_hello_attempts_exhausted": true,
"retry_on_conversation_start_wait_expired": true
},
"traffic_split": {
"targets": [
{
"workflow_id": 123,
"definition_id": 123,
"weight": 99
}
]
},
"answer_detection": {
"preset": "careful",
"listening_window_ms": 5000,
"human_utterance_max_ms": 5000,
"machine_utterance_cap_ms": 30000,
"classify_budget_ms": 5000,
"screening_wait_ms": 30000,
"max_screening_rearms": 1,
"voicemail_action": "hangup",
"voicemail_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"screening_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"voicemail_message_template": "<string>"
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"effective_target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"caller_id_rotation": {
"mode": "off",
"daily_cap_per_number": 123,
"min_gap_seconds": 123,
"retry_number_policy": "new",
"daily_cap_ceiling": 123,
"effective_daily_cap_per_number": 123,
"min_gap_ceiling_seconds": 123,
"effective_min_gap_seconds": 123,
"number_chosen_by_operator": false,
"unavailable_reason": "<string>"
},
"pause_pending": false,
"source_filename": "<string>",
"max_concurrency": 123,
"schedule_config": {
"enabled": true,
"timezone": "<string>",
"slots": [
{
"day_of_week": 123,
"start_time": "<string>",
"end_time": "<string>"
}
]
},
"circuit_breaker": {
"enabled": false,
"failure_threshold": 0.5,
"window_seconds": 120,
"min_calls_in_window": 5
},
"executed_count": 0,
"total_queued_count": 0,
"parent_campaign_id": 123,
"redialed_campaign_id": 123,
"telephony_configuration_id": 123,
"telephony_configuration_name": "<string>",
"logs": [
{
"ts": "<string>",
"level": "<string>",
"event": "<string>",
"message": "<string>",
"details": {}
}
],
"pause_reason": "<string>",
"overview": {
"outcomes": {
"connected": 0,
"no_answer": 0,
"busy": 0,
"other": 0
},
"hourly": [
{
"hour": 11,
"connected": 0,
"other": 0
}
],
"progress": {
"total_contacts": 0,
"processed": 0,
"queued_remaining": 0
},
"dialing": {
"can_dial": true,
"reason": "not_started",
"next_window_start": "2023-11-07T05:31:56Z",
"resume_at": "2023-11-07T05:31:56Z"
},
"goals": [
{
"action_id": "<string>",
"label": "<string>",
"runs": 123,
"calls": 123,
"rate": 123
}
]
}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Кампании
Список кампаний
Получить список всех кампаний вашей организации
GET
/
api
/
v1
/
campaign
/
Get Campaigns
curl --request GET \
--url https://app.agentika.site/api/v1/campaign/import requests
url = "https://app.agentika.site/api/v1/campaign/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.agentika.site/api/v1/campaign/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentika.site/api/v1/campaign/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.agentika.site/api/v1/campaign/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.agentika.site/api/v1/campaign/")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/campaign/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"campaigns": [
{
"id": 123,
"name": "<string>",
"workflow_id": 123,
"workflow_name": "<string>",
"state": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"total_rows": 123,
"processed_rows": 123,
"failed_rows": 123,
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"retry_config": {
"enabled": true,
"max_retries": 123,
"retry_delay_seconds": 123,
"retry_on_busy": true,
"retry_on_no_answer": true,
"retry_on_voicemail": true,
"retry_on_voicemail_no_message": false,
"retry_on_screening_timeout": false,
"retry_on_screening_limit": false,
"retry_on_screening_message_missing": false,
"retry_on_ivr_detected": false,
"retry_on_ai_secretary": false,
"retry_on_machine_guard_timeout": false,
"retry_on_carrier_announcement": false,
"retry_on_hello_attempts_exhausted": true,
"retry_on_conversation_start_wait_expired": true
},
"traffic_split": {
"targets": [
{
"workflow_id": 123,
"definition_id": 123,
"weight": 99
}
]
},
"answer_detection": {
"preset": "careful",
"listening_window_ms": 5000,
"human_utterance_max_ms": 5000,
"machine_utterance_cap_ms": 30000,
"classify_budget_ms": 5000,
"screening_wait_ms": 30000,
"max_screening_rearms": 1,
"voicemail_action": "hangup",
"voicemail_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"screening_message": {
"text": "",
"recording_id": "<string>",
"recording_pk": 1
},
"voicemail_message_template": "<string>"
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"effective_target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"caller_id_rotation": {
"mode": "off",
"daily_cap_per_number": 123,
"min_gap_seconds": 123,
"retry_number_policy": "new",
"daily_cap_ceiling": 123,
"effective_daily_cap_per_number": 123,
"min_gap_ceiling_seconds": 123,
"effective_min_gap_seconds": 123,
"number_chosen_by_operator": false,
"unavailable_reason": "<string>"
},
"pause_pending": false,
"source_filename": "<string>",
"max_concurrency": 123,
"schedule_config": {
"enabled": true,
"timezone": "<string>",
"slots": [
{
"day_of_week": 123,
"start_time": "<string>",
"end_time": "<string>"
}
]
},
"circuit_breaker": {
"enabled": false,
"failure_threshold": 0.5,
"window_seconds": 120,
"min_calls_in_window": 5
},
"executed_count": 0,
"total_queued_count": 0,
"parent_campaign_id": 123,
"redialed_campaign_id": 123,
"telephony_configuration_id": 123,
"telephony_configuration_name": "<string>",
"logs": [
{
"ts": "<string>",
"level": "<string>",
"event": "<string>",
"message": "<string>",
"details": {}
}
],
"pause_reason": "<string>",
"overview": {
"outcomes": {
"connected": 0,
"no_answer": 0,
"busy": 0,
"other": 0
},
"hourly": [
{
"hour": 11,
"connected": 0,
"other": 0
}
],
"progress": {
"total_contacts": 0,
"processed": 0,
"queued_remaining": 0
},
"dialing": {
"can_dial": true,
"reason": "not_started",
"next_window_start": "2023-11-07T05:31:56Z",
"resume_at": "2023-11-07T05:31:56Z"
},
"goals": [
{
"action_id": "<string>",
"label": "<string>",
"runs": 123,
"calls": 123,
"rate": 123
}
]
}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}В элементах списка поле
logs всегда пустое ([]) и блок overview не заполняется: журнал и сводка доступны в получении кампании.