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

console.log(voices.data);
{
  "data": [
    {
      "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": {},
      "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>"
          }
        ]
      }
    }
  ],
  "nextCursor": "<string>",
  "hasMore": true,
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "totalPages": 123,
    "hasNext": true,
    "hasPrev": true
  }
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required

Query Parameters

deploymentId
string

Filter logs by deployment id

flowId
string

Filter logs by flow id

direction
enum<string>

Filter by call direction

Available options:
inbound,
outbound
fromNumber
string

Filter by caller phone number (partial match)

toNumber
string

Filter by called phone number (partial match)

status
string

Filter by call status

externalCallId
string

Filter by external call ID

callSid
string

Filter by Twilio call SID

searchQuery
string

Search in call transcriptions (case-insensitive)

startTimeAfter
string<date-time>

Filter logs with startTime after this date (ISO 8601 format)

startTimeBefore
string<date-time>

Filter logs with startTime before this date (ISO 8601 format)

endTimeAfter
string<date-time>

Filter logs with endTime after this date (ISO 8601 format)

endTimeBefore
string<date-time>

Filter logs with endTime before this date (ISO 8601 format)

startDate
string<date-time>

Deprecated - use startTimeAfter instead

endDate
string<date-time>

Deprecated - use startTimeBefore instead

sortBy
enum<string>
default:startTime

Field to sort by

Available options:
startTime,
endTime,
direction,
fromNumber,
toNumber,
status,
externalCallId,
duration,
createdAt,
updatedAt
sortOrder
enum<string>
default:desc

Sort order (ascending or descending)

Available options:
asc,
desc
page
integer
default:1

Page number for pagination

Required range: x >= 1
limit
integer
default:50

Number of items per page

Required range: 1 <= x <= 100
pageSize
integer

Alias for limit

Required range: 1 <= x <= 100
cursor
string

Cursor for cursor-based pagination (value of nextCursor from a previous response)

minDuration
integer

Filter logs with duration greater than or equal to this value (seconds)

maxDuration
integer

Filter logs with duration less than or equal to this value (seconds)

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

Paginated list of voice deployment logs

data
object[]
nextCursor
string | null

Cursor to pass as the cursor param to fetch the next page. Null when no more pages.

hasMore
boolean

Whether more results exist beyond this page

pagination
object