채팅
메시지 직접 전송
AI 에이전트 응답 없이 고객에게 메시지 한 건을 채팅의 채널로 보냅니다.
origin=operator는 상담사 답장을 보냅니다. 워크스페이스 API 키를 사용할 때는 API 키로POST /chats/{chat_id}/takeover를 호출한 뒤이거나initial_responder_type=operator로 생성된 경우처럼 지정된 상담사 없이 사람이 응대 중인 채팅이어야 합니다. AI 에이전트나 지정된 상담사가 응대 중인 채팅은 403 CHAT_RESPONDER_MISMATCH를 반환합니다. 이미 처리된 요청은 응답 담당이 바뀐 뒤에도 같은client_idempotency_key에 대해 저장된 결과를 반환합니다.origin=system은 안내를 보내며 워크스페이스 API 키가 필요합니다.
보낸 메시지는 대화록에 origin과 같은 role로 남습니다.
POST
/
chats
/
{chat_id}
/
outbound-messages
메시지 직접 전송
curl --request POST \
--url https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"origin": "operator",
"client_idempotency_key": "<string>",
"text": "<string>",
"images": [
{
"type": "file_key",
"file_key": "file_abc123"
}
],
"navertalk": {
"text_content": {
"text": "<string>",
"quick_reply": {
"button_list": [
{
"type": "TEXT",
"data": {
"title": "<string>",
"code": "<string>"
}
}
]
}
},
"composite_content": null
}
}
'import requests
url = "https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages"
payload = {
"origin": "operator",
"client_idempotency_key": "<string>",
"text": "<string>",
"images": [
{
"type": "file_key",
"file_key": "file_abc123"
}
],
"navertalk": {
"text_content": {
"text": "<string>",
"quick_reply": { "button_list": [
{
"type": "TEXT",
"data": {
"title": "<string>",
"code": "<string>"
}
}
] }
},
"composite_content": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
origin: 'operator',
client_idempotency_key: '<string>',
text: '<string>',
images: [{type: 'file_key', file_key: 'file_abc123'}],
navertalk: {
text_content: {
text: '<string>',
quick_reply: {button_list: [{type: 'TEXT', data: {title: '<string>', code: '<string>'}}]}
},
composite_content: null
}
})
};
fetch('https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages', 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}/outbound-messages",
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([
'origin' => 'operator',
'client_idempotency_key' => '<string>',
'text' => '<string>',
'images' => [
[
'type' => 'file_key',
'file_key' => 'file_abc123'
]
],
'navertalk' => [
'text_content' => [
'text' => '<string>',
'quick_reply' => [
'button_list' => [
[
'type' => 'TEXT',
'data' => [
'title' => '<string>',
'code' => '<string>'
]
]
]
]
],
'composite_content' => null
]
]),
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/chats/{chat_id}/outbound-messages"
payload := strings.NewReader("{\n \"origin\": \"operator\",\n \"client_idempotency_key\": \"<string>\",\n \"text\": \"<string>\",\n \"images\": [\n {\n \"type\": \"file_key\",\n \"file_key\": \"file_abc123\"\n }\n ],\n \"navertalk\": {\n \"text_content\": {\n \"text\": \"<string>\",\n \"quick_reply\": {\n \"button_list\": [\n {\n \"type\": \"TEXT\",\n \"data\": {\n \"title\": \"<string>\",\n \"code\": \"<string>\"\n }\n }\n ]\n }\n },\n \"composite_content\": null\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"operator\",\n \"client_idempotency_key\": \"<string>\",\n \"text\": \"<string>\",\n \"images\": [\n {\n \"type\": \"file_key\",\n \"file_key\": \"file_abc123\"\n }\n ],\n \"navertalk\": {\n \"text_content\": {\n \"text\": \"<string>\",\n \"quick_reply\": {\n \"button_list\": [\n {\n \"type\": \"TEXT\",\n \"data\": {\n \"title\": \"<string>\",\n \"code\": \"<string>\"\n }\n }\n ]\n }\n },\n \"composite_content\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"operator\",\n \"client_idempotency_key\": \"<string>\",\n \"text\": \"<string>\",\n \"images\": [\n {\n \"type\": \"file_key\",\n \"file_key\": \"file_abc123\"\n }\n ],\n \"navertalk\": {\n \"text_content\": {\n \"text\": \"<string>\",\n \"quick_reply\": {\n \"button_list\": [\n {\n \"type\": \"TEXT\",\n \"data\": {\n \"title\": \"<string>\",\n \"code\": \"<string>\"\n }\n }\n ]\n }\n },\n \"composite_content\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"chat_id": "<string>",
"role": "operator",
"content": "<string>",
"delivery": {
"channel": "api",
"status": "stored",
"provider_message_ids": [
"<string>"
],
"error_code": "<string>",
"error_message": "<string>"
},
"attachments": [
{
"file_key": "<string>",
"mime_type": "<string>"
}
]
}Authorizations
Headers
AI 에이전트가 응답 중인 고객 메시지의 ID입니다. 네이버톡톡과 위챗 채팅에 origin=system으로 보낼 때 필요하며, 누락되면 400 NAVERTALK_SOURCE_REQUIRED 또는 WECHAT_SOURCE_REQUIRED를 반환합니다. AI 에이전트가 더 이상 해당 메시지를 처리하지 않거나 그 뒤에 고객 메시지, 안내, 상담사 답장이 들어왔으면 409 CHAT_TURN_SUPERSEDED를 반환합니다. 다른 채널에서는 무시합니다.
AI 에이전트가 응답 중인 고객 메시지의 ID입니다. 네이버톡톡과 위챗 채팅에 origin=system으로 보낼 때 필요하며, ID가 없으면 400 NAVERTALK_SOURCE_REQUIRED 또는 WECHAT_SOURCE_REQUIRED를 반환합니다. AI 에이전트가 더 이상 해당 메시지를 처리하지 않거나 그 뒤에 고객 메시지, 안내, 상담사 답장이 들어왔으면 409 CHAT_TURN_SUPERSEDED를 반환합니다. 다른 채널에서는 무시합니다.
Required range:
1 <= x <= 9223372036854776000Body
application/json
이 엔드포인트의 요청 데이터입니다.
보낼 메시지 텍스트입니다.
Minimum string length:
1Response
성공 응답
Was this page helpful?
⌘I
메시지 직접 전송
curl --request POST \
--url https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"origin": "operator",
"client_idempotency_key": "<string>",
"text": "<string>",
"images": [
{
"type": "file_key",
"file_key": "file_abc123"
}
],
"navertalk": {
"text_content": {
"text": "<string>",
"quick_reply": {
"button_list": [
{
"type": "TEXT",
"data": {
"title": "<string>",
"code": "<string>"
}
}
]
}
},
"composite_content": null
}
}
'import requests
url = "https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages"
payload = {
"origin": "operator",
"client_idempotency_key": "<string>",
"text": "<string>",
"images": [
{
"type": "file_key",
"file_key": "file_abc123"
}
],
"navertalk": {
"text_content": {
"text": "<string>",
"quick_reply": { "button_list": [
{
"type": "TEXT",
"data": {
"title": "<string>",
"code": "<string>"
}
}
] }
},
"composite_content": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
origin: 'operator',
client_idempotency_key: '<string>',
text: '<string>',
images: [{type: 'file_key', file_key: 'file_abc123'}],
navertalk: {
text_content: {
text: '<string>',
quick_reply: {button_list: [{type: 'TEXT', data: {title: '<string>', code: '<string>'}}]}
},
composite_content: null
}
})
};
fetch('https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages', 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}/outbound-messages",
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([
'origin' => 'operator',
'client_idempotency_key' => '<string>',
'text' => '<string>',
'images' => [
[
'type' => 'file_key',
'file_key' => 'file_abc123'
]
],
'navertalk' => [
'text_content' => [
'text' => '<string>',
'quick_reply' => [
'button_list' => [
[
'type' => 'TEXT',
'data' => [
'title' => '<string>',
'code' => '<string>'
]
]
]
]
],
'composite_content' => null
]
]),
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/chats/{chat_id}/outbound-messages"
payload := strings.NewReader("{\n \"origin\": \"operator\",\n \"client_idempotency_key\": \"<string>\",\n \"text\": \"<string>\",\n \"images\": [\n {\n \"type\": \"file_key\",\n \"file_key\": \"file_abc123\"\n }\n ],\n \"navertalk\": {\n \"text_content\": {\n \"text\": \"<string>\",\n \"quick_reply\": {\n \"button_list\": [\n {\n \"type\": \"TEXT\",\n \"data\": {\n \"title\": \"<string>\",\n \"code\": \"<string>\"\n }\n }\n ]\n }\n },\n \"composite_content\": null\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"operator\",\n \"client_idempotency_key\": \"<string>\",\n \"text\": \"<string>\",\n \"images\": [\n {\n \"type\": \"file_key\",\n \"file_key\": \"file_abc123\"\n }\n ],\n \"navertalk\": {\n \"text_content\": {\n \"text\": \"<string>\",\n \"quick_reply\": {\n \"button_list\": [\n {\n \"type\": \"TEXT\",\n \"data\": {\n \"title\": \"<string>\",\n \"code\": \"<string>\"\n }\n }\n ]\n }\n },\n \"composite_content\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/chats/{chat_id}/outbound-messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"operator\",\n \"client_idempotency_key\": \"<string>\",\n \"text\": \"<string>\",\n \"images\": [\n {\n \"type\": \"file_key\",\n \"file_key\": \"file_abc123\"\n }\n ],\n \"navertalk\": {\n \"text_content\": {\n \"text\": \"<string>\",\n \"quick_reply\": {\n \"button_list\": [\n {\n \"type\": \"TEXT\",\n \"data\": {\n \"title\": \"<string>\",\n \"code\": \"<string>\"\n }\n }\n ]\n }\n },\n \"composite_content\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"chat_id": "<string>",
"role": "operator",
"content": "<string>",
"delivery": {
"channel": "api",
"status": "stored",
"provider_message_ids": [
"<string>"
],
"error_code": "<string>",
"error_message": "<string>"
},
"attachments": [
{
"file_key": "<string>",
"mime_type": "<string>"
}
]
}