PATCH restapi/personal/instantmessages/{instantMessageId}/restore/v1

Undo deletion for an instant message.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
instantMessageId

The instant message identifier for the message to be restored.

integer, 64 bit

Required

Body Parameters

None.

Response Information

Resource Description

Itslearning.RestApi.Entities.InstantMessage
NameDescriptionTypeAdditional information
MessageId

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

integer, 64 bit

None.

MessageThreadId

Obsolete use InstantMessageThreadId instead

integer

None.

InstantMessageThreadId

The unique id for the thread in scope of a site

integer

None.

MessageThreadParticipants

Recipients for new message threads - does not need to be filled if not used when posting a new thread

Collection of Itslearning.RestApi.Entities.InstantMessageParticipant

None.

Created

DateTime when the message was created

date

None.

CreatedFormatted

Formatted DateTime when the message was created

string

None.

CreatedRelative

How long ago the message was created

string

None.

EditedRelative

How long ago the message was edited

string

None.

CreatedBy

Id of the author of the message

integer

None.

CreatedByName

Name of the author of the message

string

None.

HomeOrganization

Home organization of the author of the message.

string

None.

CreatedByAvatar

Url to the avatar of the author

string

None.

Text

The message text

string

None.

AttachmentUrl

The url to the attached file

string

None.

AttachmentName

File name of the attached file

string

None.

Link

The link to combine together with the message text

string

None.

LinkTitle

Link title to create a friendly name for the link

string

None.

LinkTarget

The target to the link eg. _blank

string

None.

IsSystemMessage

Is the message a system message

boolean

None.

IsDeleted

Is the message deleted

boolean

None.

DeletedBy

Id of the person, who deleted this message.

integer

None.

CanDelete

If the current user is allowed to delete the message

boolean

None.

IsEdited

Is the message edited

boolean

None.

CanEdit

If the current user is allowed to edit the message

boolean

None.

IsStarred

If this message has been marked as starred by the user

boolean

None.

IsSilent

Flag used for messages we should not update the UI for

boolean

None.

IsAbuse

This message was reported as abusive by the current user.

boolean

None.

HasShared

The message is used to share another message.

boolean

None.

HasRepliedTo

The message is used to reply to another message.

boolean

None.

HasAbuseReported

The message is an abuse report. It has a child message that was marked as abusive message.

boolean

None.

HasAbuseThreadReported

The message is an report for abusive thread.

boolean

None.

OriginInstantMessage

The origin message for child message.

Itslearning.RestApi.Entities.InstantMessage

None.

OriginInstantMessageThreadId

The origin instant message thread identifier.

integer

None.

OriginInstantMessageThreadDeletedBy

Id of the person, who delete original instant message thread.

integer

None.

OriginInstantMessageThreadName

The origin instant message thread name.

string

None.

ChildMessage

The child message is shared by the message.

Itslearning.RestApi.Entities.InstantMessage

None.

AdditionalHeading

Additional heading to display. Extra information about where the message had its origin if a message was shared or replied to.

string

None.

IsBroadcastMassMessage

This message was sent as broadcast mass message.

boolean

None.

IsChildMessageDeletedPermanently

Defines that child message has been deleted permanently

boolean

None.

CreatedLocal

DateTime when the message was created converted to user's timezone

date

None.

CreatedLocalTimeStamp

Time when the message was created in user's timezone.

string

None.

CreatedLocalDateStamp

Date when the message was created in user's timezone formatted considering culture.

string

None.

CreatedByShortName

First name of the author.

string

None.

CreatedLocalShortNumericDate

