---
title: "Mark a thread read up to a message"
method: PUT
path: "/threads/{id}/read"
tags: ["Threads"]
---

# Mark a thread read up to a message

`PUT /threads/{id}/read`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/threads/{id}/read`
- Auth: HTTP bearer

Moves the signed-in member's read cursor for this thread forward to the named message or instant, for every device the member uses. Monotonic and idempotent: a position at or behind the stored cursor changes nothing (`advanced: false`), so devices reporting reads out of order converge on the furthest one. Returns the thread's read state after the write; a retry at the same position returns the current state with `advanced: false`. Once the write commits the answer is always 200: if the unread count cannot be read afterwards, `unread_count` is null and `state_unavailable` is true, and the cursor fields still hold. Only a signed-in organization member (a dashboard session or an OAuth member grant) can use this. Organization API keys, agent connection keys and Functions are refused with 403: read state is personal to a member.

## Path parameters

- `id` string, uuid, required

## Request body

- MarkThreadReadInput: Name exactly one of `up_to_email_id` or `up_to`.
  - `up_to_email_id` string, uuid: An email or sent email in this thread. It and everything that arrived before it are read.
  - `up_to` string, date-time: Everything that arrived at or before this instant is read. A future instant is clamped to now.

## Response `200`

Success

- object
  - `success` true, required
  - `data` MarkThreadReadResult, required
    - `thread_id` string, uuid, required
    - `last_read_at` string, date-time, nullable, required: Arrival time of the newest message the member has read in this thread, in microsecond UTC form, or null when the member never marked it. Sending it back as `up_to` names the same instant; a timestamp cursor covers every message that arrived at that instant, so it is at or ahead of an id cursor at the same instant.
    - `last_read_email_id` string, uuid, nullable, required: The email or sent email the cursor was set from, or null (never marked, or marked by `up_to`).
    - `unread_count` integer, nullable, required: Inbound mail in the thread that arrived after the cursor, counting only mail from others: informational signals (`fyi: true`, such as read and acknowledgement notices) and mail the member sent from their own address are not counted. A thread the member never marked counts all of it. Null only together with `state_unavailable`.
    - `updated_at` string, date-time, nullable, required: When the cursor last moved, or null when it never did. Orders the `updated_since` change feed.
    - `advanced` boolean, required: False when the request named a position at or behind the stored cursor, so nothing changed.
    - `state_unavailable` true: Present only when the cursor write committed but the unread count could not be read afterwards. The cursor fields are the committed ones and `unread_count` is null: treat the write as done and read the count later from `GET /threads/read-state` rather than retrying the write.

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `403`: Authenticated caller lacks permission for the operation
- `404`: Resource not found
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.

## Changes

> 32 revisions in range; 1 not diffed.

- **2026-10-21** `0360ea8d4f3d`: 65 warning
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `400`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `401`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `403`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `404`
  - …61 more
- **2026-10-21** `5279a7bed7ac`: 55 warning
  - added the new `archive_busy` enum value to the `error/code` response property for the response status `400`
  - added the new `archive_busy` enum value to the `error/code` response property for the response status `401`
  - added the new `archive_busy` enum value to the `error/code` response property for the response status `403`
  - added the new `archive_busy` enum value to the `error/code` response property for the response status `404`
  - …51 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/primitive/apis/primitive-api/changes/threads/:id/read/put.md)

---

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