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

# Update widget settings

> Look, welcome messages, suggested questions and widget features. Only the fields you send change. Embedding (isPublic, allowedDomains) is on PATCH /v1/agents/{agentId}.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/agents/{agentId}/chat-interface
openapi: 3.0.0
info:
  title: Totebot Public API
  description: >-
    Manage your agents (settings, instructions, widget, skills, actions, MCP
    connections, integrations), their knowledge, test questions, the help desk,
    customers and your team from code, read conversations and analytics, and
    analyse which knowledge each answer used.


    Authenticate with a Bearer token: a team API key (`tb_live_…`, created by a
    team owner in Team settings → API keys) or a legacy per-agent key.

    New keys can only read. Write access is opt-in per area (`agents:write`,
    `plugins:write`, `knowledge:write`, `conversations:write`, `helpdesk:write`,
    `team:write`, `members:write`, `chat:write`, `customers:delete`,
    `quality:write`, `experiments:write`, `sales:write`). Provider cost in USD
    needs the opt-in `billing:read` scope. A key may also be limited to some
    agents.

    Routes that act on one agent take it from the `agentId` path parameter or,
    on the older `/v1/<resource>` routes, from the `X-Agent-Id` header.

    Write routes accept an `Idempotency-Key` header. Over the rate limit you get
    429 with `Retry-After`. Errors share one shape: `{ status: "error", error: {
    code, message, details } }`.

    Not available through the API, on purpose: billing and plan changes,
    deleting the team, creating or changing API keys, and OAuth connect flows.


    This spec is public at https://api.totebot.ai/v1/openapi.json (and .yaml).
  version: '2.0'
  contact: {}
servers:
  - url: https://api.totebot.ai
security: []
tags: []
paths:
  /v1/agents/{agentId}/chat-interface:
    patch:
      tags:
        - Agent configuration
      summary: Update widget settings
      description: >-
        Look, welcome messages, suggested questions and widget features. Only
        the fields you send change. Embedding (isPublic, allowedDomains) is on
        PATCH /v1/agents/{agentId}.
      operationId: PublicApiAgentConfigController_updateChatInterface
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Any unique string (e.g. a UUID). Retrying with the same key within
            24 hours replays the first response instead of repeating the change.
          required: false
          schema:
            type: string
        - name: agentId
          required: true
          in: path
          schema: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChatInterfaceDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatInterfaceDto'
        '400':
          description: Invalid request, or rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '401':
          description: Missing, invalid, revoked or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '403':
          description: >-
            The plan lacks the feature, or the key lacks a scope
            (`error.details.missingScopes`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '404':
          description: Not found, or not an agent this key can access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '409':
          description: >-
            The same Idempotency-Key is still in progress, or the resource
            conflicts (e.g. the link already exists, or the source is being
            trained).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
        '422':
          description: Idempotency-Key reused with a different request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
      security:
        - api-key: []
components:
  schemas:
    UpdateChatInterfaceDto:
      type: object
      properties:
        displayName:
          type: string
          maxLength: 100
          description: Name shown in the widget header.
        theme:
          allOf:
            - $ref: '#/components/schemas/AgentChatInterfaceTheme'
        headerColor:
          type: string
          example: '#FFFFFF'
        userMessageColor:
          type: string
          example: '#000000'
        userMessageFontColor:
          type: string
          example: '#FFFFFF'
        assistantMessageColor:
          type: string
          example: '#F3F4F6'
        assistantMessageFontColor:
          type: string
          example: '#111827'
        chatBubbleButtonColor:
          type: string
          example: '#000000'
        chatIconButtonColor:
          type: string
          example: '#FFFFFF'
        chatBubbleAlignment:
          allOf:
            - $ref: '#/components/schemas/ChatBubbleAlignment'
        chatBubbleDelay:
          type: number
          minimum: 0
          maximum: 600
          description: Seconds before the bubble appears.
        initialMessages:
          maxItems: 10
          description: Welcome messages, one per entry.
          example:
            - Hi! How can I help?
          type: array
          items:
            type: string
        initialMessagesDelay:
          type: number
          minimum: 0
          maximum: 600
          description: Seconds before welcome messages pop up.
        suggestedMessages:
          maxItems: 10
          description: Suggested questions shown as buttons.
          example:
            - Where is my order?
          type: array
          items:
            type: string
        suggestedMessagesLabel:
          type: string
          maxLength: 100
        messagePlaceholder:
          type: string
          maxLength: 200
        feedbackEnabled:
          type: boolean
        copyEnabled:
          type: boolean
        attachmentsEnabled:
          type: boolean
        voiceInputEnabled:
          type: boolean
        showStatusIndicator:
          type: boolean
        statusLabel:
          type: string
          maxLength: 50
    ChatInterfaceDto:
      type: object
      properties:
        displayName:
          type: string
          nullable: true
        theme:
          allOf:
            - $ref: '#/components/schemas/AgentChatInterfaceTheme'
        headerColor:
          type: string
        userMessageColor:
          type: string
        userMessageFontColor:
          type: string
        assistantMessageColor:
          type: string
        assistantMessageFontColor:
          type: string
        chatBubbleButtonColor:
          type: string
        chatIconButtonColor:
          type: string
          nullable: true
        chatBubbleAlignment:
          allOf:
            - $ref: '#/components/schemas/ChatBubbleAlignment'
        chatBubbleDelay:
          type: number
        initialMessages:
          type: array
          items:
            type: string
        initialMessagesDelay:
          type: number
        suggestedMessages:
          type: array
          items:
            type: string
        suggestedMessagesLabel:
          type: string
          nullable: true
        messagePlaceholder:
          type: string
        feedbackEnabled:
          type: boolean
        copyEnabled:
          type: boolean
        attachmentsEnabled:
          type: boolean
        voiceInputEnabled:
          type: boolean
        showStatusIndicator:
          type: boolean
        statusLabel:
          type: string
      required:
        - displayName
        - theme
        - headerColor
        - userMessageColor
        - userMessageFontColor
        - assistantMessageColor
        - assistantMessageFontColor
        - chatBubbleButtonColor
        - chatIconButtonColor
        - chatBubbleAlignment
        - chatBubbleDelay
        - initialMessages
        - initialMessagesDelay
        - suggestedMessages
        - suggestedMessagesLabel
        - messagePlaceholder
        - feedbackEnabled
        - copyEnabled
        - attachmentsEnabled
        - voiceInputEnabled
        - showStatusIndicator
        - statusLabel
    ApiErrorDto:
      type: object
      properties:
        status:
          type: string
          example: error
        error:
          $ref: '#/components/schemas/ApiErrorBodyDto'
        path:
          type: string
          example: /v1/agents/clx123
        timestamp:
          type: string
          example: '2026-11-24T10:00:00.000Z'
      required:
        - status
        - error
        - path
        - timestamp
    AgentChatInterfaceTheme:
      type: string
      enum:
        - Light
        - Dark
    ChatBubbleAlignment:
      type: string
      enum:
        - left
        - right
    ApiErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          example: NotFoundException
        message:
          type: string
          example: Agent not found
        details:
          type: object
          description: >-
            Extra fields, e.g. `missingScopes` on 403 or `secondsRemaining` on a
            training cooldown.
          additionalProperties: true
      required:
        - code
        - message
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.