Message Thread

With our message threads, you can allow:

  • Patients to message their care team and vice versa
  • Organization members to chat with groups of patients
  • Organization members to chat internally with other organization members

Each message thread has two types of members:

  • Participants: Who have read and write access to the message thread and get notified when new messages come in
  • Observers: Who only have read access to the message thread and do not get notified when new messages come in

The message thread model


  • Name
    id
    Type
    string
    Description

    Unique identifier for the message thread.

  • Name
    object
    Type
    string
    Description

    Always 'message_thread'.

  • Name
    care_team_thread
    Type
    boolean
    Description

    Whether this is the official care team thread for a patient. Each patient can only have care team thread that they can message from their patient portal.

  • Name
    name
    Type
    string
    Description

    Name of the message thread.

  • Name
    patient
    Type
    string
    Description

    Only applies if "care_team_thread" is true. Patient this message thread is about.

  • Name
    participants
    Type
    array of strings
    Description

    Users who have read and write access to the message thread and get notified when new messages come in

  • Name
    observers
    Type
    array of strings
    Description

    Users who only have read access to the message thread and do not get notified when new messages come in

  • Name
    messages
    Type
    array of strings
    Description

    List of messages in the message thread.

  • Name
    read_by
    Type
    array of strings
    Description

    List of users who have read the latest message in the thread.

  • Name
    priority
    Type
    string
    Description

    Priority level of the message thread.

    Possible values:
    low
    medium
    high
  • Name
    tags
    Type
    array of strings
    Description

    Tags associated with the message thread.

  • Name
    created_by
    Type
    string
    Description

    Creator of the message thread.

  • Name
    created_at
    Type
    number
    Description

    Timestamp (in Unix epoch time in milliseconds) of when the message thread was created.

  • Name
    last_message_at
    Type
    number
    Description

    Timestamp (in Unix epoch time in milliseconds) of when the last message in the message thread was sent.

Response

{
"id": "thrd_kkF8SgJmcgaTmmziHoCv",
"object": "message_thread",
"care_team_thread": true,
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"participants": [
  "user_IsW3SoxZQxW0agHKyP2V",
],
"observers": [
    "user_o14kEdLdUloOyS4RGkII",

],
"messages": ["msg_Akeb8izH7pbIFi61gaSC", "msg_pCIB5UiIfIoZt25PqKux"],
"read_by": ["user_Z1zXZKvqrpwxbznuW6lJ", "user_IsW3SoxZQxW0agHKyP2V"],
"priority": "low",
"tags": ["Rx Refill"],
"created_by": "automationBot",
"created_at": 1653798303,
"last_message_at": 1655670724,
}