curl --request GET \
--url https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}', 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://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-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://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"workflow_id": 123,
"name": "<string>",
"mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"is_completed": true,
"transcript_url": "<string>",
"recording_url": "<string>",
"cost_info": {},
"definition_id": 123,
"call_type": "inbound",
"provider_call_id": "<string>",
"initial_context": {},
"gathered_context": {},
"logs": {},
"sms_messages": [],
"duration_seconds": 123,
"transcript_download_url": "<string>",
"recording_download_url": "<string>",
"download_urls_expire_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Szczegóły rozmowy
Zwraca pojedynczy przebieg: zebrane dane, koszt, czas trwania, SMS-y i podpisane linki do pobrania nagrania i transkrypcji (recording_download_url, transcript_download_url, ważne do download_urls_expire_at, domyślnie 1 h). Pola recording_url / transcript_url to klucze w magazynie plików, nie adresy URL - zostają dla zgodności z istniejącymi integracjami.
curl --request GET \
--url https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}', 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://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-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://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/agents/{agent_id}/conversations/{conversation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 123,
"workflow_id": 123,
"name": "<string>",
"mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"is_completed": true,
"transcript_url": "<string>",
"recording_url": "<string>",
"cost_info": {},
"definition_id": 123,
"call_type": "inbound",
"provider_call_id": "<string>",
"initial_context": {},
"gathered_context": {},
"logs": {},
"sms_messages": [],
"duration_seconds": 123,
"transcript_download_url": "<string>",
"recording_download_url": "<string>",
"download_urls_expire_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Autoryzacje
Klucz API organizacji (konto w lewym dolnym rogu panelu → Brosbots API).
Parametry ścieżki
ID agenta: publiczny identyfikator agent_ + 20 znaków (pokazywany w panelu, zalecany) albo dotychczasowy numer. Oba wskazują tego samego agenta.
^agent_[A-Za-z0-9]{20}$"agent_7fK2mQ9xLp3RtV8wYb1N"
Odpowiedź
Pomyślna odpowiedź
Jedna rozmowa z linkami do pobrania jej plików.
Klucz pliku w magazynie (np. recordings/580.wav), nie URL. Zostawiony dla istniejących integracji; pobieraj przez transcript_download_url.
Klucz pliku w magazynie (np. recordings/580.wav), nie URL. Zostawiony dla istniejących integracji; pobieraj przez recording_download_url.
inbound, outbound Show child attributes
Show child attributes
Długość rozmowy w pełnych sekundach; null, dopóki rozmowa trwa. Ta sama wartość, którą zdarzenie call.completed wysyła jako duration_seconds.
Podpisany link HTTPS do pliku tekstowego transkrypcji, ważny do download_urls_expire_at. Nie wymaga klucza API.
Podpisany link HTTPS do nagrania WAV, ważny do download_urls_expire_at. Nie wymaga klucza API.
Kiedy linki do pobrania przestają działać (godzinę po zapytaniu). Pobierz rozmowę ponownie, aby dostać nowe.
