> ## 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 a tickets history

> Get a history of created tickets and other relevant actions from a customer/contract



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api get /ticket/{ticketId}/history
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}/history:
    get:
      tags:
        - Ticket
      summary: Get a tickets history
      description: >-
        Get a history of created tickets and other relevant actions from a
        customer/contract
      operationId: getTicketHistory
      parameters:
        - name: ticketId
          in: path
          required: true
          description: The id of the ticket
          schema:
            type: integer
          example: 376189
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/offsetParam'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  total:
                    type: number
                    example: 11
                  totalOpenedTickets:
                    type: number
                    example: 2
                  history:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          nullable: true
                        type:
                          type: string
                          description: Type of interaction
                          enum:
                            - ticket
                            - gridMessage
                            - delivery
                            - payment
                        channel:
                          type: string
                          description: >-
                            The channel of the ticket. NULL if type is not
                            ticket
                          allOf:
                            - $ref: '#/components/schemas/Channel'
                          nullable: true
                        subChannel:
                          type: string
                          description: >-
                            Further detailing of the channel. Needed for to
                            define icon.
                          enum:
                            - facebook
                            - instagram
                            - whatsapp
                            - telegram
                            - companyWebsite
                            - gridOperator
                            - previousSupplier
                            - nextSupplier
                        status:
                          type: string
                          description: The status of the ticket. NULL if type is not ticket
                          allOf:
                            - $ref: '#/components/schemas/Status'
                          nullable: true
                        subject:
                          description: >-
                            If subject matches a localization entry, then show
                            it. E.g. deliveryStart=Belieferungsbeginn or
                            missedCall=Rückrufversuch. Otherwise the FE shows
                            the string directly.
                          type: string
                          nullable: true
                        summary:
                          type: string
                          description: >-
                            A short summary of the interaction. NULL if type is
                            not ticket
                          nullable: true
                        url:
                          type: string
                          description: >-
                            Agent can get more information behind this url. NULL
                            if there should be no hyperlink OR the frontend
                            knows how to create a hyperlink by itself, as is the
                            case with type=ticket
                          format: uri
                          nullable: true
                        createdAt:
                          type: string
                          format: DateTime
                    example:
                      - id: 1022
                        type: ticket
                        channel: email
                        subChannel: null
                        status: active
                        subject: Tom Mustermann
                        url: null
                        createdAt: 1673039966
                      - id: 222
                        type: ticket
                        channel: phone
                        subChannel: null
                        status: pending
                        subject: missedCall
                        url: null
                        createdAt: 1672953566
                      - id: 135
                        type: ticket
                        channel: chat
                        subChannel: facebook
                        status: open
                        subject: null
                        url: https://facebook.com/message/289291
                        createdAt: 1662153566
                      - id: null
                        type: delivery
                        channel: null
                        subChannel: null
                        status: null
                        subject: deliveryStart
                        url: https://powercloud.de/gridMessages/41425548
                        createdAt: 1660953600
                      - id: null
                        type: gridMessage
                        channel: null
                        subChannel: gridOperator
                        status: null
                        subject: deliveryStartConfirmed
                        url: https://powercloud.de/gridMessages/41425548
                        createdAt: 1660345921
                      - id: null
                        type: gridMessage
                        channel: null
                        subChannel: previousSupplier
                        status: null
                        subject: handoverDateConfirmed
                        url: https://powercloud.de/gridMessages/41425548
                        createdAt: 1657667521
        '403':
          description: Unauthorized
        '404':
          description: Ticket not found
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    limitParam:
      name: limit
      in: query
      required: false
      description: The number of items to return
      schema:
        type: integer
        default: 100
        minimum: 1
        maximum: 1000
      example: 100
    offsetParam:
      name: offset
      in: query
      required: false
      description: The number of items to skip
      schema:
        type: integer
        default: 0
        minimum: 0
      example: 0
  schemas:
    Channel:
      type: string
      description: Channel of ticket
      enum:
        - email
        - portal
        - phone
        - letter
        - system
        - chat
        - walkIn
      example: email
    Status:
      type: string
      description: Status of ticket
      enum:
        - open
        - pending
        - closed
      example: open
    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.
  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

````