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>",
"type": "VoiceDeploymentLog",
"bbEngineSessionId": "<string>",
"extractionsData": {},
"metadata": {},
"flowSnapshot": "<string>",
"sessionLogData": {}
}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);{
"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": {}
}API key authentication
The deployment log ID (e.g. log_82788ca4-6e9f-4778-83d4-96868cbe5edb)
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