채팅
사람 상담으로 채팅 이어받기
AI 에이전트가 응대하던 채팅을 사람이 넘겨받습니다. 에이전트는 더 답하지 않고, 고객 메시지는 사람이 볼 수 있게 저장되며, 답장은 POST /chats/{chat_id}/outbound-messages에 origin=operator로 보냅니다. 상담사로 등록된 대시보드 사용자는 그 상담사로 넘겨받고, 그 밖의 대시보드 사용자, 워크스페이스 API 키, 워크스페이스 범위 관리자는 상담사 등록 없이 사람으로 넘겨받습니다. 다른 상담사가 이미 맡은 채팅은 거절합니다. 응답에 바뀐 responder를 담으며, 고객에게는 알리지 않습니다.
POST
/
chats
/
{chat_id}
/
takeover
사람 상담으로 채팅 이어받기
curl --request POST \
--url https://client-api.tryvox.co/v3/chats/{chat_id}/takeover \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://client-api.tryvox.co/v3/chats/{chat_id}/takeover"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://client-api.tryvox.co/v3/chats/{chat_id}/takeover', 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/chats/{chat_id}/takeover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/chats/{chat_id}/takeover"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://client-api.tryvox.co/v3/chats/{chat_id}/takeover")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/chats/{chat_id}/takeover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"channel": "<string>",
"responder": {
"type": "agent",
"operator": {
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"changed_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": "CHAT_NOT_FOUND",
"message": "채팅을 찾을 수 없습니다.",
"details": {
"chat_id": "22222222-2222-4222-8222-222222222222"
}
}
}{
"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
BearerAuthSupabaseJwtBearer
Headers
중복 실행 방지를 위한 필수 key입니다. Redis 보호는 24시간 유지되지만 원래 200 responder snapshot replay는 responder receipt 보존 기간에 한정되며, 조직 transcript retention이 더 일찍 삭제할 수 있습니다. 상태를 변경하는 POST 요청에 필요한 멱등성 키입니다. 24시간 동안 안전하게 재시도할 때 사용합니다. 값은 비어 있으면 안 됩니다. 최대 255자까지 허용합니다.
Required string length:
1 - 255Was this page helpful?
⌘I
사람 상담으로 채팅 이어받기
curl --request POST \
--url https://client-api.tryvox.co/v3/chats/{chat_id}/takeover \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://client-api.tryvox.co/v3/chats/{chat_id}/takeover"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://client-api.tryvox.co/v3/chats/{chat_id}/takeover', 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/chats/{chat_id}/takeover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/chats/{chat_id}/takeover"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.post("https://client-api.tryvox.co/v3/chats/{chat_id}/takeover")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/chats/{chat_id}/takeover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"channel": "<string>",
"responder": {
"type": "agent",
"operator": {
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"changed_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": "CHAT_NOT_FOUND",
"message": "채팅을 찾을 수 없습니다.",
"details": {
"chat_id": "22222222-2222-4222-8222-222222222222"
}
}
}{
"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": {}
}
}