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

# Get Fax Unread Count

> Count inbound faxes still awaiting first acknowledgement.

Declared above ``GET /faxes/{fax_id}`` on purpose: FastAPI matches routes
in declaration order, and the parameterized path would otherwise swallow
``/faxes/unread-count`` as ``fax_id="unread-count"`` and 404.

``direction = INBOUND`` is defensive scoping — only inbound rows should
ever have NULL ``read_date`` (outbound is timestamped at creation), but
if a bug ever leaves an outbound row NULL it should not pollute the
badge. Backed by the partial index
``ix_fax_read_date_inbound (direction) WHERE read_date IS NULL``.



## OpenAPI

````yaml get /faxes/unread-count
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /faxes/unread-count:
    get:
      tags:
        - Faxes
      summary: Get Fax Unread Count
      description: >-
        Count inbound faxes still awaiting first acknowledgement.


        Declared above ``GET /faxes/{fax_id}`` on purpose: FastAPI matches
        routes

        in declaration order, and the parameterized path would otherwise swallow

        ``/faxes/unread-count`` as ``fax_id="unread-count"`` and 404.


        ``direction = INBOUND`` is defensive scoping — only inbound rows should

        ever have NULL ``read_date`` (outbound is timestamped at creation), but

        if a bug ever leaves an outbound row NULL it should not pollute the

        badge. Backed by the partial index

        ``ix_fax_read_date_inbound (direction) WHERE read_date IS NULL``.
      operationId: get_fax_unread_count_faxes_unread_count_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  type: integer
                type: object
                title: Response Get Fax Unread Count Faxes Unread Count Get

````