---
title: "New Thread Message Webhook"
source_url: https://docs.rapyd.net/en/new-thread-message-webhook.html
lang: en
---

# New Thread Message Webhook

The **NEW_COMMUNICATION_THREAD_MESSAGE** webhook is sent when a new communication thread message is created.

> **Note:**
>
> The endpoint for webhooks is unique for each client. To set up a webhook endpoint, see [Defining a Webhook Endpoint](https://docs.rapyd.net/en/defining-a-webhook-endpoint.md "Defining a Webhook Endpoint").

### Parameters

### Webhook Header Parameters

- - Content-Type (string)
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt (string)
  - Random string.
- - signature (string)
  - Signature calculated for each webhook individually.

    See [Webhook Authentication](https://docs.rapyd.net/en/webhook-authentication.md "Webhook Authentication").
- - timestamp (string)
  - Timestamp for the webhook, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Webhook Root Parameters

- - created_at (string)
  - Time that the webhook was created, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").

    > **Note:**
    >
    > Inside the `data` object, some webhooks have another `created_at` field that refers to a different event.
- - data (object)
  - Contains the actual data of the webhook.

    For details, see below.
- - extended_timestamp (string)
  - Time in milliseconds that the webhook was created, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - id (string)
  - ID of the webhook. String starting with **wh_**.
- - status (string)
  - Status of the webhook. One of the following:

    - **NEW**
    - **CLO** - Closed.
    - **ERR** - Error.
    - **RET** - Re-sent.

    > **Note:**
    >
    > Inside the `data` object, some webhooks have another `status` field that refers to a different event.
- - trigger_operation_id (string)
  - ID of the operation that triggered the webhook. UUID.
- - type (string)
  - Name of the webhook type.

    > **Note:**
    >
    > The name in the Client Portal is different.

### Webhook Data Parameters

- attachments (array)
- An array of objects where each object includes the following parameters:

  - file_id (string)
  - The identifier of the attachment to download. Obtain it from the attachments array of a message. See also response in Get Case Communication Thread.

  - file_name (string)
  - The name of the file.

- comm_token (string)
- Unique token for message. String starting with **msg_**.

- content (string)
- The contents of the message.

- content_structured (object)
- Includes the ops array, which provides formatting information on the content.

  - ops (object)
  - A single content-formatting operation.

    - insert (string)
    - The inserted text portion of the content. Note: **/n** indicates a line break.

    - attributes (object)
    - Boolean formatting parameters of the inserted text. The following are common attributes. See also the [Quill library formats](https://quilljs.com/docs/formats/).

      - bold (boolean)
      - When the value is true, the inserted text is formatted in bold.

      - italic (boolean)
      - When the value is true, the inserted text is formatted in italic.

      - underline (boolean)
      - When the value is true, the inserted text is underlined.

- created_at (string)
- The Unix Epoch time when the message was created.

- message_direction (string)
- The direction of the message. Values include:

  - **incoming:** A message that was received.

  - **outgoing:** A message that was sent.

- thread_token (string)
- Unique token for communication thread. String starting with **comm_** . See also the `thread_token` in the response of [Get All Case Communication Threads](https://docs.rapyd.net/en/get-all-case-communication-threads.md "Get All Case Communication Threads").

- updated_at (string)
- The Unix Epoch time when the message was updated.

- NEW_COMMUNICATION_THREAD_MESSAGE Webhook
- ```json
  {
      "id": "wh_5269f1d15081030dd19b82f54940a366",
      "type": "NEW_COMMUNICATION_THREAD_MESSAGE",
      "data": [
          {
              "comm_token": "comm_5eda2b2651d2a9bda22845aff027ca53",
              "token": "msg_3d4b331700e246a5556fb21f1f9e2c89",
              "content": "Please answer with file attached\n",
              "content_structured": {
                  "ops": [
                      {
                          "insert": "Please answer with file attached",
                          "attributes": {
                              "underline": true
                          }
                      },
                      {
                          "insert": "\n"
                      }
                  ]
              },
              "message_direction": "incoming",
              "attachments": [],
              "created_at": 1752486128,
              "updated_at": 1752486128
          }
      ],
      "trigger_operation_id": "0f92dc27-4e36-437e-8c75-7fe7b018eee4",
      "status": "NEW",
      "created_at": 1752486128
  }
  ```
