> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Package: inbox

# Namespace: messages

# Webhook link: https://dev.wix.com/docs/api-reference/crm/communication/inbox/messages/message-sent-to-participant.md

# Webhook Permissions Scopes IDs:
Read Inbox Messages: SCOPE.DC-INBOX.READ-MSGS

## Introduction

Triggered when the business
sends a message to a visitor, contact, or member.

---

## REST API

### Schema

```
Webhook: Message Sent To Participant
Description: Triggered when the business sends a message to a visitor, contact, or member.
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
 - name: actionEvent | type: object | description: Custom action event details.
    - name: body | type: MessageSentToParticipant | description: The event body.
        - name: conversationId | type: string | description: Conversation GUID.
        - name: message | type: Message | description: Sent message.
           - name: id | type: string | description: Message GUID.
           - name: content | type: MessageContent | description: Structured message content.
              - ONE-OF:
                 - name: basic | type: BasicMessagePayload | description: Plain text, file, or image message.
                    - name: items | type: array<BasicMessageData> | description: List of plain text messages, images, and/or files. List items are displayed as separate messages in Inbox and the site's chat widget.
                       - ONE-OF:
                          - name: text | type: string | description: Text message.
                          - name: image | type: ImageMessage | description: Image message. Can contain an image from Wix Media or from an external provider.
                             - name: id | type: string | description: Wix Media GUID.
                             - name: url | type: string | description: URL where the image is hosted. This URL is valid for 10 hours from the time the message is sent.
                             - name: filename | type: string | description: File name of the original file.
                             - name: width | type: integer | description: Original image width, in pixels.
                             - name: height | type: integer | description: Original image height, in pixels.
                             - name: urlExpiration | type: string | description: Expiration date and time of the URL in `YYYY-MM-DDThh:mm:ss.sssZ` format.
                          - name: file | type: FileMessage | description: File attachment. Can contain a file from Wix Media or an external provider.
                             - name: id | type: string | description: Wix Media GUID.
                             - name: url | type: string | description: URL where the image is hosted. This URL is valid for 10 hours from the time the message is sent.
                             - name: filename | type: string | description: File name of the original file.
                             - name: mimeType | type: string | description: File [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
                             - name: urlExpiration | type: string | description: Expiration date and time of the URL in `YYYY-MM-DDThh:mm:ss.sssZ` format.
                 - name: template | type: TemplateMessagePayload | description: Template containing an image, title, text, and/or up to 10 call-to-action buttons.
                    - name: title | type: string | description: Title displayed in the message.
                    - name: buttons | type: array<Button> | description: List of buttons to display with the message. Buttons can either open a URL or pass interaction details to the Button Interacted event.  Maximum: 10 buttons.
                       - name: label | type: string | description: Button label text.
                       - name: launchUrl | type: string | description: If included, the button launches the specified URL.
                       - name: postbackProperties | type: PostbackProperties | description: Properties to pass to the Button Interacted event when the button is clicked.
                          - name: appId | type: string | description: App GUID.
                          - name: interactionId | type: string | description: GUID you define for the interaction, to be handled by your server.
                    - name: orientation | type: Orientation | description: Controls whether the message is displayed in portrait or landscape layout.  Default: `PORTRAIT`.
                           - enum:
                           -     UNKNOWN_ORIENTATION: Unknown orientation.
                           -     PORTRAIT: Portrait layout.
                           -     LANDSCAPE: Landscape layout.
                    - name: textLines | type: array<string> | description: List of lines of text. Each item in the array is displayed on a new line.  Max: 10 lines (up to 512 characters per line).
                    - name: imageUrl | type: string | description: URL where the icon is hosted.
                 - name: minimal | type: MinimalMessagePayload | description: Minimal message containing a single line of text and an optional icon. Often reports an activity that took place.
                    - name: text | type: string | description: Message text.
                    - name: iconUrl | type: string | description: URL where the icon is hosted.
                    - name: url | type: string | description: If included, URL the user is redirected to when clicking the message.
                 - name: form | type: FormMessagePayload | description: Message containing submitted form data. Typically sent with a `direction` of `PARTICIPANT_TO_BUSINESS` and message `visibility` of `BUSINESS`.
                    - name: title | type: string | description: Form title displayed in the message.
                    - name: description | type: string | description: Form description displayed below the title.
                    - name: fields | type: array<FormField> | description: List of form fields and values.
                       - name: name | type: string | description: Form field display name.
                       - name: value | type: string | description: Submitted value.
                    - name: media | type: array<MediaItem> | description: List of files and/or images attached to the form.  List items are displayed as separate messages in Inbox and the site's chat widget.
                       - ONE-OF:
                          - name: image | type: ImageMessage | description: Image message. Can contain an image from Wix Media or from an external provider.
                          - name: file | type: FileMessage | description: File attachment. Can contain a file from Wix Media or an external provider.
                 - name: system | type: SystemMessagePayload | description: System message. For internal use.
                    - name: text | type: string | description: Text message. `\n` renders as a line break.
                    - name: buttons | type: array<Button> | description: List of buttons to display with the message. Buttons can either open a URL or pass interaction details to the Button Interacted event.  Maximum: 10 buttons.
                    - name: imageUrl | type: string | description: URL where the icon is hosted.
              - name: previewText | type: string | description: Summary of message contents. Displayed in Inbox in the [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).
              - name: title | type: string | description: Message title.
           - name: sender | type: IdentificationData | description: GUID of the message sender.  Defaults to the caller's GUID using the property that matches their identity type. For 3rd-party apps, defaults to using the app's `appId`.  You can override the default behavior when calling the Send Message method by using the `sendAs` parameter.
              - ONE-OF:
                 - name: anonymousVisitorId | type: string | description: Anonymous site visitor GUID.
                 - name: memberId | type: string | description: Member GUID. See the Members API for more information.
                 - name: wixUserId | type: string | description: GUID of the Wix user.
                 - name: appId | type: string | description: App GUID.
              - name: contactId | type: string | description: Contact GUID. See the Contacts API for more information.
           - name: badges | type: array<Badge> | description: Optional icon and short text providing additional details about the message, such as the app from which the message was sent, or whether the message was an automated response.  Currently only 1 badge is supported.
              - name: text | type: string | description: Display text.
              - name: iconUrl | type: string | description: URL where the icon is hosted.
              - name: badgeVisibility | type: BadgeVisibility | description: Controls whether the badge is visible to the participant. Currently not supported in the Chat widget.
                   - enum:
                   -     UNKNOWN_BADGE_VISIBILITY: Unkown visibility.
                   -     BUSINESS_AND_PARTICIPANT: Visible to the participant and site collaborators.
                   -     BUSINESS: Visible to site collaborators only.
           - name: appId | type: string | description: GUID of the app that sent the message.  Omitted if the message was sent with the Chat widget.
           - name: visibility | type: MessageVisibility | description: __Required.__ Controls who can see the message.
               - enum:
               -     UNKNOWN_VISIBILITY: Unknown message visibility.
               -     BUSINESS_AND_PARTICIPANT: Visible to the participant and site collaborators.
               -     BUSINESS: Visible to site collaborators only.
           - name: sequence | type: string | description: Sequential ordering of the message.  Ensures more accurate sorting than `createdDate` if two messages are sent at the same time.
           - name: direction | type: MessageDirection | description: __Required.__ Message direction.
               - enum:
               -     UNKNOWN_DIRECTION: Unknown message direction.
               -     BUSINESS_TO_PARTICIPANT: The message was sent from the business to the participant.
               -     PARTICIPANT_TO_BUSINESS: The message was sent from the participant to the business.
           - name: createdDate | type: string | description: Date and time the message was sent.
           - name: targetChannelIds | type: array<string> | description: Target channel GUIDs to send the message to.
           - name: sourceChannelId | type: string | description: The channel GUID from which the message was sent.
           - name: silent | type: boolean | description: Controls whether the unread count and conversation summary are updated in the [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).  If `true`, unread count and conversation summary are not updated.  Default: `false`
           - name: edited | type: boolean | description: Whether the message was edited on the channel it came from.
           - name: editedDate | type: string | description: Date and time the message was last edited on the channel it came from. Omitted if it was never edited.

```

