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>"
}
]
}Get Conversation
One call: contexts, cost, SMS, and signed links to download the recording and transcript (recording_download_url, transcript_download_url, valid until download_urls_expire_at).
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>"
}
]
}Authorizations
Your organization's API key (account in the bottom-left of the dashboard → Brosbots API).
Path Parameters
The agent's ID: the public agent_ + 20 characters identifier shown in the dashboard (recommended), or the legacy number. Both address the same agent.
^agent_[A-Za-z0-9]{20}$"agent_7fK2mQ9xLp3RtV8wYb1N"
Response
Successful Response
One conversation, with links to download its files.
Storage key of the file (e.g. recordings/580.wav), not a URL. Kept for existing integrations; download through transcript_download_url instead.
Storage key of the file (e.g. recordings/580.wav), not a URL. Kept for existing integrations; download through recording_download_url instead.
inbound, outbound Show child attributes
Show child attributes
Call length in whole seconds; null until the call has ended. The same value call.completed sends as duration_seconds.
Signed HTTPS link to the transcript text file, valid until download_urls_expire_at. No API key needed to open it.
Signed HTTPS link to the WAV recording, valid until download_urls_expire_at. No API key needed to open it.
When the download links stop working (1 hour after the request). Fetch the conversation again for fresh ones.