> 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`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # BulkGetByInboxMessages # Package: aiSiteChat # Namespace: Messages # Method link: https://dev.wix.com/docs/api-reference/business-management/ai-site-chat/messages/bulk-get-by-inbox-messages.md ## Permission Scopes: Innovation Lab Administrator: SCOPE.INNOVATION_LAB.ADMIN ## Introduction Retrieves messages by inbox conversation ID. Up to 100 Messages can be returned per request. --- ## REST API ### Schema ``` Method: bulkGetByInboxMessages Description: Retrieves messages by inbox conversation GUID. Up to 100 Messages can be returned per request. URL: https://www.wixapis.com/v1/messages/get-by-inbox Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: inboxConversationId Method parameters: query param name: inboxConversationId | type: inboxConversationId | description: conversationId of the conversation in inbox. Can be found in [Message.conversationId](https://dev.wix.com/docs/api-reference/crm/communication/inbox/messages/message-object.md) | required: true query param name: inboxMessageSequences | type: array | description: List of message sequences in the inbox conversation to retrieve messages for. Can be found in [Message.sequence](https://dev.wix.com/docs/api-reference/crm/communication/inbox/messages/message-object.md) Return type: BulkGetByInboxMessagesResponse - name: results | type: array | description: - name: itemMetadata | type: ItemMetadata | description: - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: message | type: Message | description: Message object if found, otherwise empty. - name: id | type: string | description: Message GUID. - name: createdDate | type: string | description: Date and time the message was created. - name: sender | type: Sender | description: Message sender type. - enum: - ASSISTANT: AI assistant. - USER: Wix user. For example, a site admin. - SYSTEM: Message was sent automatically due to widget settings. For example, a contact form. - SITE_VISITOR: Site visitor. - name: conversationId | type: string | description: Conversation GUID. - name: answerTo | type: string | description: GUID of the message that this message is answering. - name: messageType | type: MessageType | description: Message type. - enum: - QUESTION: Question. - ANSWER: Answer. - INTRO: Intro message, as defined in the widget settings. - LEGAL: Legal disclaimer, as defined in the widget settings. - CONTACT_FORM: Contact form. - CONTACT_FORM_SUBMITTED: Message confirms that a contact form was successfully submitted. - SITE_OWNER_NOTIFICATION: Notification for the site owner. - OFFLINE: Message informing the site visitor that the AI assistant is offline, as defined in the widget settings. - OUT_OF_QUOTA: Message that informs the Wix user that they have reached the maximum number of messages on their current plan. - USER_ANSWER: User answer. - SITE_NAVIGATION: Site visitor site Navigation information. - NAVIGATION_ANSWER: Site visitor site Navigation information answer. - IGNORED_ANSWER: AI Site Chat ignored the question. - VISITOR_OPTION_SELECTED: Site visitor selected an option from Message.visitor_options. - ADD_TO_CART: Site visitor added a product to the cart. - BOOK_SERVICE: Site visitor booked a service. - GENERATED_QUESTION: AI assistant generated a question for the user to try. - SUGGESTED_QUESTION: Suggested question, as defined in the widget settings. - USER_QUESTION: Wix user question for testing and training. - USER_QUESTION_ANSWER: Wix assistant answer for testing and training. - WIX_USER_MEDIA: Media uploaded by Wix user for visitor. - MEDIA: Media uploaded by visitor for Wix user. - WIX_USER_CARD: Card template sent by the Wix User. - WIX_USER_MINIMAL_BODY: Simple template sent by the Wix User. - WIX_USER_FORM: Form sent by the Wix User. - WIX_SYSTEM: System message from comm channels. - name: body | type: Body | description: Message body. - name: mainText | type: string | description: Main text of the message. - name: footerText | type: string | description: Footer text of the message. - name: additionalData | type: array | description: Additional data for the message. - name: inboxId | type: string | description: Message Id in the Inbox - name: visitorOptions | type: array | description: Options site visitor can choose from. - name: assistantActions | type: array | description: List of actions that ai assistant executed on the site visitor's behalf. - name: visitorOptionsFields | type: array | description: List of detailed options the visitor can choose from. - name: engineStatus | type: string | description: Exact status message returned by ai site chat engine, - name: bulkActionMetadata | type: BulkActionMetadata | description: If message was not found, still counts as success. Failure to retrieve a message will result in a failure count. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.aiSiteChat.Messages.bulkGetByInboxMessages(inboxConversationId, options) Description: Retrieves messages by inbox conversation GUID. Up to 100 Messages can be returned per request. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: inboxConversationId Method parameters: param name: inboxConversationId | type: string | description: conversationId of the conversation in inbox. Can be found in [Message.conversationId](https://dev.wix.com/docs/api-reference/crm/communication/inbox/messages/message-object.md) | required: true param name: options | type: BulkGetByInboxMessagesOptions none - name: inboxMessageSequences | type: array | description: List of message sequences in the inbox conversation to retrieve messages for. Can be found in [Message.sequence](https://dev.wix.com/docs/api-reference/crm/communication/inbox/messages/message-object.md) Return type: PROMISE - name: results | type: array | description: - name: itemMetadata | type: ItemMetadata | description: - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: message | type: Message | description: Message object if found, otherwise empty. - name: _id | type: string | description: Message GUID. - name: _createdDate | type: Date | description: Date and time the message was created. - name: sender | type: Sender | description: Message sender type. - enum: - ASSISTANT: AI assistant. - USER: Wix user. For example, a site admin. - SYSTEM: Message was sent automatically due to widget settings. For example, a contact form. - SITE_VISITOR: Site visitor. - name: conversationId | type: string | description: Conversation GUID. - name: answerTo | type: string | description: GUID of the message that this message is answering. - name: messageType | type: MessageType | description: Message type. - enum: - QUESTION: Question. - ANSWER: Answer. - INTRO: Intro message, as defined in the widget settings. - LEGAL: Legal disclaimer, as defined in the widget settings. - CONTACT_FORM: Contact form. - CONTACT_FORM_SUBMITTED: Message confirms that a contact form was successfully submitted. - SITE_OWNER_NOTIFICATION: Notification for the site owner. - OFFLINE: Message informing the site visitor that the AI assistant is offline, as defined in the widget settings. - OUT_OF_QUOTA: Message that informs the Wix user that they have reached the maximum number of messages on their current plan. - USER_ANSWER: User answer. - SITE_NAVIGATION: Site visitor site Navigation information. - NAVIGATION_ANSWER: Site visitor site Navigation information answer. - IGNORED_ANSWER: AI Site Chat ignored the question. - VISITOR_OPTION_SELECTED: Site visitor selected an option from Message.visitor_options. - ADD_TO_CART: Site visitor added a product to the cart. - BOOK_SERVICE: Site visitor booked a service. - GENERATED_QUESTION: AI assistant generated a question for the user to try. - SUGGESTED_QUESTION: Suggested question, as defined in the widget settings. - USER_QUESTION: Wix user question for testing and training. - USER_QUESTION_ANSWER: Wix assistant answer for testing and training. - WIX_USER_MEDIA: Media uploaded by Wix user for visitor. - MEDIA: Media uploaded by visitor for Wix user. - WIX_USER_CARD: Card template sent by the Wix User. - WIX_USER_MINIMAL_BODY: Simple template sent by the Wix User. - WIX_USER_FORM: Form sent by the Wix User. - WIX_SYSTEM: System message from comm channels. - name: body | type: Body | description: Message body. - name: mainText | type: string | description: Main text of the message. - name: footerText | type: string | description: Footer text of the message. - name: additionalData | type: array | description: Additional data for the message. - name: inboxId | type: string | description: Message Id in the Inbox - name: visitorOptions | type: array | description: Options site visitor can choose from. - name: assistantActions | type: array | description: List of actions that ai assistant executed on the site visitor's behalf. - name: visitorOptionsFields | type: array | description: List of detailed options the visitor can choose from. - name: engineStatus | type: string | description: Exact status message returned by ai site chat engine, - name: bulkActionMetadata | type: BulkActionMetadata | description: If message was not found, still counts as success. Failure to retrieve a message will result in a failure count. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### bulkGetByInboxMessages ```javascript import { messages } from '@wix/ai-site-chat'; async function bulkGetByInboxMessages(inboxConversationId,options) { const response = await messages.bulkGetByInboxMessages(inboxConversationId,options); }; ``` ### bulkGetByInboxMessages (with elevated permissions) ```javascript import { messages } from '@wix/ai-site-chat'; import { auth } from '@wix/essentials'; async function myBulkGetByInboxMessagesMethod(inboxConversationId,options) { const elevatedBulkGetByInboxMessages = auth.elevate(messages.bulkGetByInboxMessages); const response = await elevatedBulkGetByInboxMessages(inboxConversationId,options); } ``` ### bulkGetByInboxMessages (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { messages } from '@wix/ai-site-chat'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { messages }, // Include the auth strategy and host as relevant }); async function bulkGetByInboxMessages(inboxConversationId,options) { const response = await myWixClient.messages.bulkGetByInboxMessages(inboxConversationId,options); }; ``` ---