---
title: "The Messages list, tabs, filters and counts (#2587 p5-A)"
method: GET
path: "/accountant/messages"
tags: ["Accountant Portal"]
---

# The Messages list, tabs, filters and counts (#2587 p5-A)

`GET /accountant/messages`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/messages`
- Auth: HTTP bearer

One page of threads of the caller's clients (a human super-admin: every client), for wireframe page 5. `tab` is `needs_reply` (the client wrote last), `waiting_on_client` (we or Penny's thread wrote last) or `resolved` (by status); a thread with no message yet waits on us when the client started it (`client_change`, `package`) and on the client otherwise. Without `tab` the page lists the three groups in that order: the first two longest-waiting first, `resolved` newest first. `owner` is the client's primary accountant (never a service account): `me` is the caller, `all` (default) no filter, or an accountant id. `counts` follow `clientId`, `kind` and `owner` but not `tab`; each of `byClient`, `byKind` and `byOwner` follows every filter but its own. `kind` is `threads.kind` (migration 656): `ask`, `thread`, `client_change` or `package`; a thread no code has named is a `thread`. Ages are business days (UTC). An `ask` is due `ASK_DUE_BUSINESS_DAYS` (2) business days after its first message (`dueOn`) and is `overdue` the day after, while it waits on the client. `unread` is true when the client wrote after the caller last opened the thread. `pennyDraft` is true while an Inbox draft linked to the thread is unsent. `blocksCloseStep` comes from the Inbox item the thread was sent for. `preview` is the last message, one line, at most 140 characters; a firm-only note is never in any field. The list is built over the caller's 2,000 most recently active threads. A signed-in person only: every API key is refused (404); a client user is 403.

## Query parameters

- `tab` 'needs_reply' | 'waiting_on_client' | 'resolved'
- `clientId` string, uuid
- `kind` 'ask' | 'thread' | 'client_change' | 'package'
- `owner` string: `me`, `all` or an accountant id
- `limit` integer
- `cursor` string

## Response `200`

A page of threads, the tab counts and the facets

- object
  - `success` true, required
  - `data` object, required
    - `counts` object, required
      - `needsReply` integer, required
      - `waitingOnClient` integer, required
      - `resolved` integer, required
    - `byClient` object[], required
      - `clientId` string, uuid, required
      - `name` string, required
      - `count` integer, required
    - `byKind` object[], required: All four kinds, in this order, with zero counts included.
      - `kind` 'ask' | 'thread' | 'client_change' | 'package', required
      - `count` integer, required
    - `byOwner` object[], required
      - `accountantId` string, uuid, required
      - `name` string, required
      - `count` integer, required
    - `summary` object, required: Over the same filters as `counts`, all tabs.
      - `unread` integer, required
      - `pennyDrafts` integer, required
    - `threads` object[], required
      - `threadId` string, uuid, required
      - `clientId` string, uuid, required
      - `clientName` string, required
      - `subject` string, required
      - `preview` string, nullable, required
      - `kind` 'ask' | 'thread' | 'client_change' | 'package', required
      - `owner` object, nullable, required
        - `accountantId` string, uuid, required
        - `name` string, required
      - `status` 'open' | 'resolved', required
      - `tab` 'needs_reply' | 'waiting_on_client' | 'resolved', required
      - `unread` boolean, required
      - `blocksClose` boolean, required
      - `blocksCloseStep` string, nullable, required
      - `linkedRows` object[], required
        - `transactionId` string, uuid, required
        - `label` string, required
        - `linkId` string, uuid, nullable, required: #4781: the thread_links id for DELETE …/messages/{threadId}/links/{linkId}; null for a row in the thread's own transactions (not unlinkable).
        - `linkedBy` object, nullable, required
          - `userId` string, uuid, required
          - `name` string, nullable, required
        - `linkedAt` string, date-time, nullable, required
      - `linkedEntries` object[], required: #2587 p5 (migration 666): journal entries linked to the thread (Link a row), each once, at most 10: the label is the entry's date, description and debit total.
        - `journalEntryId` string, uuid, required
        - `label` string, required
        - `linkId` string, uuid, nullable, required: #4781: the thread_links id for DELETE …/messages/{threadId}/links/{linkId}; null for a row in the thread's own transactions (not unlinkable).
        - `linkedBy` object, nullable, required
          - `userId` string, uuid, required
          - `name` string, nullable, required
        - `linkedAt` string, date-time, nullable, required
      - `pennyDraft` boolean, required
      - `ageBusinessDays` integer, required
      - `waitingSince` string, date-time, required: MI-128 (Jacob P8): what ageBusinessDays counts from. Needs reply: the client's first message since we last wrote; Waiting on client: our first message since the client last wrote (a reminder does not restart it); otherwise the last message.
      - `overdue` boolean, required
      - `dueOn` string, date, nullable, required
      - `followUp` object: Planned dates for unanswered asks using the firm's reminder preferences or defaults. These dates do not indicate delivery.
        - `firstReminderOn` string, date, required
        - `secondReminderOn` string, date, required
        - `escalateOn` string, date, required
        - `escalateTo` 'owner' | 'reviewer', required
      - `lastMessageAt` string, date-time, required
      - `with` object[], required: The client's people on the thread, once each by name. Those who wrote a message (their role at the client), then those a New message went to as To who have not written yet (their role when the address is a member's, else Client). Never the owner's Cc.
        - `name` string, required
        - `role` string, required
    - `nextCursor` string, nullable, required
    - `drafts` MessageDraftItem[], required: MI-134 (#2587 A6): the unsent drafts of the scope's open (or snoozed) Inbox items, the one draft per ask the Inbox and Close show, newest edit first; with `clientId`, that client's only. Edit and Send go through the item's draft routes (`POST /accountant/inbox-items/{id}/draft`, `POST …/draft/send`), so a send anywhere removes it here.
      - MessageDraftItem
        - [`InboxItemDraftView`](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b/schema?at=%2Fcomponents%2Fschemas%2FInboxItemDraftView)
        - object
          - `clientId` string, uuid, required
          - `clientName` string, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `422`: Validation error

## Changes

- **2026-11-27** `70fbf6a9dc18`: 1 info
  - added the optional property `data/threads/items/followUp` to the response with the `200` status
- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/messages/get.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
