Skip to main content
GET
/
api
/
workers
/
{workerId}
/
deploymentLogs
/
voice
/
{logId}
JavaScript
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 voice = await client.workers.deploymentLogs.voice.retrieve('logId', { workerId: 'workerId' });

console.log(voice);
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
)
voice = client.workers.deployment_logs.voice.retrieve(
log_id="logId",
worker_id="workerId",
)
print(voice)
curl --request GET \
--url https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice/{logId} \
--header 'x-api-key: <api-key>'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice/{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/workers/{workerId}/deploymentLogs/voice/{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/workers/{workerId}/deploymentLogs/voice/{logId}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice/{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>",
  "startTime": "2023-11-07T05:31:56Z",
  "endTime": "2023-11-07T05:31:56Z",
  "externalCallId": "<string>",
  "direction": "<string>",
  "fromNumber": "<string>",
  "toNumber": "<string>",
  "transcription": "<string>",
  "messages": {},
  "recordingUrl": "<string>",
  "data": {
    "latency": {},
    "tts": {},
    "llm_websocket_network_rtt": 123
  },
  "Telephony_source": "<string>",
  "status": "<string>",
  "call_sid": "<string>",
  "duration": 123,
  "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
    }
  }
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required
logId
string
required

Query Parameters

fields
string

Comma-separated list of fields to include in the response. When omitted, all fields are returned. The id field is always included. Allowed fields: id, createdAt, updatedAt, workerId, deploymentId, flowId, bbEngineSessionId, extractionsData, metadata, flowSnapshot, sessionLogData, type, startTime, endTime, externalCallId, direction, fromNumber, toNumber, transcription, messages, recordingUrl, data, Telephony_source, status, call_sid, duration, successResults, transferData

Response

Voice deployment log record

id
string
required
startTime
string<date-time> | null
endTime
string<date-time> | null
externalCallId
string | null
direction
string | null
fromNumber
string | null
toNumber
string | null
transcription
string | null
messages
object | null
recordingUrl
string | null
data
object | null

Additional structured data from the call, including post-call analytics and latency metrics

Telephony_source
string | null
status
string | null
call_sid
string | null
duration
integer | null
transferData
object | null

Transfer data associated with this call, if any. 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.