Get the previous or next conversation ID

GET /api/2.0/mail/conversation/{id:[0-9]+}/{direction:(next|prev)}

Request

Returns the previous or next conversation ID filtered with the parameters specified in the request.

Authorization

An API key is a token that you provide when making API calls. Include the token in a header parameter called Authorization.

Example: Authorization: 864FE52C-1C1C-469F-9308-51DAFEFE7436.

Headers

Acceptenum of string

Can be one of: application/json.

Content-Typeenum of string

Can be one of: application/json.

Body

idinteger

Head message ID of the current conversation

directionstring

Defines if the previous or next conversation is needed: "prev" for previous, "next" for next

folderarray of integer

Folder type: 1 - inbox, 2 - sent, 5 - spam

unreadarray of boolean

Conversation status: unread (true), read (false), or all (null) conversations

attachmentsarray of boolean

Defines if a conversation has attachments or not: with attachments (true), without attachments (false) or all (null) messages

period_fromarray of integer

Start search period date

period_toarray of integer

End search period date

importantarray of boolean

Specifies if only important conversations will be displayed or not

from_addressstring

Mail address from which the conversation messages were received

to_addressstring

Mail address to which the conversation messages were sent

mailbox_idarray of integer

Recipient mailbox ID

tagsarray of integer

IDs of tags linked to the target conversation

searchstring

Text to search in the conversation bodies and subjects

page_sizearray of integer

Number of conversations on the page

sortorderstring

Sort order by date: "ascending" or "descending"

with_calendararray of boolean

Specifies if the conversations have a calendar or not

user_folder_idarray of integer

User folder ID

Examples

GET /api/2.0/mail/conversation/%7Bid:[0-9]+%7D/%7Bdirection:(next%7Cprev)%7D HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: example.com
curl --request GET \
  --url 'https://example.com/api/2.0/mail/conversation/%7Bid:[0-9]+%7D/%7Bdirection:(next%7Cprev)%7D' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json'

Responses

200

Head message ID of the previous or next conversation

401

Unauthorized

Get Help

  • If you have any questions about ONLYOFFICE Workspace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).