# M14 - Create a thread with the operator

DescriptionCreate a thread with the operator and send a first message
Call FrequencyRecommended usage: Synchronous only - At each threadMaximum usage: Synchronous only - At each thread answer

Endpoint: POST /api/inbox/threads
Security: Shop-API-Key

## Security:

  - `Shop-API-Key` (unknown)
    apiKey in header Authorization scopes: ROLE_SHOP_ADMIN

## Query parameters:

  - `shop_id` (integer)
    Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

## Request fields (multipart/form-data):

  - `files` (array)
    List of attachments for the messageMaximum 1000 across all threads of the same entity.For example, for a given seller, you can not have more than 1000 attachments across all its threads.

  - `thread_input` (object, required)

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

  - `thread_input.entity` (object, required)
    Entity related to the thread

  - `thread_input.entity.type` (string, required)
    Entity type

  - `thread_input.topic` (object, required)
    Topic of the thread

  - `thread_input.topic.type` (string)
    Enum: `"FREE_TEXT"`, `"REASON_CODE"`
    Enum: "FREE_TEXT", "REASON_CODE"

  - `thread_input.topic.value` (string)

## Request examples:

  - `Complete example with value types (multipart/form-data)` (unknown)

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

  - `message_id` (string)
    Id of the message

  - `thread_id` (string)
    Id of the thread

## Response 201 examples:

  - `Example with business values (application/json)` (unknown)

  - `Complete example with value types (application/json)` (unknown)

