> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usebrainbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a deployment log by ID

> 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.




## OpenAPI

````yaml /openapi-specs/brainbase-openapi.documented.json get /api/logs/{logId}
openapi: 3.0.0
info:
  title: Brainbase REST API
  version: 1.0.3
  description: API documentation for Brainbase REST API
servers:
  - url: https://brainbase-monorepo-api.onrender.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Team
    description: Endpoints related to team functionalities
  - name: Integrations
    description: Endpoints for integrations
  - name: Assets
    description: Endpoints for asset management
  - name: Workers
    description: Endpoints for worker operations
  - name: Flows
    description: Endpoints for flow management
  - name: Voice Deployments
    description: Endpoints for voice deployments
  - name: Voice V1 Deployments
    description: Endpoints for voice v1 deployments
  - name: Voice Deployment Logs
    description: Endpoints for voice deployment logs
  - name: Voice Deployment Outbound Data
    description: Endpoints for voice deployment outbound data
  - name: Chat Deployments
    description: Endpoints for chat deployments
  - name: Chat Deployment Logs
    description: Endpoints for chat deployment logs
  - name: Tags
    description: Endpoints for tag management and worker tag assignment
  - name: Echo
    description: Endpoints for Echo test suites, agents, and scorecards
  - name: Flow Versions
    description: Endpoints for flow version control
  - name: Deployment History
    description: Endpoints for deployment change history
  - name: Deployment Parameters
    description: Endpoints for deployment parameters
  - name: Log Exports
    description: Endpoints for async log export to CSV/JSON
  - name: Logs
    description: >-
      Universal log lookup — fetch any deployment log by ID without needing
      worker or deployment context
  - name: Deployments
    description: >-
      Universal deployment lookup — fetch any deployment by ID without needing
      worker context
paths:
  /api/logs/{logId}:
    get:
      tags:
        - Logs
      summary: Retrieve a deployment log by ID
      description: >
        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.
      parameters:
        - name: logId
          in: path
          required: true
          description: >-
            The deployment log ID (e.g.
            `log_82788ca4-6e9f-4778-83d4-96868cbe5edb`)
          schema:
            type: string
      responses:
        '200':
          description: Deployment log record with type-specific fields flattened
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/DeploymentLogs'
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - VoiceDeploymentLog
                          - ChatDeploymentLog
                          - ChatEmbedDeploymentLog
                          - WhatsappDeploymentLog
                          - SmsDeploymentLog
                          - ApiDeploymentLog
                          - EmailDeploymentLog
                        description: >-
                          The log delegate type — determines which type-specific
                          fields are present
                      transferData:
                        nullable: true
                        description: >-
                          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.
                        allOf:
                          - $ref: '#/components/schemas/TwilioCallTransferData'
                          - type: object
                            properties:
                              transferEvents:
                                type: array
                                items:
                                  $ref: '#/components/schemas/TwilioTransferEvent'
                              metrics:
                                type: object
                                properties:
                                  transfers:
                                    type: number
                                  transferMinutes:
                                    type: number
                                  transferEvents:
                                    type: number
                                  transferEventMinutes:
                                    type: number
        '401':
          description: Unauthorized — missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: API key is required
                  code:
                    type: string
                    example: UNAUTHORIZED
        '404':
          description: Log not found or not accessible
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Deployment log not found
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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);
        - lang: Python
          source: |-
            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
            )
            response = client.voice_analysis.retrieve_log(
                "logId",
            )
            print(response.id)
components:
  schemas:
    DeploymentLogs:
      type: object
      properties:
        id:
          type: string
          nullable: false
        createdAt:
          type: string
          nullable: false
          format: date-time
        updatedAt:
          type: string
          nullable: false
          format: date-time
        workerId:
          type: string
          nullable: false
        deploymentId:
          type: string
          nullable: false
        flowId:
          type: string
          nullable: false
        bbEngineSessionId:
          type: string
          nullable: true
        extractionsData:
          type: object
          nullable: true
        metadata:
          type: object
          nullable: true
        flowSnapshot:
          type: string
          nullable: true
        sessionLogData:
          type: object
          nullable: true
        type:
          type: string
          enum:
            - ChatDeploymentLog
            - ChatEmbedDeploymentLog
            - VoiceDeploymentLog
            - WhatsappDeploymentLog
            - SmsDeploymentLog
            - EmailDeploymentLog
            - ApiDeploymentLog
      required:
        - id
        - createdAt
        - updatedAt
        - workerId
        - deploymentId
        - flowId
        - type
    TwilioCallTransferData:
      type: object
      properties:
        id:
          type: string
          nullable: false
        createdAt:
          type: string
          nullable: false
          format: date-time
        updatedAt:
          type: string
          nullable: false
          format: date-time
        callSid:
          type: string
          nullable: false
        status:
          type: string
          nullable: true
        duration:
          type: string
          nullable: true
        voiceLogId:
          type: string
          nullable: false
      required:
        - id
        - createdAt
        - updatedAt
        - callSid
        - voiceLogId
    TwilioTransferEvent:
      type: object
      properties:
        id:
          type: string
          nullable: false
        createdAt:
          type: string
          nullable: false
          format: date-time
        type:
          type: string
          nullable: true
        timestamp:
          type: string
          nullable: true
          format: date-time
        duration:
          type: string
          nullable: false
        toNumber:
          type: string
          nullable: false
        fromNumber:
          type: string
          nullable: false
        parentCallSid:
          type: string
          nullable: true
        callSid:
          type: string
          nullable: true
        callTransferId:
          type: string
          nullable: false
      required:
        - id
        - createdAt
        - duration
        - toNumber
        - fromNumber
        - callTransferId
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication

````