POST

Get Or Create Conversation


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 a conversation for the specified visitor, contact, or member ID, or creates one if it doesn't exist.

Authentication

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

Permissions
Manage Inbox Messages
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/inbox/v2/conversations

Body Params
participantIdParticipantId

ID of the visitor, contact, or member chatting with the business.

Required for 3rd-party apps.

Response Object
conversationConversation

Created or retrieved conversation.


newConversationboolean

Indicates whether the conversation was just created.

If true, the conversation was just created. If false, the conversation already existed.

Get Or Create Conversation Example 1
Request
cURL
curl -X POST \ 'https://www.wixapis.com/inbox/v2/conversations' \ -H 'Authorization: <AUTH>' \ -d '{ "participantId": { "anonymousVisitorId": "40096143-3643-4cc1-8329-30a7fc2c595e" } }'
Response
JSON
{ "conversation": { "id": "6202c3bb-f263-3c16-8c90-d6387d9ed420", "participant": { "anonymousVisitorId": "40096143-3643-4cc1-8329-30a7fc2c595e" }, "channels": ["CHAT"], "businessDisplayData": { "name": "cherry-productions" } }, "newConversation": true }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?