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

# List TTS histories

> List TTS history entries with pagination.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/tts/histories
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v2/tts/histories:
    get:
      summary: List TTS histories
      description: List TTS history entries with pagination.
      parameters:
        - in: query
          name: page
          required: true
          description: Current page number.
          schema:
            type: integer
            example: 1
        - in: query
          name: perPage
          required: true
          description: Number of items per page.
          schema:
            type: integer
            example: 10
        - in: query
          name: projectId
          required: true
          description: Project identifier.
          schema:
            type: string
            example: ae6d58c6-c6bd-4ae0-ad74-b8b39c29928b
      responses:
        '200':
          description: Histories retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTtsHistoriesResponse'
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ListTtsHistoriesResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/SuccessResponse'
        - type: object
          properties:
            data:
              type: object
              properties:
                ttsHistories:
                  type: array
                  items:
                    $ref: '#/components/schemas/TtsHistory'
                totalPages:
                  type: integer
                  example: 5
                page:
                  type: integer
                  example: 1
                totalCount:
                  type: integer
                  example: 50
    ValidationErrorResponse:
      type: object
      properties:
        code:
          type: integer
          example: 9400
        message:
          type: string
          example: Field must be a string!
        messageKey:
          type: string
          example: FieldMustBeString
    InternalServerErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: integer
          example: 500
        message:
          type: string
          example: Internal server error
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Operation completed successfully
        messageKey:
          type: string
          example: OPERATION_SUCCESSFUL
    TtsHistory:
      type: object
      required:
        - id
        - audio
        - script
        - createdAt
        - ttsVoice
        - downloadUrl
      properties:
        id:
          type: string
          format: uuid
          example: c4f66d94-a1f5-4000-b9a3-dad55b206968
        audio:
          type: string
          format: uri
          description: Signed URL for streaming the generated TTS audio
          example: https://cdn.tryhamsa.com/tts-histories/audio.wav
        downloadUrl:
          type: string
          format: uri
          description: Signed URL for downloading the generated TTS audio
          example: >-
            https://cdn.tryhamsa.com/tts-histories/audio.wav?response-content-disposition=attachment
        script:
          type: string
          example: hello hello
          description: Original script used to generate the audio
        createdAt:
          type: string
          format: date-time
          example: '2025-12-31T08:19:52.129Z'
        ttsVoice:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              example: Huda
            dialect:
              type: object
              nullable: true
              properties:
                languageCode:
                  type: string
                  example: oma
                language:
                  type: string
                  enum:
                    - ar
                    - en
                  example: ar
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````