---
title: "List messages in a thread (chronological ASC)"
method: GET
path: "/accountant/threads/{threadId}/messages"
tags: ["Accountant Portal"]
---

# List messages in a thread (chronological ASC)

`GET /accountant/threads/{threadId}/messages`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/threads/{threadId}/messages`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Each attachment is resolved for the caller on every read. A `document` or `file` attachment that resolves inside the thread's company, under the caller's own authority, with a servable stored file, is `available` and carries a `downloadUrl` minted for this caller; otherwise it is `available: false` with no link, whatever the reason.

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Messages with their attachments

- AccountantThreadMessagesListResponse
  - `success` boolean
  - `data` AccountantThreadMessage[]
    - `id` string, uuid, required
    - `sender` string, required
    - `senderName` string, required
    - `senderAvatarUrl` string, nullable, required
    - `content` string, required
    - `timestamp` string, date-time, required
    - `attachments` AccountantThreadAttachment[], required
      - `name` string, required: The attachment's label, falling back to its reference id or url.
      - `type` 'file' | 'link' | 'document' | 'transaction' | 'schedule_proposal', required
      - `url` string, nullable, required: The stored link of a `link` or `transaction` attachment. Always null for a `document` or `file` attachment, whose link is `downloadUrl`.
      - `refId` string, uuid, nullable, required
      - `available` boolean, required: False when a `document` or `file` attachment does not resolve for this caller. The reason is not disclosed.
      - `downloadUrl` string, nullable, required: A download link minted for this caller on this read. Root-relative. Null unless the attachment is an available `document` or `file`.
      - `downloadUrlExpiresAt` string, date-time, nullable, required
  - `meta` object
    - `nextCursor` string, nullable
    - `hasMore` boolean

## Other responses

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

---

[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/20090ea32b0d?raw)
