MessageThread

toloka.client.message_thread.MessageThread | Source code

MessageThread(
self,
*,
id: Optional[str] = None,
topic: Optional[Dict[str, str]] = None,
interlocutors_inlined: Optional[bool] = None,
interlocutors: Optional[List[Interlocutor]] = None,
messages_inlined: Optional[bool] = None,
messages: Optional[List[Message]] = None,
meta: Optional[Meta] = None,
answerable: Optional[bool] = None,
folders: Optional[List[Folder]] = None,
compose_details: Optional[ComposeDetails] = None,
created: Optional[datetime] = None
)

A message thread.

A message thread is created when you send a new message. Then responses are placed to the thread. Until the first response is received the message thread is in the UNREAD folder.

If the message has several recipients then a message thread is created for each recipient when they responds.

Parameters description

ParametersTypeDescription
idOptional[str]

The ID of the thread.

topicOptional[Dict[str, str]]

The message thread title. topic is a dictionary with two letter language codes as keys.

interlocutors_inlinedOptional[bool]

The way of accessing information about the sender and recipients:

  • True — Information is available in the interlocutors list.
  • False — Information is available on a separate request.
interlocutorsOptional[List[Interlocutor]]

A list with information about the sender and recipients, sorted by IDs.

messages_inlinedOptional[bool]

The way of accessing messages:

  • True — The messages are in the messages list.
  • False — The messages are available on a separate request.
messagesOptional[List[Message]]

A list with thread messages. The list is sorted by creation date: newer messages come first.

metaOptional[Meta]

Thread meta information.

answerableOptional[bool]
  • True — Tolokers can respond to your messages.
  • False — Tolokers can't respond to your messages.
foldersOptional[List[Folder]]

Folders containing the thread.

compose_detailsOptional[ComposeDetails]

The details of selecting recipients. This information is provided if the first message in the thread was yours.

createdOptional[datetime]

The date and time when the first message in the thread was created.

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming