---
title: "PATCH /api/message_threads/{id}"
method: PATCH
path: "/api/message_threads/{id}"
tags: ["Practice Management"]
---

# PATCH /api/message_threads/{id}

`PATCH /api/message_threads/{id}`

## Request

- Base URL: `https://app.drchrono.com`
- URL: `https://app.drchrono.com/api/message_threads/{id}`
- Auth: OAuth 2
  - Authorization code: `https://app.drchrono.com/o/authorize/`
  - Token URL: `https://app.drchrono.com/o/token/` scopes: `messages:read`, `messages:write`

Partially update a message thread.

Only the following fields can be updated:
- `archived` (boolean): Mark thread as archived/unarchived
- `starred` (boolean): Mark thread as starred/unstarred
- `assigned_user_profiles` (array of integers): Assign user profiles to the thread
- `assigned_groups` (array of integers): Assign user groups to the thread

All other fields are read-only and will be ignored if provided.

## Path parameters

- `id` string, required

## Query parameters

- `doctor` integer
- `practice_group` integer
- `patient` integer
- `message_type` string
- `archived` string
- `starred` string
- `unread_count` integer
- `updated_since` string

## Request body

- object
  - `assigned_groups` integer[]: Array of user group IDs to assign to this thread
  - `archived` boolean: Whether the thread is archived
  - `starred` boolean: Whether the thread is starred
  - `assigned_user_profiles` integer[]: Array of user profile IDs to assign to this thread

## Response `200`

OK

- DoctorMessageThread
  - `assigned_groups` integer[]: Array of user group IDs assigned to this thread
  - `archived` boolean: Whether the thread is archived
  - `first_message` integer: ID of the first message in the thread
  - `patient` integer: ID of the patient associated with this thread (if patient-facing)
  - `doctor` integer: ID of the doctor who owns this thread
  - `last_message` integer: ID of the most recent message in the thread
  - `practice_group` integer: ID of the practice group for access control
  - `created_at` string, date-time: Timestamp when the thread was created
  - `updated_at` string, date-time: Timestamp when the thread was last updated
  - `assigned_user_profiles` integer[]: Array of user profile IDs assigned to this thread
  - `message_count` integer: Total number of messages in this thread
  - `unread_count` integer: Number of unread messages in this thread
  - `last_message_at` string, date-time: Timestamp of the last message - used for sorting
  - `owners` integer[]: Array of user profile IDs who own this thread
  - `starred` boolean: Whether the thread is starred
  - `message_type` string: Type of messages in this thread. See `/api/messages` for message type descriptions
  - `id` integer: Unique identifier for the message thread
  - `subject` string: Thread subject - locked to first message subject

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Permission Denied
- `404`: Not Found
- `405`: Method Not Allowed
- `500`: Internal Server Error

## Changes

- **2026-07-13** `1f92de898aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/drchrono/apis/drchrono-api/changes/api/message_threads/:id/patch.md)

---

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