---
title: "Update a thread"
method: PATCH
path: "/api/v1/threads/{id}"
tags: ["Threads"]
---

# Update a thread

`PATCH /api/v1/threads/{id}`

## Request

- Base URL: `https://supermailos.com`
- URL: `https://supermailos.com/api/v1/threads/{id}`
- Auth: HTTP bearer

Mark read/unread (needs read access), star, move (inbox, archive, trash, spam) or relabel (need manage access: the mailbox's owner, an admin, or a full-access share). Returns the updated thread.

## Path parameters

- `id` string, required

## Request body

- ThreadPatch
  - `unread` boolean: Needs read access.
  - `read` boolean: Alias for `!unread`.
  - `starred` boolean
  - `folder` 'inbox' | 'archive' | 'trash' | 'spam': Move to a system folder. `spam` also trains the mailbox on the sender; `spam` → `inbox` forgives them.
  - `labels` string[]: Replace every label.
  - `addLabels` string[]
  - `removeLabels` string[]: Case-insensitive.

## Response `200`

Updated.

- object
  - `thread` Thread, required
    - `id` string, required
    - `mailboxId` string, required
    - `mailbox` string, email, required: The mailbox's address.
    - `receivedOn` string, email, required: Where the conversation arrived (an alias, if so) or the address it was sent from.
    - `subject` string, required
    - `snippet` string, required
    - `from` EmailAddress, required
      - `email` string, email, required
      - `name` string
    - `participants` EmailAddress[], required: From/To/Cc of every message — never Bcc.
      - `email` string, email, required
      - `name` string
    - `folder` 'inbox' | 'sent' | 'drafts' | 'archive' | 'spam' | 'trash', required
    - `unread` boolean, required
    - `starred` boolean, required
    - `labels` string[], required
    - `lastMessageAt` string, date-time, required
    - `snoozedUntil` string, date-time
    - `hasAttachments` boolean, required
    - `messageCount` integer, required

## Other responses

- `400`: The request is malformed.
- `401`: Missing, invalid or revoked API key.
- `403`: The key lacks the scope (`missing_scope`) or the access (`forbidden`).
- `404`: Not found — or not reachable with this key.
- `422`: Valid JSON the server can't act on (e.g. unverified domain, suppressed recipient, reused Idempotency-Key).
- `429`: Too many requests.

---

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