Date when the message was created in user's timezone formatted as short numeric date without year.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "MessageId": 1,
  "MessageThreadId": 2,
  "InstantMessageThreadId": 3,
  "MessageThreadParticipants": [
    {
      "PersonId": 1,
      "Name": "sample string 1",
      "AvatarUrl": "sample string 2",
      "LocationType": 1,
      "LocationId": 1
    },
    {
      "PersonId": 1,
      "Name": "sample string 1",
      "AvatarUrl": "sample string 2",
      "LocationType": 1,
      "LocationId": 1
    }
  ],
  "Created": "2025-06-06T07:42:10Z",
  "CreatedFormatted": "sample string 5",
  "CreatedRelative": "sample string 6",
  "EditedRelative": "sample string 7",
  "CreatedBy": 8,
  "CreatedByName": "sample string 9",
  "HomeOrganization": "sample string 10",
  "CreatedByAvatar": "sample string 11",
  "Text": "sample string 12",
  "AttachmentUrl": "sample string 13",
  "AttachmentName": "sample string 14",
  "Link": "sample string 15",
  "LinkTitle": "sample string 16",
  "LinkTarget": "sample string 17",
  "IsSystemMessage": true,
  "IsDeleted": true,
  "DeletedBy": 20,
  "CanDelete": true,
  "IsEdited": true,
  "CanEdit": true,
  "IsStarred": true,
  "IsSilent": true,
  "IsAbuse": true,
  "HasShared": true,
  "HasRepliedTo": true,
  "HasAbuseReported": true,
  "HasAbuseThreadReported": true,
  "OriginInstantMessage": {
    "MessageId": 1,
    "MessageThreadId": 2,
    "InstantMessageThreadId": 3,
    "MessageThreadParticipants": [
      {
        "PersonId": 1,
        "Name": "sample string 1",
        "AvatarUrl": "sample string 2",
        "LocationType": 1,
        "LocationId": 1
      },
      {
        "PersonId": 1,
        "Name": "sample string 1",
        "AvatarUrl": "sample string 2",
        "LocationType": 1,
        "LocationId": 1
      }
    ],
    "Created": "2025-06-06T07:42:10Z",
    "CreatedFormatted": "sample string 5",
    "CreatedRelative": "sample string 6",
    "EditedRelative": "sample string 7",
    "CreatedBy": 8,
    "CreatedByName": "sample string 9",
    "HomeOrganization": "sample string 10",
    "CreatedByAvatar": "sample string 11",
    "Text": "sample string 12",
    "AttachmentUrl": "sample string 13",
    "AttachmentName": "sample string 14",
    "Link": "sample string 15",
    "LinkTitle": "sample string 16",
    "LinkTarget": "sample string 17",
    "IsSystemMessage": true,
    "IsDeleted": true,
    "DeletedBy": 20,
    "CanDelete": true,
    "IsEdited": true,
    "CanEdit": true,
    "IsStarred": true,
    "IsSilent": true,
    "IsAbuse": true,
    "HasShared": true,
    "HasRepliedTo": true,
    "HasAbuseReported": true,
    "HasAbuseThreadReported": true,
    "OriginInstantMessage": null,
    "OriginInstantMessageThreadId": 1,
    "OriginInstantMessageThreadDeletedBy": 1,
    "OriginInstantMessageThreadName": "sample string 31",
    "ChildMessage": null,
    "AdditionalHeading": "sample string 32",
    "IsBroadcastMassMessage": true,
    "IsChildMessageDeletedPermanently": true,
    "CreatedLocal": "2025-06-06T07:42:10Z",
    "CreatedLocalTimeStamp": "sample string 36",
    "CreatedLocalDateStamp": "sample string 37",
    "CreatedByShortName": "sample string 38",
    "CreatedLocalShortNumericDate": "sample string 39"
  },
  "OriginInstantMessageThreadId": 1,
  "OriginInstantMessageThreadDeletedBy": 1,
  "OriginInstantMessageThreadName": "sample string 31",
  "ChildMessage": {
    "MessageId": 1,
    "MessageThreadId": 2,
    "InstantMessageThreadId": 3,
    "MessageThreadParticipants": [
      {
        "PersonId": 1,
        "Name": "sample string 1",
        "AvatarUrl": "sample string 2",
        "LocationType": 1,
        "LocationId": 1
      },
      {
        "PersonId": 1,
        "Name": "sample string 1",
        "AvatarUrl": "sample string 2",
        "LocationType": 1,
        "LocationId": 1
      }
    ],
    "Created": "2025-06-06T07:42:10Z",
    "CreatedFormatted": "sample string 5",
    "CreatedRelative": "sample string 6",
    "EditedRelative": "sample string 7",
    "CreatedBy": 8,
    "CreatedByName": "sample string 9",
    "HomeOrganization": "sample string 10",
    "CreatedByAvatar": "sample string 11",
    "Text": "sample string 12",
    "AttachmentUrl": "sample string 13",
    "AttachmentName": "sample string 14",
    "Link": "sample string 15",
    "LinkTitle": "sample string 16",
    "LinkTarget": "sample string 17",
    "IsSystemMessage": true,
    "IsDeleted": true,
    "DeletedBy": 20,
    "CanDelete": true,
    "IsEdited": true,
    "CanEdit": true,
    "IsStarred": true,
    "IsSilent": true,
    "IsAbuse": true,
    "HasShared": true,
    "HasRepliedTo": true,
    "HasAbuseReported": true,
    "HasAbuseThreadReported": true,
    "OriginInstantMessage": null,
    "OriginInstantMessageThreadId": 1,
    "OriginInstantMessageThreadDeletedBy": 1,
    "OriginInstantMessageThreadName": "sample string 31",
    "ChildMessage": null,
    "AdditionalHeading": "sample string 32",
    "IsBroadcastMassMessage": true,
    "IsChildMessageDeletedPermanently": true,
    "CreatedLocal": "2025-06-06T07:42:10Z",
    "CreatedLocalTimeStamp": "sample string 36",
    "CreatedLocalDateStamp": "sample string 37",
    "CreatedByShortName": "sample string 38",
    "CreatedLocalShortNumericDate": "sample string 39"
  },
  "AdditionalHeading": "sample string 32",
  "IsBroadcastMassMessage": true,
  "IsChildMessageDeletedPermanently": true,
  "CreatedLocal": "2025-06-06T07:42:10Z",
  "CreatedLocalTimeStamp": "sample string 36",
  "CreatedLocalDateStamp": "sample string 37",
  "CreatedByShortName": "sample string 38",
  "CreatedLocalShortNumericDate": "sample string 39"
}

