캠페인
캠페인 목록 조회
인증된 조직의 아웃바운드 캠페인 목록을 조회합니다. 상태, 에이전트, 생성 시각으로 필터링할 수 있습니다.
GET
/
campaigns
캠페인 목록 조회
curl --request GET \
--url https://client-api.tryvox.co/v3/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://client-api.tryvox.co/v3/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client-api.tryvox.co/v3/campaigns', 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://client-api.tryvox.co/v3/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://client-api.tryvox.co/v3/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://client-api.tryvox.co/v3/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"name": "<string>",
"agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"from_number": "<string>",
"total_calls": 123,
"completed_calls": 123,
"failed_calls": 123,
"concurrency": 123,
"active_concurrency": 123,
"created_at": 123,
"presentation_number": "<string>",
"scheduled_at": 123,
"finished_at": 123,
"paused_at": 123,
"call_time_window": {
"windows": [
{
"start_min": 1,
"end_min": 123,
"days": []
}
],
"timezone": "Asia/Seoul",
"auto_resume": true
}
}
],
"total_count": 123,
"next_cursor": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 5,
"window_seconds": 1
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}Authorizations
조직 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.
Query Parameters
상태 필터입니다. 여러 상태를 지원하는 endpoint에서는 query parameter를 반복해서 전달합니다.
Available options:
draft, pending, ongoing, paused, success, fail, canceled 에이전트 UUID 필터입니다. 여러 에이전트로 필터링하려면 query parameter를 반복해서 전달합니다.
생성 시각 하한입니다(unix ms 포함). 10~11자리 unix 초 입력도 허용하며, 자동으로 ms로 정규화합니다.
생성 시각 상한입니다(unix ms 포함). 10~11자리 unix 초 입력도 허용하며, 자동으로 ms로 정규화합니다.
정렬 방향입니다. 허용값은 asc, desc입니다.
Available options:
asc, desc 이전 응답의 next_cursor 값입니다. 다음 페이지를 조회할 때 그대로 전달합니다.
반환할 최대 항목 수입니다. v3 목록 endpoint는 1~100을 허용합니다.
Required range:
1 <= x <= 100Was this page helpful?
⌘I
캠페인 목록 조회
curl --request GET \
--url https://client-api.tryvox.co/v3/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://client-api.tryvox.co/v3/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client-api.tryvox.co/v3/campaigns', 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://client-api.tryvox.co/v3/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://client-api.tryvox.co/v3/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://client-api.tryvox.co/v3/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"name": "<string>",
"agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"from_number": "<string>",
"total_calls": 123,
"completed_calls": 123,
"failed_calls": 123,
"concurrency": 123,
"active_concurrency": 123,
"created_at": 123,
"presentation_number": "<string>",
"scheduled_at": 123,
"finished_at": 123,
"paused_at": 123,
"call_time_window": {
"windows": [
{
"start_min": 1,
"end_min": 123,
"days": []
}
],
"timezone": "Asia/Seoul",
"auto_resume": true
}
}
],
"total_count": 123,
"next_cursor": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 5,
"window_seconds": 1
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}