Returns the messages with the parameters specified in the request.
Name | Description | Type | Example |
folder
sent in url
|
Folder ID
optional
|
number | 1234 |
unread
sent in url
|
Message status: unread (true), read (false), or all (null) messages
optional
|
Bool value | true |
attachments
sent in url
|
Defines if a message has attachments or not: with attachments (true), without attachments (false), or all (null) messages
optional
|
Bool value | true |
period_from
sent in url
|
Start search period date
optional
|
number | 1234 |
period_to
sent in url
|
End search period date
optional
|
number | 1234 |
important
sent in url
|
Specifies if only important messages will be displayed or not
optional
|
Bool value | true |
from_address
sent in url
|
Mail address from which a letter was received
optional
|
string | some text |
to_address
sent in url
|
Mail address to which a letter was sent
optional
|
string | some text |
mailbox_id
sent in url
|
Recipient mailbox ID
optional
|
number | 1234 |
tags
sent in url
|
IDs of tags linked to the target messages
optional
|
Collection of numbers
collection
|
1234 |
search
sent in url
|
Text to search in the message bodies and subjects
optional
|
string | some text |
page
sent in url
|
Page number
optional
|
number | 1234 |
with_calendar
sent in url
|
Specifies if the messages have a calendar or not
optional
|
number | 1234 |
page_size
sent in url
|
Number of messages on the page
optional
|
string | some text |
user_folder_id
sent in url
|
User folder ID
optional
|
Bool value | true |
sortorder
sent in url
|
Sort order by date: "ascending" or "descending"
optional
|
number | 1234 |
GET api/2.0/mail/messages?folder=1234&unread=true&attachments=true&period_from=1234&period_to=1234&important=true&from_address=%22some+text%22&to_address=%22some+text%22&mailbox_id=1234&tags=%5b%0d%0a++1234%0d%0a%5d&search=%22some+text%22&page=1234&with_calendar=1234&page_size=%22some+text%22&user_folder_id=true&sortorder=1234 Host: yourportal.onlyoffice.com Content-Type: application/json Accept: application/json
List of filtered messages
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>