application/xml, text/xml

Sample:
<InstantMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities">
  <AdditionalHeading>sample string 32</AdditionalHeading>
  <AttachmentName>sample string 14</AttachmentName>
  <AttachmentUrl>sample string 13</AttachmentUrl>
  <CanDelete>true</CanDelete>
  <CanEdit>true</CanEdit>
  <ChildMessage>
    <AdditionalHeading>sample string 32</AdditionalHeading>
    <AttachmentName>sample string 14</AttachmentName>
    <AttachmentUrl>sample string 13</AttachmentUrl>
    <CanDelete>true</CanDelete>
    <CanEdit>true</CanEdit>
    <ChildMessage i:nil="true" />
    <Created>2025-06-06T07:42:10Z</Created>
    <CreatedBy>8</CreatedBy>
    <CreatedByAvatar>sample string 11</CreatedByAvatar>
    <CreatedByName>sample string 9</CreatedByName>
    <CreatedByShortName>sample string 38</CreatedByShortName>
    <CreatedFormatted>sample string 5</CreatedFormatted>
    <CreatedLocal>2025-06-06T07:42:10Z</CreatedLocal>
    <CreatedLocalDateStamp>sample string 37</CreatedLocalDateStamp>
    <CreatedLocalShortNumericDate>sample string 39</CreatedLocalShortNumericDate>
    <CreatedLocalTimeStamp>sample string 36</CreatedLocalTimeStamp>
    <CreatedRelative>sample string 6</CreatedRelative>
    <DeletedBy>20</DeletedBy>
    <EditedRelative>sample string 7</EditedRelative>
    <HasAbuseReported>true</HasAbuseReported>
    <HasAbuseThreadReported>true</HasAbuseThreadReported>
    <HasRepliedTo>true</HasRepliedTo>
    <HasShared>true</HasShared>
    <HomeOrganization>sample string 10</HomeOrganization>
    <InstantMessageThreadId>3</InstantMessageThreadId>
    <IsAbuse>true</IsAbuse>
    <IsBroadcastMassMessage>true</IsBroadcastMassMessage>
    <IsChildMessageDeletedPermanently>true</IsChildMessageDeletedPermanently>
    <IsDeleted>true</IsDeleted>
    <IsEdited>true</IsEdited>
    <IsSilent>true</IsSilent>
    <IsStarred>true</IsStarred>
    <IsSystemMessage>true</IsSystemMessage>
    <Link>sample string 15</Link>
    <LinkTarget>sample string 17</LinkTarget>
    <LinkTitle>sample string 16</LinkTitle>
    <MessageId>1</MessageId>
    <MessageThreadId>2</MessageThreadId>
    <MessageThreadParticipants>
      <InstantMessageParticipant>
        <AvatarUrl>sample string 2</AvatarUrl>
        <LocationId>1</LocationId>
        <LocationType>1</LocationType>
        <Name>sample string 1</Name>
        <PersonId>1</PersonId>
      </InstantMessageParticipant>
      <InstantMessageParticipant>
        <AvatarUrl>sample string 2</AvatarUrl>
        <LocationId>1</LocationId>
        <LocationType>1</LocationType>
        <Name>sample string 1</Name>
        <PersonId>1</PersonId>
      </InstantMessageParticipant>
    </MessageThreadParticipants>
    <OriginInstantMessage i:nil="true" />
    <OriginInstantMessageThreadDeletedBy>1</OriginInstantMessageThreadDeletedBy>
    <OriginInstantMessageThreadId>1</OriginInstantMessageThreadId>
    <OriginInstantMessageThreadName>sample string 31</OriginInstantMessageThreadName>
    <Text>sample string 12</Text>
  </ChildMessage>
  <Created>2025-06-06T07:42:10Z</Created>
  <CreatedBy>8</CreatedBy>
  <CreatedByAvatar>sample string 11</CreatedByAvatar>
  <CreatedByName>sample string 9</CreatedByName>
  <CreatedByShortName>sample string 38</CreatedByShortName>
  <CreatedFormatted>sample string 5</CreatedFormatted>
  <CreatedLocal>2025-06-06T07:42:10Z</CreatedLocal>
  <CreatedLocalDateStamp>sample string 37</CreatedLocalDateStamp>
  <CreatedLocalShortNumericDate>sample string 39</CreatedLocalShortNumericDate>
  <CreatedLocalTimeStamp>sample string 36</CreatedLocalTimeStamp>
  <CreatedRelative>sample string 6</CreatedRelative>
  <DeletedBy>20</DeletedBy>
  <EditedRelative>sample string 7</EditedRelative>
  <HasAbuseReported>true</HasAbuseReported>
  <HasAbuseThreadReported>true</HasAbuseThreadReported>
  <HasRepliedTo>true</HasRepliedTo>
  <HasShared>true</HasShared>
  <HomeOrganization>sample string 10</HomeOrganization>
  <InstantMessageThreadId>3</InstantMessageThreadId>
  <IsAbuse>true</IsAbuse>
  <IsBroadcastMassMessage>true</IsBroadcastMassMessage>
  <IsChildMessageDeletedPermanently>true</IsChildMessageDeletedPermanently>
  <IsDeleted>true</IsDeleted>
  <IsEdited>true</IsEdited>
  <IsSilent>true</IsSilent>
  <IsStarred>true</IsStarred>
  <IsSystemMessage>true</IsSystemMessage>
  <Link>sample string 15</Link>
  <LinkTarget>sample string 17</LinkTarget>
  <LinkTitle>sample string 16</LinkTitle>
  <MessageId>1</MessageId>
  <MessageThreadId>2</MessageThreadId>
  <MessageThreadParticipants>
    <InstantMessageParticipant>
      <AvatarUrl>sample string 2</AvatarUrl>
      <LocationId>1</LocationId>
      <LocationType>1</LocationType>
      <Name>sample string 1</Name>
      <PersonId>1</PersonId>
    </InstantMessageParticipant>
    <InstantMessageParticipant>
      <AvatarUrl>sample string 2</AvatarUrl>
      <LocationId>1</LocationId>
      <LocationType>1</LocationType>
      <Name>sample string 1</Name>
      <PersonId>1</PersonId>
    </InstantMessageParticipant>
  </MessageThreadParticipants>
  <OriginInstantMessage>
    <AdditionalHeading>sample string 32</AdditionalHeading>
    <AttachmentName>sample string 14</AttachmentName>
    <AttachmentUrl>sample string 13</AttachmentUrl>
    <CanDelete>true</CanDelete>
    <CanEdit>true</CanEdit>
    <ChildMessage i:nil="true" />
    <Created>2025-06-06T07:42:10Z</Created>
    <CreatedBy>8</CreatedBy>
    <CreatedByAvatar>sample string 11</CreatedByAvatar>
    <CreatedByName>sample string 9</CreatedByName>
    <CreatedByShortName>sample string 38</CreatedByShortName>
    <CreatedFormatted>sample string 5</CreatedFormatted>
    <CreatedLocal>2025-06-06T07:42:10Z</CreatedLocal>
    <CreatedLocalDateStamp>sample string 37</CreatedLocalDateStamp>
    <CreatedLocalShortNumericDate>sample string 39</CreatedLocalShortNumericDate>
    <CreatedLocalTimeStamp>sample string 36</CreatedLocalTimeStamp>
    <CreatedRelative>sample string 6</CreatedRelative>
    <DeletedBy>20</DeletedBy>
    <EditedRelative>sample string 7</EditedRelative>
    <HasAbuseReported>true</HasAbuseReported>
    <HasAbuseThreadReported>true</HasAbuseThreadReported>
    <HasRepliedTo>true</HasRepliedTo>
    <HasShared>true</HasShared>
    <HomeOrganization>sample string 10</HomeOrganization>
    <InstantMessageThreadId>3</InstantMessageThreadId>
    <IsAbuse>true</IsAbuse>
    <IsBroadcastMassMessage>true</IsBroadcastMassMessage>
    <IsChildMessageDeletedPermanently>true</IsChildMessageDeletedPermanently>
    <IsDeleted>true</IsDeleted>
    <IsEdited>true</IsEdited>
    <IsSilent>true</IsSilent>
    <IsStarred>true</IsStarred>
    <IsSystemMessage>true</IsSystemMessage>
    <Link>sample string 15</Link>
    <LinkTarget>sample string 17</LinkTarget>
    <LinkTitle>sample string 16</LinkTitle>
    <MessageId>1</MessageId>
    <MessageThreadId>2</MessageThreadId>
    <MessageThreadParticipants>
      <InstantMessageParticipant>
        <AvatarUrl>sample string 2</AvatarUrl>
        <LocationId>1</LocationId>
        <LocationType>1</LocationType>
        <Name>sample string 1</Name>
        <PersonId>1</PersonId>
      </InstantMessageParticipant>
      <InstantMessageParticipant>
        <AvatarUrl>sample string 2</AvatarUrl>
        <LocationId>1</LocationId>
        <LocationType>1</LocationType>
        <Name>sample string 1</Name>
        <PersonId>1</PersonId>
      </InstantMessageParticipant>
    </MessageThreadParticipants>
    <OriginInstantMessage i:nil="true" />
    <OriginInstantMessageThreadDeletedBy>1</OriginInstantMessageThreadDeletedBy>
    <OriginInstantMessageThreadId>1</OriginInstantMessageThreadId>
    <OriginInstantMessageThreadName>sample string 31</OriginInstantMessageThreadName>
    <Text>sample string 12</Text>
  </OriginInstantMessage>
  <OriginInstantMessageThreadDeletedBy>1</OriginInstantMessageThreadDeletedBy>
  <OriginInstantMessageThreadId>1</OriginInstantMessageThreadId>
  <OriginInstantMessageThreadName>sample string 31</OriginInstantMessageThreadName>
  <Text>sample string 12</Text>
</InstantMessage>