---
title: "What has been filed since a cursor"
method: GET
path: "/api/v1/messages/since"
tags: ["Desk"]
---

# What has been filed since a cursor

`GET /api/v1/messages/since`

## Request

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

The cheap way to keep an open inbox current. The first call, with no `after`, returns a cursor and no messages; every later one returns the messages filed after it, mail that arrived through a connected mailbox included, with the threads they sit on, and a cursor to send next. Each answer carries the team’s mailboxes as they stand.

## Query parameters

- `after` string

## Response `200`

What was filed since, possibly nothing.

- object
  - `ok` unknown, required
  - `data` object, required
    - `cursor` string, required: Send it back as `after` to hear only what was filed since.
    - `messages` object[], required: Messages filed after the cursor, oldest filing first. Empty on the first call.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `threadId` string, required: Stable record id, e.g. `lse_012`.
      - `direction` 'inbound' | 'outbound', required
      - `channel` 'email' | 'sms' | 'whatsapp' | 'phone' | 'portal' | 'post', required
      - `fromContactId` string: Stable record id, e.g. `lse_012`.
      - `fromAddress` string: The address an inbound message came from, where the sender is nobody in the address book.
      - `fromActor` object: Set on an outbound message, naming who or what sent it.
        - `kind` 'owner' | 'ai' | 'tenant' | 'contractor' | 'system' | 'channel', required: `ai` is Dardaris acting on the owner’s behalf. Everything it touches is marked.
        - `id` string: Stable record id, e.g. `lse_012`.
        - `name` string, required
      - `toContactIds` string[], required
      - `sentAt` string, required: ISO 8601 timestamp.
      - `subject` string
      - `body` string, required
      - `language` string, required: An ISO 639-1 code. Wider than the four the product authors in, because it is what the reader reads.
      - `attachments` object[], required
        - `id` string, required: Stable record id, e.g. `lse_012`.
        - `name` string, required
        - `size` number, required
        - `kind` string, required
      - `intent` string: What the message was about, as classified on arrival. It is what the engine acted on.
      - `intentConfidence` number
      - `workflowRunId` string: Outbound only: the automated run that produced this.
      - `templateId` string: Stable record id, e.g. `lse_012`.
      - `status` 'draft' | 'discarded' | 'pending_approval' | 'scheduled' | 'filed' | 'sent' | 'delivered' | 'read' | 'failed' | 'received', required: `draft` is a reply waiting for the owner to read, `discarded` is one they threw away, and `filed` is on the thread and not sent: the product has no way to send from the owner’s address yet.
      - `deliveryProof` object: Proof of delivery, which some dunning steps legally require.
        - `method` 'registered_post' | 'read_receipt' | 'delivery_receipt', required
        - `reference` string, required
        - `at` string, required: ISO 8601 timestamp.
      - `readAt` string: ISO 8601 timestamp.
      - `provenance` object
        - `actor` object, required
          - `kind` 'owner' | 'ai' | 'tenant' | 'contractor' | 'system' | 'channel', required: `ai` is Dardaris acting on the owner’s behalf. Everything it touches is marked.
          - `id` string: Stable record id, e.g. `lse_012`.
          - `name` string, required
        - `at` string, required: ISO 8601 timestamp.
        - `workflowRunId` string: Set when an automated run produced this, linking the record back to the run.
        - `reasoning` string: The rationale the AI recorded at the moment it acted.
    - `threads` object[], required: Each thread those messages are on, as it stands now.
      - `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.
    - `more` boolean, required: True when more than 50 were filed: ask again with the new cursor at once.
    - `mailboxes` object[], required: Every mailbox of the team as it stands now, so a page sees a first read start, progress and finish.
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `address` string, required
      - `displayName` string
      - `providerId` string
      - `providerName` string, required
      - `auth` 'oauth' | 'password' | 'forwarding' | 'hosted', required: No credential is ever on this record: only which kind the server holds. `hosted` is the team’s own address at the Dardaris inbox domain, which receives and sends no reply written by hand.
      - `status` 'on_file' | 'connecting' | 'live' | 'needs_attention' | 'paused', required
      - `imapHost` string
      - `imapPort` number
      - `smtpHost` string
      - `smtpPort` number
      - `username` string
      - `prefix` string, required: The bucket prefix everything for this address is written under, inside the team’s own folder. Set by the server from the team and the address, whatever was sent.
      - `region` 'eu': The store this address’s mail is written to. Set by the server when the mailbox is first bound; whatever was sent is ignored.
      - `connectedAt` string: ISO 8601 timestamp.
      - `lastSyncedAt` string: ISO 8601 timestamp.
      - `lastSyncCount` number
      - `note` string
      - `provenance` object, required
        - `actor` object, required
          - `kind` 'owner' | 'ai' | 'tenant' | 'contractor' | 'system' | 'channel', required: `ai` is Dardaris acting on the owner’s behalf. Everything it touches is marked.
          - `id` string: Stable record id, e.g. `lse_012`.
          - `name` string, required
        - `at` string, required: ISO 8601 timestamp.
        - `workflowRunId` string: Set when an automated run produced this, linking the record back to the run.
        - `reasoning` string: The rationale the AI recorded at the moment it acted.
      - `imapSecurity` 'tls' | 'starttls' | 'none': How the mail service connects; absent is `tls`. Server-owned, like every field below: a write keeps what is on file.
      - `imapFolder` string: The folder read; absent is INBOX.
      - `credentialsRef` string: Which password the mail service holds for this address, never the password itself.
      - `syncFrom` string: ISO 8601 timestamp.
      - `imapUidValidity` number
      - `imapLastUid` number: Every message up to this uid has been stored and filed.
      - `leaseOwner` string
      - `leaseExpiresAt` string: ISO 8601 timestamp.
      - `lastHeartbeatAt` string: When the mail service last finished reading this mailbox.
      - `lastError` string
      - `lastErrorAt` string: ISO 8601 timestamp.
      - `fetchingUntil` string: ISO 8601 timestamp.
      - `fetchAgain` boolean
      - `passwordVerifiedAt` string: When a password for this mailbox was last checked against its servers and stored, sealed. The password itself is never readable through the API.
      - `consecutiveFailures` number
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: `after` is not a cursor.

---

[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)
