import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const response = await client.voiceAnalysis.retrieveLog('logId');
console.log(response.id);import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
response = client.voice_analysis.retrieve_log(
"logId",
)
print(response.id)curl --request GET \
--url https://brainbase-monorepo-api.onrender.com/api/logs/{logId} \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/logs/{logId}",
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://brainbase-monorepo-api.onrender.com/api/logs/{logId}"
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://brainbase-monorepo-api.onrender.com/api/logs/{logId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/logs/{logId}")
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": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"workerId": "<string>",
"deploymentId": "<string>",
"flowId": "<string>",
"type": "VoiceDeploymentLog",
"bbEngineSessionId": "<string>",
"extractionsData": {},
"metadata": {},
"flowSnapshot": "<string>",
"sessionLogData": {},
"transferData": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"callSid": "<string>",
"voiceLogId": "<string>",
"status": "<string>",
"duration": "<string>",
"transferEvents": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"duration": "<string>",
"toNumber": "<string>",
"fromNumber": "<string>",
"callTransferId": "<string>",
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"parentCallSid": "<string>",
"callSid": "<string>"
}
],
"metrics": {
"transfers": 123,
"transferMinutes": 123,
"transferEvents": 123,
"transferEventMinutes": 123
}
}
}{
"error": "API key is required",
"code": "UNAUTHORIZED"
}{
"error": "Deployment log not found"
}Retrieve a deployment log by ID
Fetches a single deployment log record by its ID, without requiring the worker or deployment ID. Works for all log types: Voice, Chat, ChatEmbed, Whatsapp, SMS, API, and Email. Delegate-specific fields (e.g. transcription for voice, messages for chat) are flattened into the response automatically.
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const response = await client.voiceAnalysis.retrieveLog('logId');
console.log(response.id);import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
response = client.voice_analysis.retrieve_log(
"logId",
)
print(response.id)curl --request GET \
--url https://brainbase-monorepo-api.onrender.com/api/logs/{logId} \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/logs/{logId}",
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://brainbase-monorepo-api.onrender.com/api/logs/{logId}"
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://brainbase-monorepo-api.onrender.com/api/logs/{logId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/logs/{logId}")
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": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"workerId": "<string>",
"deploymentId": "<string>",
"flowId": "<string>",
"type": "VoiceDeploymentLog",
"bbEngineSessionId": "<string>",
"extractionsData": {},
"metadata": {},
"flowSnapshot": "<string>",
"sessionLogData": {},
"transferData": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"callSid": "<string>",
"voiceLogId": "<string>",
"status": "<string>",
"duration": "<string>",
"transferEvents": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"duration": "<string>",
"toNumber": "<string>",
"fromNumber": "<string>",
"callTransferId": "<string>",
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"parentCallSid": "<string>",
"callSid": "<string>"
}
],
"metrics": {
"transfers": 123,
"transferMinutes": 123,
"transferEvents": 123,
"transferEventMinutes": 123
}
}
}{
"error": "API key is required",
"code": "UNAUTHORIZED"
}{
"error": "Deployment log not found"
}Authorizations
API key authentication
Path Parameters
The deployment log ID (e.g. log_82788ca4-6e9f-4778-83d4-96868cbe5edb)
Response
Deployment log record with type-specific fields flattened
The log delegate type — determines which type-specific fields are present
VoiceDeploymentLog, ChatDeploymentLog, ChatEmbedDeploymentLog, WhatsappDeploymentLog, SmsDeploymentLog, ApiDeploymentLog, EmailDeploymentLog Voice transfer data, if this is a voice log with a transfer. metrics.transfers is 1 for a call with a transfer record and aligns with voice analysis transfer counts; metrics.transferEvents is the raw callback/event count.
Show child attributes
Show child attributes
