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

# Export Transcripts

> Export call transcripts in various formats.

This endpoint allows you to export the full transcript of a specific call to a file. You can choose from several formats.

The response from this endpoint will be a file download.

### Path Parameters

* `call_id` (integer, **required**): The unique identifier for the call whose transcript you want to export.

### Query Parameters

* `format` (string, optional, default: `txt`): The desired file format.
  * Allowed values: `txt`, `json`, `csv`.
* `speaker` (string, optional): Filter transcripts to include only a specific speaker (`user` or `assistant`).

### Response Formats

**If `format=txt`:**

You will receive a plain text file (`.txt`) with the conversation formatted for readability.

```text Text Content theme={null}
[10:00:05] assistant: Hello, how can I help you today?
[10:00:10] user: Yes, I'd like to check the status of my order.
```

**If `format=json`:**

You will receive a JSON file (`.json`) containing call metadata and a `transcripts` array.

```json JSON Content theme={null}
{
  "call_id": 101,
  "call_sid": "CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "started_at": "2023-10-30T10:00:00Z",
  "transcripts": [
    {
      "speaker": "assistant",
      "content": "Hello, how can I help you today?",
      "timestamp": "2023-10-30T10:00:05Z",
      "confidence": 0.95,
      "segment_start": 0.0,
      "segment_end": 2.5
    },
    {
      "speaker": "user",
      "content": "Yes, I'd like to check the status of my order.",
      "timestamp": "2023-10-30T10:00:10Z",
      "confidence": 0.93,
      "segment_start": 4.1,
      "segment_end": 7.2
    }
  ]
}
```

**If `format=csv`:**

You will receive a CSV file (`.csv`) with the transcript data.

```csv CSV Content theme={null}
"Timestamp","Speaker","Content","Confidence"
"2023-10-30T10:00:05Z","assistant","Hello, how can I help you today?","0.95"
"2023-10-30T10:00:10Z","user","Yes, I'd like to check the status of my order.","0.93"
```


## OpenAPI

````yaml GET /api/v1/calls/{call_id}/transcripts/export
openapi: 3.1.0
info:
  title: Burki
  description: A system that uses AI to answer customer Calls.
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/calls/{call_id}/transcripts/export:
    get:
      tags:
        - calls
      summary: Export Call Transcripts
      description: Export call transcripts in various formats.
      operationId: export_call_transcripts_api_v1_calls__call_id__transcripts_export_get
      parameters:
        - name: call_id
          in: path
          required: true
          schema:
            type: integer
            title: Call Id
        - name: format
          in: query
          required: false
          schema:
            type: string
            pattern: ^(txt|json|csv)$
            description: Export format
            default: txt
            title: Format
          description: Export format
        - name: speaker
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by speaker
            title: Speaker
          description: Filter by speaker
      responses:
        '200':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````