# OR43 - Create a thread on an order

DescriptionEach message has a 30 Megabyte size limit, regardless of the number of attachments in the message.Call FrequencyRecommended usage: At each new thread posted on an orderMaximum usage: At each new thread posted on an order

Endpoint: POST /api/orders/{order_id}/threads
Security: Front-Bearer-Token, OAuth-2

## Security:

  - `Front-Bearer-Token` (unknown)
    http bearer JWT

  - `OAuth-2` (unknown)
    oauth2

## Path parameters:

  - `order_id` (string, required)
    Identifier of the order on which the thread is created

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

  - `files` (array)
    List of attachments for the first message of the thread

  - `thread_input` (object, required)

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

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

  - `thread_input.topic` (object, required)
    Thread topicThe topic can either have a free or a fixed value depending on the topic type

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

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

  - `thread_input.topic.type` (string, required)
    Must be FREE_TEXT
    Enum: "FREE_TEXT"

  - `thread_input.topic.type` (string, required)
    Must be REASON_CODE
    Enum: "REASON_CODE"

  - `thread_input.topic.value` (string, required)
    Code of the reason

## Request examples:

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

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

  - `message_id` (string, required)
    Id of the first message created on the thread

  - `thread_id` (string, required)
    Id of the created thread

## Response 201 examples:

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

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

