> 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

# Resource: Messages

# Type: Message Object

# Link: https://dev.wix.com/docs/api-reference/crm/communication/inbox/messages/message-object.md

## Schema:

```json
 Type: Message Object | type: Message
       - name: id  | type: string | description: Message ID.
           - name: value  | type: string | description: 
       - name: content  | type: MessageContent | description: Structured message content.
           - 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.
           - 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.
               - 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: orientation  | type: string | description: Controls whether the message is displayed in portrait or landscape layout.  Default: `PORTRAIT`.
                   - 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: 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.
               - 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: sender  | type: IdentificationData | description: ID of the message sender.  Defaults to the caller's ID 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.
           - name: contactId  | type: string | description: Contact ID. See the Contacts API for more information.
           - ONE-OF:
               - name: anonymousVisitorId  | type: string | description: Anonymous site visitor ID.
               - name: memberId  | type: string | description: Member ID. See the Members API for more information.
               - name: wixUserId  | type: string | description: ID of the Wix user.
               - name: appId  | type: string | description: App ID.
       - 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: string | description: Controls whether the badge is visible to the participant. Currently not supported in the Chat widget.
               enum: UNKNOWN_BADGE_VISIBILITY, BUSINESS_AND_PARTICIPANT, BUSINESS
       - name: targetChannels  | type: Array<ChannelType> | description: Communication channel to send the message to.  Currently messages can be sent to 1 channel only.
           enum: UNKNOWN_CHANNEL_TYPE, CHAT, EMAIL, SMS, FACEBOOK, INSTAGRAM, WHATSAPP
       - name: sourceChannel  | type: string | description: Communication channel the message is sent from.
       - name: appId  | type: string | description: ID of the app that sent the message.  Omitted if the message was sent with the Chat widget.
       - name: visibility  | type: string | description: __Required.__ Controls who can see the message.
           enum: UNKNOWN_VISIBILITY, BUSINESS_AND_PARTICIPANT, BUSINESS
       - 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: value  | type: string | description: 
       - name: direction  | type: string | description: __Required.__ Message direction.
           enum: UNKNOWN_DIRECTION, BUSINESS_TO_PARTICIPANT, PARTICIPANT_TO_BUSINESS
       - name: createdDate  | type: string | description: Date and time the message was sent.
           - name: seconds  | type: string | description: 
           - name: nanos  | type: number | description: 
       - name: targetChannelIds  | type: Array<string> | description: Target channel IDs to send the message to.
       - name: sourceChannelId  | type: string | description: The channel ID 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.

```