PUT restapi/personal/messages/{messageId}/v1?messageOrigin={messageOrigin}

Updates a message's properties.

Only supports updating the IsRead field of Message. Will return HTTP status 404 if the messageId is not found or the user does not have access to it.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
messageId

The message Id

integer

Required

messageOrigin

Optional query param. The origin of this api call in the UI.

Itsolutions.ItslUtils.Constants.MessageOrigin

None.

Body Parameters

The modified message

Itslearning.RestApi.Entities.Updatable.MessageUpdateV1
NameDescriptionTypeAdditional information
MessageId

The MessageId

integer

None.

IsRead

Whether the message has been read

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "MessageId": 1,
  "IsRead": true
}

application/xml, text/xml

Sample:
<MessageUpdateV1 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities.Updatable">
  <IsRead>true</IsRead>
  <MessageId>1</MessageId>
</MessageUpdateV1>

application/x-www-form-urlencoded

Sample:
No sample available

Response Information

Resource Description

The updated message

Itslearning.RestApi.Entities.Message
NameDescriptionTypeAdditional information
Text

The message text. (can contain html)

string

None.

To

The list of users this message was sent to.

Collection of Itslearning.RestApi.Entities.PersonSimple

None.

Attachments

A list of attachments to this message.

Collection of Itslearning.RestApi.Entities.Attachment

None.

MessageId

The unique id for for the message, in scope of a site (itslearning customer).

integer

None.

From

Basic details of who sent the message.

Itslearning.RestApi.Entities.PersonSimple

None.

DateReceived

When the message was received. Time zone is UTC.

date

None.

Subject

The subject of the message.

string

None.

PreviewText

The preview text (the first part of the message, stripped for html and html entities).

string

None.

MessageUrl

The URL of the complete message.

string

None.

ContentUrl

The content URL of the complete message.

string

None.

HasAttachments

True if this message has any attachments.

boolean

None.

IsRead

True if this message has been read.

boolean

None.

IsForwarded

True if this message has been forwarded.

boolean

None.

LastForwardedDateTime

The time and date the last time this message was forwarded.

date

None.

IsReplied

True if this message has been replied.

boolean

None.

LastRepliedDateTime

The time and date the last time this message was replied.

date

None.

Response Formats

application/json, text/json

Sample:
{
  "Text": "sample string 1",
  "To": [
    {
      "PersonId": 1,
      "FirstName": "sample string 2",
      "LastName": "sample string 3",
      "FullName": "sample string 4",
      "ProfileUrl": "sample string 5",
      "AdditionalInfo": "sample string 6",
      "ProfileImageUrl": "sample string 7",
      "ProfileImageUrlSmall": "sample string 8"
    },
    {
      "PersonId": 1,
      "FirstName": "sample string 2",
      "LastName": "sample string 3",
      "FullName": "sample string 4",
      "ProfileUrl": "sample string 5",
      "AdditionalInfo": "sample string 6",
      "ProfileImageUrl": "sample string 7",
      "ProfileImageUrlSmall": "sample string 8"
    }
  ],
  "Attachments": [
    {
      "FileId": 1,
      "Url": "sample string 2",
      "DisplayName": "sample string 3",
      "FileSizeInKiloBytes": 4
    },
    {
      "FileId": 1,
      "Url": "sample string 2",
      "DisplayName": "sample string 3",
      "FileSizeInKiloBytes": 4
    }
  ],
  "MessageId": 2,
  "From": {
    "PersonId": 1,
    "FirstName": "sample string 2",
    "LastName": "sample string 3",
    "FullName": "sample string 4",
    "ProfileUrl": "sample string 5",
    "AdditionalInfo": "sample string 6",
    "ProfileImageUrl": "sample string 7",
    "ProfileImageUrlSmall": "sample string 8"
  },
  "DateReceived": "2025-06-16T20:46:06Z",
  "Subject": "sample string 4",
  "PreviewText": "sample string 5",
  "MessageUrl": "sample string 6",
  "ContentUrl": "sample string 7",
  "HasAttachments": true,
  "IsRead": true,
  "IsForwarded": true,
  "LastForwardedDateTime": "2025-06-16T20:46:06Z",
  "IsReplied": true,
  "LastRepliedDateTime": "2025-06-16T20:46:06Z"
}

application/xml, text/xml

Sample:
<Message xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ContentUrl>sample string 7</ContentUrl>
  <DateReceived>2025-06-16T20:46:06Z</DateReceived>
  <From>
    <AdditionalInfo>sample string 6</AdditionalInfo>
    <FirstName>sample string 2</FirstName>
    <FullName>sample string 4</FullName>
    <LastName>sample string 3</LastName>
    <PersonId>1</PersonId>
    <ProfileImageUrl>sample string 7</ProfileImageUrl>
    <ProfileImageUrlSmall>sample string 8</ProfileImageUrlSmall>
    <ProfileUrl>sample string 5</ProfileUrl>
  </From>
  <HasAttachments>true</HasAttachments>
  <IsForwarded>true</IsForwarded>
  <IsRead>true</IsRead>
  <IsReplied>true</IsReplied>
  <LastForwardedDateTime>2025-06-16T20:46:06Z</LastForwardedDateTime>
  <LastRepliedDateTime>2025-06-16T20:46:06Z</LastRepliedDateTime>
  <MessageId>2</MessageId>
  <MessageUrl>sample string 6</MessageUrl>
  <PreviewText>sample string 5</PreviewText>
  <Subject>sample string 4</Subject>
  <Attachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities">
    <d2p1:Attachment>
      <d2p1:DisplayName>sample string 3</d2p1:DisplayName>
      <d2p1:FileId>1</d2p1:FileId>
      <d2p1:FileSizeInKiloBytes>4</d2p1:FileSizeInKiloBytes>
      <d2p1:Url>sample string 2</d2p1:Url>
    </d2p1:Attachment>
    <d2p1:Attachment>
      <d2p1:DisplayName>sample string 3</d2p1:DisplayName>
      <d2p1:FileId>1</d2p1:FileId>
      <d2p1:FileSizeInKiloBytes>4</d2p1:FileSizeInKiloBytes>
      <d2p1:Url>sample string 2</d2p1:Url>
    </d2p1:Attachment>
  </Attachments>
  <Text>sample string 1</Text>
  <To>
    <PersonSimple>
      <AdditionalInfo>sample string 6</AdditionalInfo>
      <FirstName>sample string 2</FirstName>
      <FullName>sample string 4</FullName>
      <LastName>sample string 3</LastName>
      <PersonId>1</PersonId>
      <ProfileImageUrl>sample string 7</ProfileImageUrl>
      <ProfileImageUrlSmall>sample string 8</ProfileImageUrlSmall>
      <ProfileUrl>sample string 5</ProfileUrl>
    </PersonSimple>
    <PersonSimple>
      <AdditionalInfo>sample string 6</AdditionalInfo>
      <FirstName>sample string 2</FirstName>
      <FullName>sample string 4</FullName>
      <LastName>sample string 3</LastName>
      <PersonId>1</PersonId>
      <ProfileImageUrl>sample string 7</ProfileImageUrl>
      <ProfileImageUrlSmall>sample string 8</ProfileImageUrlSmall>
      <ProfileUrl>sample string 5</ProfileUrl>
    </PersonSimple>
  </To>
</Message>