> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CreateChatSettings

# Package: forms

# Namespace: ChatSettingsService

# Method link: https://dev.wix.com/docs/api-reference/crm/forms/chat-settings/create-chat-settings.md

## Permission Scopes:
Manage forms: SCOPE.FORMS.EDIT-FORM

## Introduction

Creates a chat settings entity.

The settings specified in a chat settings entity apply to the form with the same ID as the chat settings entity. Each form can have exactly one set of chat settings.

---

## REST API

### Schema

```
 Method: createChatSettings
 Description: Creates a chat settings entity.  The settings specified in a chat settings entity apply to the form with the same GUID as the chat settings entity. Each form can have exactly one set of chat settings.
 URL: https://www.wixapis.com/forms/ai/v1/chat-settings
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  chatSettings, chatSettings.id
 Method parameters: 
   param name: chatSettings | type: ChatSettings   | required: true 
        - name: id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID. | required: true | read-only: true | validation: format GUID
        - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat.  | validation: maxLength 50
        - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form.  Default: `true`  
        - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message.  | validation: maxLength 255
        - name: extendedFields | type: ExtendedFields | description: Extended fields.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI.  Default: `false`  
        - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses.  
             - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT
 Return type: CreateChatSettingsResponse
  - name: chatSettings | type: ChatSettings | description: Created chat settings.  
     - name: id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID.  | read-only: true | validation: format GUID
     - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat.  | validation: maxLength 50
     - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form.  Default: `true`  
     - name: revision | type: string | description: Revision number, which increments by 1 each time the chat settings are updated. To prevent conflicting changes, the current revision must be passed when updating the chat settings.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the chat settings were created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the chat settings were last updated.  | read-only: true | validation: format date-time
     - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message.  | validation: maxLength 255
     - name: extendedFields | type: ExtendedFields | description: Extended fields.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI.  Default: `false`  
     - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses.  
         - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT


```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.forms.chatSettings.createChatSettings(chatSettings)
 Description: Creates a chat settings entity.  The settings specified in a chat settings entity apply to the form with the same GUID as the chat settings entity. Each form can have exactly one set of chat settings.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  chatSettings, chatSettings._id
 Method parameters: 
   param name: chatSettings | type: ChatSettings   | required: true 
        - name: _id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID. | required: true | read-only: true | validation: format GUID
        - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat.  | validation: maxLength 50
        - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form.  Default: `true`  
        - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message.  | validation: maxLength 255
        - name: extendedFields | type: ExtendedFields | description: Extended fields.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI.  Default: `false`  
        - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses.  
             - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT
 Return type: PROMISE<ChatSettings>
  - name: _id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID.  | read-only: true | validation: format GUID
  - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat.  | validation: maxLength 50
  - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form.  Default: `true`  
  - name: revision | type: string | description: Revision number, which increments by 1 each time the chat settings are updated. To prevent conflicting changes, the current revision must be passed when updating the chat settings.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the chat settings were created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the chat settings were last updated.  | read-only: true 
  - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message.  | validation: maxLength 255
  - name: extendedFields | type: ExtendedFields | description: Extended fields.  
     - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI.  Default: `false`  
  - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses.  
     - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT


```

### Examples

### createChatSettings
```javascript
import { chatSettings } from '@wix/forms';

async function createChatSettings(chatSettings) {
  const response = await chatSettings.createChatSettings(chatSettings);
};
```

### createChatSettings (with elevated permissions)
```javascript
import { chatSettings } from '@wix/forms';
import { auth } from '@wix/essentials';

async function myCreateChatSettingsMethod(chatSettings) {
  const elevatedCreateChatSettings = auth.elevate(chatSettings.createChatSettings);
  const response = await elevatedCreateChatSettings(chatSettings);
}
```

### createChatSettings (self-managed)
Self-managed 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 { chatSettings } from '@wix/forms';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { chatSettings },
  // Include the auth strategy and host as relevant
});


async function createChatSettings(chatSettings) {
  const response = await myWixClient.chatSettings.createChatSettings(chatSettings);
};
```

---