POST

Send Message


Developer Preview

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

Sends a user message in a conversation.

The user message is saved with DONE status, and an assistant message with WORKING status is opened in reply. The assistant message's inReplyToId is the ID of the returned user message. The API doesn't push updates, so to track the assistant's response, poll Query Messages until the assistant message's status changes to DONE or ERROR.

An idempotencyKey is required. Use a unique key for each user message. The key doesn't prevent duplicates: each call creates a new user message, even if the key was used before.

To answer a QUESTIONNAIRE message from the assistant, set type to QUESTIONNAIRE_RESPONSE and specify the answers in questionnaireResponsePayload. For TEXT messages, parts is required.

You can't send a message in an archived conversation. The call fails with CONVERSATION_ARCHIVED.

Endpoint
POST
https://www.wixapis.com/containers/chat/v1/conversations/{conversationId}/messages

Errors

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

Did this help?