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

# Update Transcript

> Update the edited text of a transcript.

## Description

This endpoint updates the text content of a specific transcript segment for a stream. Use this to correct or edit transcript entries after a stream has ended. See the Quickstart guide for usage context.

## Authentication

This endpoint requires an API Key.\
Include your API key in the `x-api-key` header:

```http theme={null}
x-api-key: YOUR_API_KEY
```

## Request

* **Method:** PUT
* **Endpoint:** `/v1/transcripts/{stream_id}/{segment_id}`
* **Path Parameters:**
  * `stream_id` (string, required): Stream ID
  * `segment_id` (integer, required): Segment ID
* **Request Body:**
  * `content` (string, required): The updated transcript content

```json theme={null}
{
  "content": "string"
}
```

## Response

* **Status:** 200 OK
* **Content-Type:** `application/json`

```json theme={null}
{
  "stream_id": "string",
  "segment_id": 0,
  "timestamp": "string",
  "end_time": "string",
  "original_content": "string",
  "speaker": "string",
  "id": 0,
  "content": "string",
  "edited": true,
  "created_at": "2025-07-15T18:17:16.781Z",
  "updated_at": "2025-07-15T18:17:16.781Z"
}
```

## Example Usage (cURL)

```bash theme={null}
curl -X PUT "https://streaming.lingopal-dev.com/v1/transcripts/your-stream-id/1" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Updated transcript text."
  }'
```


## OpenAPI

````yaml PUT /v1/transcripts/{stream_id}/{segment_id}
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  x-ignore-stats:
    get:
      summary: Get Translation Statistics
      description: Get translation statistics for a stream.
      security:
        - ApiKeyAuth: []
      parameters:
        - name: stream_id
          in: path
          description: Stream ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_translations:
                    type: integer
                  edited_translations:
                    type: integer
                  unique_languages:
                    type: array
                    items:
                      type: string
                  edit_percentage:
                    type: number
                  language_stats:
                    type: object
                    additionalProperties: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            type: string
                        msg:
                          type: string
                        type:
                          type: string
  x-translations-temp:
    get:
      summary: Get Translations
      description: Get paginated translations for a stream.
      security:
        - ApiKeyAuth: []
      parameters:
        - name: stream_id
          in: path
          description: Stream ID
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: Page number
          required: false
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          description: Items per page
          required: false
          schema:
            type: integer
            default: 50
        - name: order
          in: query
          description: 'Sort order: ''asc'' for oldest first, ''desc'' for latest first'
          required: false
          schema:
            type: string
            default: desc
        - name: language_id
          in: query
          description: Filter by language ID
          required: false
          schema:
            type: string
        - name: edited
          in: query
          description: Filter by edit status
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  translations:
                    type: array
                    items:
                      type: object
                      properties:
                        stream_id:
                          type: string
                        language_id:
                          type: string
                        segment_id:
                          type: integer
                        timestamp:
                          type: string
                        end_time:
                          type: string
                        original_content:
                          type: string
                        speaker:
                          type: string
                        id:
                          type: integer
                        content:
                          type: string
                        edited:
                          type: boolean
                        created_at:
                          type: string
                        updated_at:
                          type: string
                  total:
                    type: integer
                  page:
                    type: integer
                  per_page:
                    type: integer
                  has_next:
                    type: boolean
                  has_prev:
                    type: boolean
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            type: string
                        msg:
                          type: string
                        type:
                          type: string
  version: 1.0.0
servers:
  - url: https://streaming.lingopal.ai
  - url: https://streaming.lingopal-dev.com
security:
  - ApiKeyAuth: []
paths:
  /v1/transcripts/{stream_id}/{segment_id}:
    put:
      summary: Update Transcript
      description: Update the edited text of a transcript.
      parameters:
        - name: stream_id
          in: path
          description: Stream ID
          required: true
          schema:
            type: string
        - name: segment_id
          in: path
          description: Segment ID
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
              required:
                - content
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream_id:
                    type: string
                  segment_id:
                    type: integer
                  timestamp:
                    type: string
                  end_time:
                    type: string
                  original_content:
                    type: string
                  speaker:
                    type: string
                  id:
                    type: integer
                  content:
                    type: string
                  edited:
                    type: boolean
                  created_at:
                    type: string
                  updated_at:
                    type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            type: string
                        msg:
                          type: string
                        type:
                          type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````