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>"
    }
  ],
  "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,
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:100

Number of items per page

Required range: 1 <= x <= 100

Response

Paginated list of voice deployment logs

data
object[]
pagination
object