Move a message thread
Adds or removes a message thread from a folder.
Message threads located in the UNREAD
folder are marked as unread in the interface.
Message threads located in the IMPORTANT
folder are marked as important in the interface.
Request
- To add to a folder
-
Adds a message thread to a folder.
POST https://toloka.yandex.com/api/v1/message-threads/<thread_id>/add-to-folders Authorization: OAuth <OAuth token> Content-Type: application/JSON
POST https://sandbox.toloka.yandex.com/api/v1/message-threads/<thread_id>/add-to-folders Authorization: OAuth <OAuth token> Content-Type: application/JSON
- Remove from a folder
-
Deletes a message thread from a folder.
POST https://toloka.yandex.com/api/v1/message-threads/<thread_id>/remove-from-folders Authorization: OAuth <OAuth token> Content-Type: application/JSON
POST https://sandbox.toloka.yandex.com/api/v1/message-threads/<thread_id>/remove-from-folders Authorization: OAuth <OAuth token> Content-Type: application/JSON
Path parameters
Parameter | Overview |
---|---|
thread_id | Message thread ID. |
Parameter | Overview |
---|---|
thread_id | Message thread ID. |
Headers
Title | Overview |
---|---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Content-Type | Specifies the data format in the request body. |
Title | Overview |
---|---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Content-Type | Specifies the data format in the request body. |
Request body
{ "folders": ["UNREAD", "IMPORTANT"] }
Copied to clipboard
Parameter | Overview |
---|---|
folders | array of strings Folders to add a message thread to or remove a message thread from. |
Parameter | Overview |
---|---|
folders | array of strings Folders to add a message thread to or remove a message thread from. |