> ## 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 routing status

> Returns the routing status of a specific ticket in the routing queue.



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api get /telephony/getRouting
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:
  /telephony/getRouting:
    get:
      tags:
        - Telephony
      summary: Get routing status
      description: Returns the routing status of a specific ticket in the routing queue.
      operationId: getRouting
      parameters:
        - name: ticketId
          in: query
          required: true
          description: ID of the ticket to get routing status for
          schema:
            type: integer
          example: 12345
        - name: cleanState
          in: query
          required: false
          description: >-
            When true, resets routing state for all user-type agents before
            evaluating the ticket
          schema:
            type: boolean
          example: false
        - name: forceReEvaluation
          in: query
          required: false
          description: If set, force re-evaluation of the routing status
          schema:
            type: boolean
          example: false
        - name: testQueueStatusResponse
          in: query
          required: false
          description: >-
            Testing helper that forces the endpoint to return the provided queue
            status without executing routing logic. When set to `declined`, a
            random decline reason is included.
          schema:
            type: string
            enum:
              - preProcessing
              - waitingForAgent
              - assigned
              - currentlyProcessed
              - completed
              - declined
              - unknown
          example: declined
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: ID of the queue entry
                    example: 789
                  ticketId:
                    type: integer
                    description: ID of the associated ticket
                    example: 12345
                  status:
                    type: string
                    description: Current routing status
                    enum:
                      - preProcessing
                      - waitingForAgent
                      - assigned
                      - currentlyProcessed
                      - completed
                      - declined
                      - unknown
                    example: waitingForAgent
                  declineReasonCode:
                    type: string
                    description: Code indicating why the call was declined, if applicable
                    nullable: true
                    example: null
                  declineReasonMessage:
                    type: string
                    description: >-
                      Human-readable message explaining why the call was
                      declined
                    nullable: true
                    example: null
                  declineReasonDebugInfos:
                    type: string
                    description: >
                      Debug string (newline-separated) listing all online agents
                      and why each was excluded or eligible for routing.

                      Populated when status is declined (e.g. no agents with
                      matching skills). Also included in ticketRouted event

                      data.routingExplanation for decline cases.
                    nullable: true
                    example: null
                  primaryTagId:
                    type: integer
                    description: ID of the primary tag associated with this queue entry
                    nullable: true
                    example: 46
                  channel:
                    type: string
                    description: Communication channel for this ticket
                    example: phone
                  subchannelId:
                    type: integer
                    description: ID of the subchannel, if applicable
                    nullable: true
                    example: null
                  assignedUserId:
                    type: integer
                    description: ID of the assigned user, if any
                    nullable: true
                    example: null
                  assignedUserRawData:
                    type: object
                    description: Raw data of the assigned user, may include external IDs
                    nullable: true
                    example: null
                  createdAt:
                    type: string
                    format: date-time
                    description: Timestamp when the queue entry was created
                    example: '2025-04-08 19:38:03'
                  routedAt:
                    type: string
                    format: date-time
                    description: Timestamp when the queue entry was routed to an agent
                    nullable: true
                    example: null
                  completedAt:
                    type: string
                    format: date-time
                    description: Timestamp when processing of the queue entry was completed
                    nullable: true
                    example: null
                  updatedAt:
                    type: string
                    format: date-time
                    description: Timestamp when the queue entry was last updated
                    example: '2025-04-08 19:38:11'
                  positionDetails:
                    type: object
                    description: Details about the queue position and waiting time
                    nullable: true
                    properties:
                      position:
                        type: integer
                        description: Position in the queue (0-based)
                        example: 0
                      agentsOnlineWithMatchingSkills:
                        type: array
                        description: IDs of online agents with matching skills
                        items:
                          type: integer
                        example:
                          - 20
                      estimatedWaitingTimeInSeconds:
                        type: integer
                        description: Estimated waiting time in seconds
                        example: 60
        '400':
          description: Invalid input - missing required parameters
        '403':
          description: Unauthorized
        '404':
          description: Queue entry not found
        '500':
          description: Internal error
components:
  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

````