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

# Upload and parse a transcript file

> Upload a single transcript file for parsing and content extraction. This is the second step
in the three-step workflow.

The file is streamed directly to Redis via the streamUpload middleware, then:
1. Read back from Redis
2. Parsed based on file type (PDF, CSV, DOCX)
3. Analyzed for speaker labels (Agent/Customer)
4. Stored as structured data in Redis (keyed by requestId)

Multiple files can be uploaded by calling this endpoint multiple times with the same requestId.
The generate endpoint retrieves all files for the request by requestId.




## OpenAPI

````yaml https://api-trial.cognigy.ai/testing/openapi/openapi-viewer.json post /v1/transcript-upload
openapi: 3.0.0
info:
  title: SIMULATOR OPENAPI REST-ful-API Reference
  version: 2025.20.0
  description: >

    ### Introduction

    This is the [OpenAPI 3.0](https://swagger.io/specification/) documentation

    of the
    [REST](https://en.wikipedia.org/wiki/Representational_state_transfer)-ful
    SIMULATOR OPENAPI API.


    ### Cross-Origin Resource Sharing

    This API features Cross-Origin Resource Sharing (CORS) implemented in

    compliance with [W3C spec](https://www.w3.org/TR/cors/), which allows

    cross-domain communication from the browser. All responses have a wildcard

    same-origin header which makes the API completely accessible.


    ### Authentication

    SIMULATOR OPENAPI offers following forms of authentication:

    - Bearer Token (JWT)

    - API Key


    ### Error Handling

    This API uses HTTP status codes equal or above 400 to indicate errors. Error

    details are generated in compliance with [RFC 7807 - "Problem Details for
    HTTP APIs"](https://tools.ietf.org/html/rfc7807).


    Every error response contains a traceId, which should be provided to the
    SIMULATOR OPENAPI Technical Support when reporting an error.
  contact:
    name: Cognigy Technical Support
    url: https://www.cognigy.com
    email: support@cognigy.com
  license:
    name: Cognigy Proprietary License
servers:
  - url: https://api-trial.cognigy.ai/testing
    description: Cognigy Service Testing API
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Simulations
    description: >-
      Simulation management operations - Create, read, update, and delete
      simulations
externalDocs:
  description: SIMULATOR OPENAPI Documentation
  url: https://docs.cognigy.com/docs/service-testing/
paths:
  /v1/transcript-upload:
    post:
      tags:
        - Transcript Scenario Generation
      summary: Upload and parse a transcript file
      description: >
        Upload a single transcript file for parsing and content extraction. This
        is the second step

        in the three-step workflow.


        The file is streamed directly to Redis via the streamUpload middleware,
        then:

        1. Read back from Redis

        2. Parsed based on file type (PDF, CSV, DOCX)

        3. Analyzed for speaker labels (Agent/Customer)

        4. Stored as structured data in Redis (keyed by requestId)


        Multiple files can be uploaded by calling this endpoint multiple times
        with the same requestId.

        The generate endpoint retrieves all files for the request by requestId.
      operationId: uploadTranscriptFile
      parameters:
        - name: projectId
          in: query
          required: false
          schema:
            type: string
          description: Project identifier
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                requestId:
                  type: string
                  description: Request ID from the create-request step
                projectId:
                  type: string
                  description: Project identifier
                transcript:
                  type: string
                  format: binary
                  description: Transcript file (PDF, CSV, or DOCX)
              required:
                - requestId
                - transcript
      responses:
        '200':
          description: File uploaded and parsed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  fileId:
                    type: string
                    description: Unique file identifier
                  fileName:
                    type: string
                    description: Original file name
                  fileSize:
                    type: integer
                    description: File size in bytes
                  fileType:
                    type: string
                    enum:
                      - pdf
                      - csv
                      - docx
                    description: Detected file type
                  textLength:
                    type: integer
                    description: Length of extracted text content
                  processedAt:
                    type: string
                    format: date-time
                required:
                  - success
                  - fileId
                  - fileName
                  - fileSize
                  - fileType
                  - textLength
                  - processedAt
              example:
                success: true
                fileId: f1e2d3c4-b5a6-7890-fedc-ba0987654321
                fileName: customer_support_call.pdf
                fileSize: 245678
                fileType: pdf
                textLength: 2450
                processedAt: '2026-02-08T14:30:00.000Z'
        '400':
          description: Bad Request - Invalid file or missing parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
              examples:
                missingFile:
                  value:
                    error: >-
                      No file was uploaded. Please include a file in the
                      request.
                unsupportedType:
                  value:
                    error: >-
                      Unsupported file type 'text/plain'. Supported types: pdf,
                      csv, docx
                noSpeakerLabels:
                  value:
                    error: >-
                      Speaker labels not detected. All transcripts must contain
                      clear Agent/Customer speaker labels.
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Not Found - Request ID not found or expired
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
              example:
                error: >-
                  Transcript request not found or has expired. Please create a
                  new request.
        '413':
          description: Payload Too Large - File exceeds maximum size
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Bearer Token for authentication
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key for authentication

````