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

# List messages in a thread (chronological ASC)

`GET /companies/{companyId}/threads/{threadId}/messages`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/threads/{threadId}/messages`
- Auth: HTTP bearer

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`

Paginated list of messages with embedded attachments

- ThreadMessagesListResponse
  - `success` boolean
  - `data` ThreadMessage[]
    - `id` string, uuid
    - `threadId` string, uuid
    - `companyId` string, uuid
    - `authorId` string, uuid, nullable
    - `body` string
    - `attachments` ThreadAttachment[]
      - `id` string, uuid, required
      - `messageId` string, uuid, required
      - `type` 'file' | 'link' | 'document' | 'transaction' | 'schedule_proposal', required
      - `label` string, nullable, required
      - `url` string, nullable, required: The stored link of a `link` or `transaction` attachment: an http(s) URL or a root-relative path. Always null for a `document` or `file` attachment, whose link is `downloadUrl`.
      - `refId` string, uuid, nullable, required: The referenced document or transaction. It is resolved only inside the thread's own company.
      - `available` boolean, required: False when a `document` or `file` attachment does not resolve for this caller: the reference is missing, belongs elsewhere, is outside the caller's authority, or its stored file is not servable. The reason is not disclosed. Always true for other kinds.
      - `downloadUrl` string, nullable, required: A download link minted for this caller on this read, valid until `downloadUrlExpiresAt`. Root-relative. Null unless the attachment is an available `document` or `file`. The download endpoint checks the caller's access again when the link is used.
      - `downloadUrlExpiresAt` string, date-time, nullable, required
      - `createdAt` string, date-time, required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
  - `meta` PaginationMeta
    - `nextCursor` string, nullable
    - `hasMore` boolean

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Thread 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)
