> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contactswing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Chat AI Agent

> Create web chat-based AI assistants for website integration and customer support.

### Authorizations

<ParamField header="Authorization" type="string" required>
  Enter your ContactSwing JWT Bearer token.
</ParamField>

### Request Body

<ParamField body="name" type="string" required>
  Assistant display name. Example: `"My Chat Assistant"`
</ParamField>

<ParamField body="type" type="string" required>
  Assistant type: `"CHAT"`
</ParamField>

<ParamField body="model" type="string" required>
  LLM model: `"cw-llm-1"`
</ParamField>

<ParamField body="api_keys" type="string[]">
  API key configuration `[]`
</ParamField>

<ParamField body="instructions" type="string" required>
  Detailed agent instructions and restaurant ordering guidelines
</ParamField>

<ParamField body="prompts" type="object">
  Agent prompts with `agent` and `goal` fields

  <ParamField body="agent" type="string" />

  <ParamField body="goal" type="string" />
</ParamField>

<ParamField body="kb_id" type="string">
  Knowledge base ID
</ParamField>

### Chat Customization

<ParamField body="additional_settings" type="object">
  Brand name. Example: `"ContactSwing AI"`

  <ParamField body="ChatbotCustomization" type="object">
    Brand name. Example: `"ContactSwing AI"`

    <ParamField body="brandName" type="string">
      Brand name. Example: `"ContactSwing AI"`
    </ParamField>

    <ParamField body="logoUrl" type="string">
      Logo URL
    </ParamField>

    <ParamField body="greetingText" type="string">
      Welcome message. Example: `"Hello welcome back"`
    </ParamField>

    <ParamField body="tagline" type="string">
      Tagline. Example: `"Contactswing"`
    </ParamField>

    <ParamField body="initialMessage" type="string">
      First message. Example: `"Hi, I'm Ashley 👋 Welcome to ContactSwing AI!"`
    </ParamField>

    <ParamField body="finalCloseMessage" type="string" />

    <ParamField body="checkInMessage" type="string">
      Example: `Just checking in — are you still there?`
    </ParamField>
  </ParamField>
</ParamField>

<ParamField body="action_ids" type="array">
  Linked action IDs `[]`
</ParamField>

### Response

**201 Created** - Chat assistant created successfully

<ResponseField name="ctx_id" type="string">Request context ID</ResponseField>

<ResponseField name="data" type="object">
  <ResponseField name="assistant_id" type="string">New assistant ID</ResponseField>
  <ResponseField name="name" type="string">Assistant name</ResponseField>
</ResponseField>

**400 Bad Request** - Invalid chat configuration

**401 Unauthorized** - Invalid token
