Skip to main content
GET
/
api
/
logs
/
{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 response = await client.voiceAnalysis.retrieveLog('logId');

console.log(response.id);
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "workerId": "<string>",
  "deploymentId": "<string>",
  "flowId": "<string>",
  "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
    }
  }
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

logId
string
required

The deployment log ID (e.g. log_82788ca4-6e9f-4778-83d4-96868cbe5edb)

Response

Deployment log record with type-specific fields flattened

id
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
workerId
string
required
deploymentId
string
required
flowId
string
required
type
enum<string>
required

The log delegate type — determines which type-specific fields are present

Available options:
VoiceDeploymentLog,
ChatDeploymentLog,
ChatEmbedDeploymentLog,
WhatsappDeploymentLog,
SmsDeploymentLog,
ApiDeploymentLog,
EmailDeploymentLog
bbEngineSessionId
string | null
extractionsData
object | null
metadata
object | null
flowSnapshot
string | null
sessionLogData
object | null
transferData
object | null

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.