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

# Unread Message Counts

> Get Unread Messages Counts for Users organized by Inbox



## OpenAPI

````yaml /swagger.yml get /public/messages/unreadCounts
openapi: 3.0.0
info:
  title: Public API Docs
  description: Clerk Public API
  version: '1.0'
  contact: {}
servers:
  - url: https://web-api.clerk.chat
    description: Production server
  - url: http://localhost:3000
    description: Production server
security: []
tags: []
paths:
  /public/messages/unreadCounts:
    get:
      tags:
        - Messages
      summary: Unread Message Counts
      description: Get Unread Messages Counts for Users organized by Inbox
      operationId: PublicMessagesController_getUnreadMessageCounts
      parameters:
        - name: inboxIds
          in: query
          required: false
          description: >-
            The IDs of the Inboxes to filter unread message counts by. If not
            provided, all inboxes will be included. You must include at least
            one of the documented query parameters: inboxIds or userIds.
          schema:
            type: array
            items:
              type: string
        - name: userIds
          in: query
          required: false
          description: >-
            The IDs of Users to filter unread message counts by. If not
            provided, all users will be included. You must include at least one
            of the documented query parameters: inboxIds or userIds.
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: Object of Unread Counts organized by Inbox Ids
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnreadMessageCounts'
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized request
        '403':
          description: You do not have permission to access this resource
        '404':
          description: Resource not found
        '422':
          description: Invalid request parameters
        '429':
          description: Too many requests for this resource
        '500':
          description: Internal server error
      security:
        - api_key: []
components:
  schemas:
    UnreadMessageCounts:
      type: object
      required:
        - unreadMessageCounts
      properties:
        unreadMessageCounts:
          type: object
          example:
            <INBOX_ID>:
              <USER_ID>: 10
          additionalProperties:
            type: object
            example:
              <USER_ID>: 10
            additionalProperties:
              type: number
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apiKey

````