listMessages( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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, pass 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).

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Inbox Messages
Read Inbox Messages
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
conversationIdstringRequired

ID of the conversation that contains the intended messages.


visibilityMessageVisibilityRequired

Required. Filters for messages with the specified visibility setting.

  • "BUSINESS_AND_PARTICIPANT": Return messages visible to the business and the participant.
  • "BUSINESS": Return all messages.

optionsListMessagesOptions

Additional options for listing messages.

Returns
Return Type:Promise<ListMessagesResponse>
Did this help?