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

# List agents with current presence and capacity

> Returns one entry per agent in scope with their connection state, availability toggle, current unresolved chat count, configured max-chats ceiling, and the last assignment / availability timestamps. Used to populate the agent grid on the escalation dashboard.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/escalation-dashboard/agents
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/escalation-dashboard/agents:
    get:
      tags:
        - Escalation Dashboard
      summary: List agents with current presence and capacity
      description: >-
        Returns one entry per agent in scope with their connection state,
        availability toggle, current unresolved chat count, configured max-chats
        ceiling, and the last assignment / availability timestamps. Used to
        populate the agent grid on the escalation dashboard.
      operationId: get_agent_statuses
      parameters:
        - in: query
          name: departmentId
          required: false
          schema:
            type: string
          description: >-
            Optional department filter. ADMIN/SUPERADMIN may pass any
            departmentId; DEPARTMENT_HEAD is implicitly scoped to their own
            department and any other value is ignored.
      responses:
        '200':
          description: Agent statuses returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentStatusesResponse'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EscalationDashboardError'
        '500':
          description: Error fetching agent statuses
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EscalationDashboardError'
      security:
        - bearerAuth: []
components:
  schemas:
    AgentStatusesResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: array
          items:
            $ref: '#/components/schemas/AgentStatus'
      required:
        - success
        - data
      additionalProperties: false
      example:
        success: true
        data:
          - _id: 5f7b1c2e8a1d4e0012c3b4a5
            fullName: Sam Patel
            email: sam.patel@acme.example
            isOnline: true
            isAvailable: true
            unresolvedChats: 2
            maxChats: 5
            lastAssignedAt: '2026-05-18T14:31:02.000Z'
    EscalationDashboardError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
        error:
          type: string
      required:
        - success
        - message
      additionalProperties: true
      example:
        success: false
        message: Access denied
    AgentStatus:
      type: object
      properties:
        _id:
          type: string
        fullName:
          type: string
        email:
          type: string
        avatarUrl:
          type: string
          nullable: true
        departmentId:
          type: string
          nullable: true
        departmentName:
          type: string
          nullable: true
        isOnline:
          type: boolean
        isAvailable:
          type: boolean
        unresolvedChats:
          type: integer
        maxChats:
          type: integer
          nullable: true
          description: >-
            null = unlimited (org has maxUnresolvedChatsPerAgent set to 0 or
            below).
        lastAssignedAt:
          type: string
          format: date-time
          nullable: true
        lastAvailableAt:
          type: string
          format: date-time
          nullable: true
      required:
        - _id
        - fullName
        - email
        - isOnline
        - isAvailable
        - unresolvedChats
      additionalProperties: true
      example:
        _id: 5f7b1c2e8a1d4e0012c3b4a5
        fullName: Sam Patel
        email: sam.patel@acme.example
        avatarUrl: https://r2.example.com/avatars/sam.png
        departmentId: 6a8c2d3f9b1e5a0023d4c5b6
        departmentName: Customer Success
        isOnline: true
        isAvailable: true
        unresolvedChats: 2
        maxChats: 5
        lastAssignedAt: '2026-05-18T14:31:02.000Z'
        lastAvailableAt: '2026-05-18T13:00:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````