GET api/2.0/mail/messages/{id} This function requires authentication

Description

Returns the detailed information about a message with the ID specified in the request.

Parameters
Name Description Type Example
id
sent in url
Message ID number 1234
loadImages
sent in url
Specifies whether to display images sent in a message or not
optional
Bool value true
needSanitize
sent in url
Specifies if HTML needs to be prepared for the FCK editor or not
optional
Bool value true
markRead
sent in url
Specifies if a message will be marked as read or not
optional
Bool value true
Example
GET api/2.0/mail/messages/1234?loadImages=true&needSanitize=true&markRead=true
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json
Returns

Message information

Example Response

application/json

{
  "status": 0,
  "response": {
    "Attachments": [
      {
        "fileId": 1234,
        "fileName": "fileName",
        "size": 1234,
        "contentType": "contentType",
        "needSaveToTemp": true,
        "contentId": "contentId",
        "fileNumber": 333,
        "storedName": "storedName",
        "streamId": "streamId",
        "savedToMyDocuments": true,
        "tempStoredUrl": "tempStoredUrl"
      }
    ],
    "Introduction": "Introduction",
    "HtmlBody": "HtmlBody",
    "ContentIsBlocked": true,
    "Important": true,
    "Subject": "Subject",
    "HasAttachments": true,
    "Bcc": "Bcc",
    "Cc": "Cc",
    "To": "To",
    "Address": "Address",
    "From": "From",
    "ReplyTo": "ReplyTo",
    "Id": 555,
    "ChainId": "ChainId",
    "ChainDate": "ChainDate",
    "Date": "Date",
    "DateDisplay": "DateDisplay",
    "TagIds": [
      1234
    ],
    "LabelsInString": "LabelsInString",
    "IsNew": true,
    "IsAnswered": true,
    "IsForwarded": true,
    "TextBodyOnly": true,
    "Size": 555555,
    "EMLLink": "EMLLink",
    "StreamId": "StreamId",
    "RestoreFolderId": 1,
    "Folder": 1,
    "UserFolderId": 144,
    "ChainLength": 144,
    "WasNew": false,
    "IsToday": false,
    "IsYesterday": false,
    "ReceivedDate": "2020-12-18T08:12:09.1209967Z",
    "IsBodyCorrupted": false,
    "HasParseError": false,
    "MimeMessageId": "MimeMessageId",
    "MimeReplyToId": "MimeReplyToId",
    "CalendarUid": "CalendarUid"
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Attachments>
      <fileId>1234</fileId>
      <fileName>fileName</fileName>
      <size>1234</size>
      <contentType>contentType</contentType>
      <needSaveToTemp>True</needSaveToTemp>
      <contentId>contentId</contentId>
      <fileNumber>333</fileNumber>
      <storedName>storedName</storedName>
      <streamId>streamId</streamId>
      <savedToMyDocuments>True</savedToMyDocuments>
      <tempStoredUrl>tempStoredUrl</tempStoredUrl>
    </Attachments>
    <Introduction>Introduction</Introduction>
    <HtmlBody>HtmlBody</HtmlBody>
    <ContentIsBlocked>True</ContentIsBlocked>
    <Important>True</Important>
    <Subject>Subject</Subject>
    <HasAttachments>True</HasAttachments>
    <Bcc>Bcc</Bcc>
    <Cc>Cc</Cc>
    <To>To</To>
    <Address>Address</Address>
    <From>From</From>
    <ReplyTo>ReplyTo</ReplyTo>
    <Id>555</Id>
    <ChainId>ChainId</ChainId>
    <ChainDate>ChainDate</ChainDate>
    <Date>Date</Date>
    <DateDisplay>DateDisplay</DateDisplay>
    <TagIds>1234</TagIds>
    <LabelsInString>LabelsInString</LabelsInString>
    <IsNew>True</IsNew>
    <IsAnswered>True</IsAnswered>
    <IsForwarded>True</IsForwarded>
    <TextBodyOnly>True</TextBodyOnly>
    <Size>555555</Size>
    <EMLLink>EMLLink</EMLLink>
    <StreamId>StreamId</StreamId>
    <RestoreFolderId>1</RestoreFolderId>
    <Folder>1</Folder>
    <UserFolderId>144</UserFolderId>
    <ChainLength>144</ChainLength>
    <WasNew>False</WasNew>
    <IsToday>False</IsToday>
    <IsYesterday>False</IsYesterday>
    <ReceivedDate>2020-12-18T08:12:09.1209967Z</ReceivedDate>
    <IsBodyCorrupted>False</IsBodyCorrupted>
    <HasParseError>False</HasParseError>
    <MimeMessageId>MimeMessageId</MimeMessageId>
    <MimeReplyToId>MimeReplyToId</MimeReplyToId>
    <CalendarUid>CalendarUid</CalendarUid>
  </response>
</result>