Skip to content
English

Messages and conversations

Lists and pagination

GET /v1/mailboxes/{mailbox_id}/folders returns folders with a total number of letters total, number of unread ones unread and a value of uidvalidity. For a list of letters use GET /v1/mailboxes/{mailbox_id}/messages: the response contains items, next_before and uidvalidity, up to 40 letters per page.

Pass next_before as the before parameter of the next request. A null cursor marks the end of the list. The q search parameter accepts up to 200 characters and searches mail content.

GET /v1/mailboxes/42/messages?folder=INBOX
GET /v1/mailboxes/42/messages?folder=INBOX&before=120

message IDs

uid identifies a message within a folder, folder is the folder name, and mailbox_id identifies the mailbox. uidvalidity identifies the current numbering of messages in that folder. Keep all four values from the API response together.

If uidvalidity changes, reload the folder’s message list; previous uid values are no longer valid. Reading a message does not mark it as read. Use POST /v1/mailboxes/{mailbox_id}/messages/actions with action=read to mark it as read.

POST /v1/mailboxes/42/messages/actions
{"folder":"INBOX","uidvalidity":123456,"uids":[120],"action":"read"}

Conversation view

GET /v1/mailboxes/{mailbox_id}/threads returns up to 100 dialogs. Pass thread_id of the selected conversation to GET /v1/mailboxes/{mailbox_id}/threads/{thread_id} to get its letters from old to new.

A new message may appear in the dialogue with a slight delay. Update the list; To check the submission, use the operation status. There is no need to resend the email due to display delay.