> 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 # ListMessages # Package: inbox # Namespace: MessagesService # Method link: https://dev.wix.com/docs/api-reference/crm/communication/inbox/messages/list-messages.md ## Permission Scopes: Read Inbox Messages: SCOPE.DC-INBOX.READ-MSGS ## Introduction Retrieves messages between the business and participant. Up to 30 messages are returned per request. If the number of messages in a conversation is larger than 30, `pagingMetadata.cursors` is returned in the response, indicating that another page of results is available. To retrieve the next page of messages, specify the `next` cursor value in the next request's `paging.cursor` parameter. To ensure you'll always retrieve the next record, use the same visibility and sorting in the first request and all subsequent requests. By default, 30 messages are retrieved and sorted by `sequence` in descending order (the most recent messages are first in the list). --- ## REST API ### Schema ``` Method: listMessages Description: Retrieves messages between the business and participant. Up to 30 messages are returned per request. If the number of messages in a conversation is larger than 30, `pagingMetadata.cursors` is returned in the response, indicating that another page of results is available. To retrieve the next page of messages, specify the `next` cursor value in the next request's `paging.cursor` parameter. To ensure you'll always retrieve the next record, use the same visibility and sorting in the first request and all subsequent requests. By default, 30 messages are retrieved and sorted by `sequence` in descending order (the most recent messages are first in the list). URL: https://www.wixapis.com/inbox/v2/messages Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: conversationId Method parameters: query param name: conversationId | type: conversationId | description: GUID of the conversation that contains the intended messages. | required: true param name: paging | type: CursorPaging - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. param name: sorting | type: Sorting - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC param name: visibility | type: MessageVisibility - enum: UNKNOWN_VISIBILITY - Unknown message visibility. BUSINESS_AND_PARTICIPANT - Visible to the participant and site collaborators. BUSINESS - Visible to site collaborators only. Return type: ListMessagesResponse - name: messages | type: array | description: List of messages between the specified visitor and the site. - 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 | 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