v2

latestOpenAPI 3.0.02026-07-2632977728.5 KB
Practice Management

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.

patch/api/message_threads/{id}

Path parameters

idstring required

Query parameters

doctorinteger
practice_groupinteger
patientinteger
message_typestring
archivedstring
starredstring
unread_countinteger
updated_sincestring

Request body

assigned_groupsinteger[]

Array of user group IDs to assign to this thread

archivedboolean

Whether the thread is archived

starredboolean

Whether the thread is starred

assigned_user_profilesinteger[]

Array of user profile IDs to assign to this thread

Response

OK

assigned_groupsinteger[]

Array of user group IDs assigned to this thread

archivedboolean

Whether the thread is archived

first_messageinteger

ID of the first message in the thread

patientinteger

ID of the patient associated with this thread (if patient-facing)

doctorinteger

ID of the doctor who owns this thread

last_messageinteger

ID of the most recent message in the thread

practice_groupinteger

ID of the practice group for access control

created_atstring date-time

Timestamp when the thread was created

updated_atstring date-time

Timestamp when the thread was last updated

assigned_user_profilesinteger[]

Array of user profile IDs assigned to this thread

message_countinteger

Total number of messages in this thread

unread_countinteger

Number of unread messages in this thread

last_message_atstring date-time

Timestamp of the last message - used for sorting

ownersinteger[]

Array of user profile IDs who own this thread

starredboolean

Whether the thread is starred

message_typestring

Type of messages in this thread. See /api/messages for message type descriptions

idinteger

Unique identifier for the message thread

subjectstring

Thread subject - locked to first message subject