보유 전화번호 에이전트 설정
전화번호의 인바운드/아웃바운드 에이전트 매핑을 설정하거나 해제합니다.
curl --request PATCH \
--url https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"outbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"sms_inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
}
}
'import requests
url = "https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent"
payload = {
"inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"outbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"sms_inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inbound_agent: {agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', agent_version: 'current'},
outbound_agent: {agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', agent_version: 'current'},
sms_inbound_agent: {agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', agent_version: 'current'}
})
};
fetch('https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent', 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/organization-telephone-numbers/{organization_telephone_number_id}/agent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'inbound_agent' => [
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version' => 'current'
],
'outbound_agent' => [
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version' => 'current'
],
'sms_inbound_agent' => [
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version' => 'current'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent"
payload := strings.NewReader("{\n \"inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"outbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"sms_inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"outbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"sms_inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"outbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"sms_inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"number": "<string>",
"provider": "vox",
"status": "active",
"start_at": 123,
"created_at": 123,
"updated_at": 123,
"monthly_fee": 123,
"address": "<string>",
"inbound_trunk_id": "<string>",
"outbound_trunk_id": "<string>",
"inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"outbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"sms_inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"memo": "<string>",
"end_at": 123,
"cancel_requested_at": 123
}{
"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": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}Authorizations
조직 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.
Path Parameters
조직 보유 전화번호 ID입니다. 전화번호 문자열이 아니라 GET /v3/organization-telephone-numbers 응답의 id를 사용합니다.
Body
음성 수신·발신 및 SMS 수신 에이전트 매핑 요청입니다. 매핑을 해제하려면 null을, 설정하려면 agent_id와 선택적인 agent_version을 보내세요.
에이전트 매핑 수정 요청입니다.
PATCH 동작 규칙(v3 convention, §2.3):
- 필드를 생략하면 기존 매핑을 유지합니다.
- 필드에 null을 보내면 매핑을 해제합니다(nullable column).
- 빈 body(
{})는 PatchRequest base에서 400으로 거부합니다.
인바운드 에이전트 매핑. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 매핑이 해제됩니다.
Show child attributes
Show child attributes
아웃바운드 에이전트 매핑. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 매핑이 해제됩니다.
Show child attributes
Show child attributes
문자 수신 담당입니다. 생략하면 유지, null이면 해제합니다. 기존 채팅의 담당은 변경하지 않습니다.
Show child attributes
Show child attributes
Response
성공 응답
조직 보유 전화번호 응답입니다.
전화번호 레코드의 고유 식별자입니다.
등록된 전화번호입니다. 하이픈 없는 숫자 문자열로 반환됩니다.
번호 제공자 구분입니다. 'vox'(vox.ai 구매 번호) 또는 'custom'(자체 보유 번호) 중 하나입니다.
vox, custom 번호의 현재 상태를 나타냅니다. 'active'(사용 중), 'scheduled'(예약됨), 'cancel_requested'(해지 요청됨), 'expired'(만료됨) 중 하나입니다.
active, scheduled, cancel_requested, expired 전화번호 서비스 시작일입니다. unix timestamp (ms).
리소스 생성 시각입니다. unix milliseconds 형식입니다.
리소스 마지막 수정 시각입니다. unix milliseconds 형식입니다.
월 사용료입니다. 단위는 원(KRW)이며, provider가 'custom'인 경우 null일 수 있습니다.
SIP trunk 연동 주소입니다. SIP 설정이 없으면 null입니다.
인바운드 SIP trunk의 고유 식별자입니다. SIP 설정이 없으면 null입니다.
아웃바운드 SIP trunk의 고유 식별자입니다. SIP 설정이 없으면 null입니다.
이 번호에 매핑된 인바운드 에이전트 정보입니다. 매핑이 없으면 null입니다.
Show child attributes
Show child attributes
이 번호에 매핑된 아웃바운드 에이전트 정보입니다. 매핑이 없으면 null입니다.
Show child attributes
Show child attributes
문자 수신 에이전트입니다. 미지정이면 null이며 새 AI 채팅을 시작하지 않습니다.
Show child attributes
Show child attributes
전화번호에 대한 메모입니다. 설정되지 않았으면 null입니다.
전화번호 서비스 종료일입니다. unix timestamp (ms). 해지 예약이 없으면 null입니다.
해지 요청이 접수된 일시입니다. unix timestamp (ms). 해지 요청이 없으면 null입니다.
Was this page helpful?
curl --request PATCH \
--url https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"outbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"sms_inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
}
}
'import requests
url = "https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent"
payload = {
"inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"outbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"sms_inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inbound_agent: {agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', agent_version: 'current'},
outbound_agent: {agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', agent_version: 'current'},
sms_inbound_agent: {agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', agent_version: 'current'}
})
};
fetch('https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent', 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/organization-telephone-numbers/{organization_telephone_number_id}/agent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'inbound_agent' => [
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version' => 'current'
],
'outbound_agent' => [
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version' => 'current'
],
'sms_inbound_agent' => [
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version' => 'current'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent"
payload := strings.NewReader("{\n \"inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"outbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"sms_inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"outbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"sms_inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/organization-telephone-numbers/{organization_telephone_number_id}/agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"outbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n },\n \"sms_inbound_agent\": {\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version\": \"current\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"number": "<string>",
"provider": "vox",
"status": "active",
"start_at": 123,
"created_at": 123,
"updated_at": 123,
"monthly_fee": 123,
"address": "<string>",
"inbound_trunk_id": "<string>",
"outbound_trunk_id": "<string>",
"inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"outbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"sms_inbound_agent": {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version": "current"
},
"memo": "<string>",
"end_at": 123,
"cancel_requested_at": 123
}{
"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": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}