# OR42 - Post a message on an order (deprecated)

Deprecated endpointThis API will be removed in a future version. Use OR43 and M12 instead.
DescriptionCustomer will be created if it does not exist. Otherwise, every field will be updated (optional fields will be updated only if present). Maximum of 1000 messages on a thread
Call FrequencyRecommended usage: At each new message posted on an orderMaximum usage: At each new message posted on an orderRead MoreMore context (message integration)More context (message attachment)More context (sellers)

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

## Security:

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

  - `OAuth-2` (unknown)
    oauth2

## Path parameters:

  - `order_id` (string, required)
    Order identifier

## Request fields (application/json):

  - `body` (string, required)
    Body of the message

  - `customer_email` (string, required)
    Email of the customer who sent the message. Required only if the customer sent the message. Otherwise, do not define.

  - `customer_firstname` (string, required)
    First name of the customer who sent the message. Required only if the customer sent the message. Otherwise, do not define.

  - `customer_id` (string, required)
    Id of the customer who sent the message. Required only if the customer sent the message. Otherwise, do not define.

  - `customer_lastname` (string, required)
    Last name of the customer who sent the message. Required only if the customer sent the message. Otherwise, do not define.

  - `customer_locale` (string)
    Locale of the customer who sent the message

  - `document_ids` (array)
    Message's attachments. List of document ids already linked to the order. Use OR74 to upload new documents and OR72 to retrieve their ids. NB: If one of those document_id have already been linked to a previous message, it will be ignored.

  - `subject` (string, required)
    Subject of the message

  - `to_customer` (boolean, required)
    Boolean to indicate the message will be sent to the customer associated with the order.

  - `to_operator` (boolean, required)
    Boolean to indicate the message will be sent to the operator.

  - `to_shop` (boolean, required)
    Boolean to indicate the message will be sent to the shop associated with the order

## Request examples:

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

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

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

  - `id` (integer, required)
    Identifier of the message created

## Response 201 examples:

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

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

