---
title: "Get"
method: GET
path: "/comms/chat/list"
tags: ["provider", "comms"]
---

# Get

`GET /comms/chat/list`

Returns a list of Chats and the latest message in the chat, ordered by the latest message date by a patient or

Args:
    per_page (int, optional): Defaults to QueryParam(12).
    page (int, optional): Defaults to QueryParam(1).
    search_term (str, optional): a search param representing a patient name or phone number
    patient_id (str, optional): filter by specific patient ID
    query_param_chat_id (str, optional): prioritize specific chat ID in results
    unread_only (bool, optional): filter to only unread chats
    unresponded_only (bool, optional): filter to chats where last message was from patient
    location_id (str, optional): filter to patients at current user's location only
    human_only (bool, optional): filter to chats where latest message is from humans (not AI assistants)

## Query parameters

- `page` integer, nullable
- `per_page` integer, nullable
- `sort_by` string, nullable
- `sort_direction` 'asc' | 'desc', nullable
- `location_id` string, nullable
- `search_term` string, nullable
- `patient_id` string, nullable
- `chat_id` string, nullable
- `unread_only` boolean
- `unresponded_only` boolean
- `human_only` boolean

## Headers

- `TENANT` string, required
- `API-KEY` string, required

## Response `200`

Successful Response

- PageChatSummary
  - `data` ChatSummary[], required
    - `id` string, required
    - `primaryPatientId` string, nullable, required
    - `status` 'READ' | 'UNREAD', required
    - `patients` ChatPatient[], required
      - `id` string, required
      - `firstName` string, nullable, required
      - `lastName` string, nullable, required
      - `primaryLocationId` string, nullable, required
    - `phoneNumber` string, required
    - `latestMessageContent` string, nullable
    - `latestMessageDate` string, date-time, nullable
    - `createdDate` string, date-time, required
    - `optedOutOfSms` boolean, required
  - `total` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/decodahealth/apis/decoda-api.md) · [All operations](https://skmtc.dev/decodahealth/apis/decoda-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/decodahealth/decoda-api/revisions/4939a65a89d2/schema)
