# M10 - Retrieve a thread

Call Frequency

Recommended usage: Synchronous only - At each page that includes a message thread display
Maximum usage: Synchronous only - At each page that includes a message thread display
Read More

More context (Products Marketplace)More context (Services Marketplace)

Endpoint: GET /api/inbox/threads/{thread_id}

## Path parameters:

  - `thread_id` (string, required)
    The identifier of the thread to retrieve.

## Query parameters:

  - `customer_id` (string)
    Customer id associated to the thread. If specified the response will contain only messages visible by the customer. This param should be typically filled when calling this API during a customer account integration. Not specifying this parameter will return all messages of the thread. Useful when you want to synchronize all messaging data with your IT system.

## Response 200 fields (application/json):

  - `authorized_participants` (array, required)
    Thread authorized participants
Those are the participants who are authorized to join the thread.

  - `authorized_participants.display_name` (string, required)
    Participant display name

  - `authorized_participants.id` (string)
    Participant idWhen type equals OPERATOR, no id will be returned.

  - `authorized_participants.type` (string, required)
    Participant type

Enum: "OPERATOR", "SHOP", "CUSTOMER"

  - `current_participants` (array, required)
    Thread current participants
Those are the participants who have actually participated in the thread, meaning that they are either sender or receivers of at least one message of the thread.
These participants must be on the list of the authorized_participants

  - `current_participants.display_name` (string, required)
    Participant display name

  - `current_participants.id` (string)
    Participant idWhen type equals OPERATOR, no id will be returned.

  - `current_participants.type` (string, required)
    Participant type

Enum: "OPERATOR", "SHOP", "CUSTOMER"

  - `customer_organization` (object)
    Data related to the customer organization (B2B transactions)

  - `customer_organization.display_name` (string, required)
    Customer organization name

  - `customer_organization.id` (string, required)
    Customer organization id

  - `date_created` (string, required)
    Thread created date

  - `date_updated` (string, required)
    Thread updated date

  - `entities` (array)
    Thread entities

  - `entities.id` (string, required)
    Entity id

  - `entities.label` (string, required)
    Entity label

  - `entities.type` (string, required)
    Entity type

  - `id` (string, required)
    Thread id

  - `messages` (array, required)
    Thread messages

  - `messages.attachments` (array)
    Message attachments

  - `messages.attachments.id` (string, required)
    Attachment id

  - `messages.attachments.name` (string, required)
    Attachment file name

  - `messages.attachments.size` (integer, required)
    Attachment size

  - `messages.body` (string, required)
    Message body

  - `messages.date_created` (string, required)
    Message creation date

  - `messages.from` (object, required)
    Message sender

  - `messages.from.display_name` (string, required)
    Sender display name

  - `messages.from.organization_details` (object)
    Organization details of the sender

  - `messages.from.organization_details.display_name` (string, required)
    Participant display name

  - `messages.from.organization_details.id` (string)
    Participant idWhen type equals OPERATOR, no id will be returned.

  - `messages.from.organization_details.type` (string, required)
    Participant type

Enum: "OPERATOR", "SHOP", "CUSTOMER"

  - `messages.from.type` (string, required)
    Sender type

Enum: "OPERATOR_USER", "SHOP_USER", "CUSTOMER_USER"

  - `messages.id` (string, required)
    Message id

  - `messages.to` (array, required)
    Message recipients

  - `messages.to.display_name` (string, required)
    Participant display name

  - `messages.to.id` (string)
    Participant idWhen type equals OPERATOR, no id will be returned.

  - `messages.to.type` (string, required)
    Participant type

Enum: "OPERATOR", "SHOP", "CUSTOMER"

  - `metadata` (object, required)
    Thread metadata

  - `metadata.last_message_date` (string, required)
    Date of the last message

  - `metadata.last_sender` (object, required)
    Last message sender

  - `metadata.last_sender.display_name` (string, required)
    Sender display name

  - `metadata.last_sender.organization_details` (object)
    Organization details of the sender

  - `metadata.last_sender.organization_details.display_name` (string, required)
    Participant display name

  - `metadata.last_sender.organization_details.id` (string)
    Participant idWhen type equals OPERATOR, no id will be returned.

  - `metadata.last_sender.organization_details.type` (string, required)
    Participant type

Enum: "OPERATOR", "SHOP", "CUSTOMER"

  - `metadata.last_sender.type` (string, required)
    Sender type

Enum: "OPERATOR_USER", "SHOP_USER", "CUSTOMER_USER"

  - `metadata.shop_reply_needed_since` (string, required)
    Date since the latest unanswered message awaiting a shop reply. Null when the shop has replied.

  - `metadata.total_count` (integer, required)
    Number of messages in the thread

  - `no_store_reply_needed` (array)
    Thread "no store reply needed" actions.

  - `no_store_reply_needed.date` (string, required)
    No store reply needed action date

  - `no_store_reply_needed.user_type` (string, required)
    Entity that operated "no store reply needed" action.


Enum: "OPERATOR", "SHOP"

  - `topic` (object, required)
    Thread topic

  - `topic.type` (string, required)
    Topic type

Enum: "FREE_TEXT", "REASON_CODE"

  - `topic.value` (string, required)
    Topic value


