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

# Get conversations for a ticket

> Retrieve all conversations associated with a specific ticket



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api get /ticket/{ticketId}/conversation
openapi: 3.0.0
info:
  version: '1'
  title: enneo.MIND API
  description: This describes the API of enneo Mind, the main ticketing backend
  contact:
    name: enneo GmbH
    email: richard@enneo.ai
  license:
    name: Proprietary software
    url: https://enneo.ai
servers:
  - url: https://demo.enneo.ai/api/mind
    description: Production server, demo client
  - url: https://main.enneo.dev/api/mind
    description: Development main branch
  - url: http://localhost:8005/api/mind
    description: Local development server
security:
  - bearerAuth:
      - api
  - cookieAuth:
      - api
paths:
  /ticket/{ticketId}/conversation:
    get:
      tags:
        - Conversation
      summary: Get conversations for a ticket
      description: Retrieve all conversations associated with a specific ticket
      operationId: getConversations
      parameters:
        - name: ticketId
          in: path
          required: true
          schema:
            type: integer
          description: The ID of the ticket to get conversations for
        - name: includeRawData
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Whether to include raw data in the response
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  conversations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Conversation'
                  success:
                    type: boolean
        '403':
          description: Unauthorized
        '404':
          description: Ticket not found
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Conversation:
      type: object
      description: >-
        A conversation is an interaction to a ticket. Typically a reply or
        internal note to an email, or a chat message for a chat
      properties:
        id:
          type: integer
          example: 123
          description: ID of conversation
        ticketId:
          type: integer
          example: 123
        type:
          type: string
          description: Type of message
          example: html
        direction:
          type: string
          example: out
        private:
          type: boolean
          description: >-
            If true, then this conversation is a private/internal note of an
            agent
          example: false
        isDraft:
          type: boolean
          description: >-
            If true, then this conversation is a draft that requires supervisor
            approval before sending
          example: false
        fromEmail:
          deprecated: true
          type: string
          example: service@enneo.ai
        fromEmailName:
          deprecated: true
          type: string
          example: Enneo Admin
        agentId:
          deprecated: true
          type: integer
          example: 1
        sender:
          type: object
          description: Sender of the message
          properties:
            id:
              type: integer
              example: 1
            name:
              type: string
              example: Enneo Admin
            email:
              type: string
              example: example@enneo.ai
            subchannelId:
              type: integer
              nullable: true
              example: 1
              description: The subchannel ID associated with the sender
        toEmail:
          description: Only for email channel
          type: array
          items:
            type: string
            example: to@gmail.com
        to:
          description: >-
            Array of recipients. For emails, contains email addresses (e.g.
            service@enneo.ai). For letters, contains postal addresses (e.g.
            "John Smith, Smithway 1, 12345 Berlin, Germany")
          type: array
          items:
            type: string
            example: service@enneo.ai
        ccEmails:
          description: Only for email channel
          type: array
          items:
            type: string
            example: cc@gmail.com
        bccEmails:
          description: BCC email addresses. Only for email channel
          type: array
          items:
            type: string
            example: bcc@gmail.com
        channelId:
          description: >-
            ID of chat (if channel is chat) or message ID from IMAP mail server
            (if channel is email)
          type: string
          nullable: true
          example: msg-123-abc
        content:
          type: object
          description: Content of the message
          properties:
            message:
              type: string
              description: Message content
              example: Thank you for your message, we can inform you that...
          example:
            message: Thank you for your message, we can inform you that...
        intentIds:
          type: array
          description: IDs of intents that were detected in the message
          items:
            type: string
            example: ai_agent_meter_reading
        cortexRequestId:
          type: integer
          description: ID of the request to cortex
          nullable: true
          example: 123
        externalConversationId:
          type: string
          description: ID of conversation in external system
          nullable: true
          example: abc-123
        isRead:
          type: boolean
          description: Whether the conversation has been read
          example: false
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
        interface:
          type: object
          description: Interface object for conversation data import/export
          example: []
        createdAt:
          type: string
          format: DateTime
          example: 1657056276
        modifiedAt:
          type: string
          format: DateTime
          example: 1672756198
    Error:
      type: object
      description: Data format of Enneo error messages
      properties:
        error:
          type: string
          example: Contract 121 could not be processed
          description: Readable error message that should be shown to the user
        details:
          type: string
          example: >-
            Uncatched null point exception in testFunction() in
            /app/src/file:212
          description: Not easily readable error message that is for the developer
        txId:
          type: string
          example: c916167c94
          description: >-
            Internal transaction id. Useful for debugging. Corresponds to the
            OpenTelemetry trace ID.
    Attachment:
      type: object
      properties:
        id:
          type: integer
          description: id of attachment
          example: 103013960646
        url:
          type: string
          format: uri
          example: >-
            https://client.enneo.ai/attachments/reading_w23po_107647890574i49994_(1).pdf
        name:
          type: string
          example: reading_w23po_107647890574i49994_(1).pdf
        size:
          type: integer
          description: size of attachment in bytes.
          example: 721592
        width:
          type: integer
          description: >-
            width of image attachment in pixels. Can be ommitted for non-image
            attachments.
          example: 3120
        height:
          type: integer
          description: >-
            height of image attachment in pixels. Can be ommitted for non-image
            attachments.
          example: 4160
        inline:
          type: boolean
          description: true if attachment is an inline image
          example: false
        fileEnding:
          type: string
          description: file ending of attachment
          example: pdf
        contentType:
          type: string
          description: content type of attachment
          example: application/pdf
        originalUrl:
          type: string
          format: uri
          description: >-
            url of original attachment, most likely contains invalid temporary
            access token
          example: >-
            https://storage.example.com/attachments/reading_w23po_107647890574i49994_(1).pdf
        extractedData:
          type: object
          description: >-
            data extracted from the attachment, e.g. a PDF text or a meter
            reading
        extractionStatus:
          type: string
          description: >-
            Status of the current extraction. Valid options: "notStarted",
            "inProgress", "success", "error"
          example: notStarted
        extractionData:
          type: object
          description: Data extracted from the attachment by meterReadingMicroservice
          example:
            confidence: 1
            meterValue: 1234
      example:
        id: 103013960646,
        url: >-
          https://storage.googleapis.com/enneo-attachments-public/a1/103013960646-4b1aa775/IMG_20230301_192712.jpg
        name: IMG_20230301_192712.jpg
        size: 2292952
        width: 3120
        height: 4160
        inline: false
        fileEnding: jpg
        contentType: image/jpeg
        originalUrl: https://storage.example.com/attachments/IMG_20230301_192712.jpg
        extractedData: null
        extractionStatus: success
        extractionData:
          confidence: 0.815
          meterValue: 87870.5
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
      x-scopes:
        api: Full access to the API
    cookieAuth:
      type: apiKey
      in: cookie
      name: connect.sid
      description: Cookie-based authentication
      x-scopes:
        api: Full access to the API

````