---
title: "Every conversation, most recently active first"
method: GET
path: "/api/v1/messages"
tags: ["Desk"]
---

# Every conversation, most recently active first

`GET /api/v1/messages`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/messages`
- Auth: API key in cookie `better-auth.session_token`

A thread carries the channel it came in on, whether a reply is owed on our side (`status`, `dueBy`), and a rolling `aiSummary` so a long exchange is readable without opening it. One page at a time: `total` says how many threads there are and `offset` reaches all of them, while `unread` is counted over the whole inbox rather than the page.

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

One page of threads.

- object
  - `ok` unknown, required
  - `data` object, required
    - `threads` object[], required: Most recently active first.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `subject` string, required
      - `channel` 'email' | 'sms' | 'whatsapp' | 'phone' | 'portal' | 'post', required
      - `participantIds` string[], required
      - `unitId` string: Stable record id, e.g. `lse_012`.
      - `buildingId` string: Set where the conversation is about a whole building rather than a lot in it.
      - `leaseId` string: Stable record id, e.g. `lse_012`.
      - `bookingId` string: Stable record id, e.g. `lse_012`.
      - `issueId` string: Stable record id, e.g. `lse_012`.
      - `lastMessageAt` string, required: ISO 8601 timestamp.
      - `messageIds` string[], required
      - `status` 'open' | 'waiting_on_tenant' | 'waiting_on_us' | 'snoozed' | 'closed', required
      - `dueBy` string: When a reply is owed on our side.
      - `snoozedUntil` string: ISO 8601 timestamp.
      - `unread` boolean, required
      - `pinned` boolean, required
      - `labels` string[], required
      - `aiSummary` string: A rolling summary, so a long thread is readable at a glance.
      - `sentiment` 'positive' | 'neutral' | 'frustrated' | 'angry'
      - `escalationRisk` 'none' | 'low' | 'medium' | 'high': How likely this is to turn into a dispute if it is left alone.
      - `participantNames` string[], required: The people on the thread, named the way an owner says them.
      - `unitLabel` string, required: Resolved through buildingLabel(), so an owner alias is honoured. "None" when the thread is about no particular unit.
    - `unread` number, required: How many threads carry an unread message. Every thread on file, not just the ones on this page.
    - `total` number, required: Every thread on file. Every one of them is reachable through `offset`.
    - `limit` number, required: The page size actually used, which is smaller than the one asked for once it passes the cap.
    - `offset` number, required: The offset this page was read at.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: `limit` or `offset` is out of range.

---

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