### Examples


```curl
{
  "id": "3bd83c4f-0456-4180-bf06-f8103e88362e",
  "entityFqdn": "wix.crm.inbox.v2.message",
  "slug": "message_sent_to_participant",
  "entityId": "1640771623903770",
  "actionEvent": {
    "body": {
      "conversationId": "5f65164f-b373-3cb9-be2e-f1fdc00c86a9",
      "message": {
        "targetChannels": [],
        "direction": "BUSINESS_TO_PARTICIPANT",
        "id": "1640771623903770",
        "sequence": "1640771623903770",
        "content": {
          "previewText": "Thanks for booking your spa day with us!",
          "basic": {
            "items": [
              {
                "image": {
                  "url": "https://static.wixstatic.com/media/f93e3d633e79921f14330f1911fc1139.jpg/v1/fill/w_1200,h_798,al_c,q_85,usm_0.66_1.00_0.01/f93e3d633e79921f14330f1911fc1139.webp",
                  "width": 1200.0,
                  "height": 798.0
                }
              },
              {
                "text": "Thanks for booking your spa day with us!"
              },
              {
                "text": "We've emailed your invoice. You'll find everything you need to know there."
              }
            ]
          }
        },
        "sender": {
          "wixUserId": "72751428-2743-4bda-acf5-4218a4279cd3"
        },
        "appId": "a0c38670-6845-41e0-8f41-85a6054ccd98",
        "visibility": "BUSINESS_AND_PARTICIPANT",
        "sourceChannel": "UNKNOWN_CHANNEL_TYPE",
        "badges": [],
        "createdDate": "2021-12-29T09:53:43.903Z"
      }
    }
  },
  "eventTime": "2021-12-29T09:53:44.025614Z",
  "triggeredByAnonymizeRequest": false
}
```

---