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

> Chat Widgets Update an existing Chat Widget.

# Chat Widgets Update

For the complete error reference, see [Error Guide](/rest-api/management-apis/error-codes).


## OpenAPI

````yaml put /apps/{appId}/extensions/widget/v2/settings
openapi: 3.0.0
info:
  title: Management APIs (Multi-Tenancy)
  description: Create and manage apps on-the-fly using our app management APIs
  version: '1.0'
servers:
  - url: https://apimgmt.cometchat.io
security: []
tags:
  - name: App
    description: The Rest collection for app.
  - name: Extensions
    description: The REST collections for extensions.
  - name: Extensions
    description: The REST collections for Chat widgets.
  - name: Extensions
    description: The REST collections for Giphy extension.
  - name: Extensions
    description: The REST collections for XSS Filter extension.
  - name: Extensions
    description: The REST collections for Image Moderation extension.
  - name: Extensions
    description: The REST collections for Report user extension.
  - name: Extensions
    description: The REST collections for Report message extension.
  - name: Extensions
    description: The REST collections for Sentiment analysis extension.
  - name: Extensions
    description: The REST collections for Voice transcription extension.
  - name: Extensions
    description: The REST collections for Stipop extension.
  - name: Extensions
    description: The REST collections for TinyURL extension.
  - name: Extensions
    description: The REST collections for Intercom extension.
  - name: Extensions
    description: The REST collections for Bitly extension.
  - name: Extensions
    description: The REST collections for Rich media preview extension.
  - name: Extensions
    description: The REST collections for Virus Malware Scanner extension.
  - name: Extensions
    description: The REST collections for Video Broadcasting extension.
  - name: Extensions
    description: The REST collections for Tenor gifs extension.
  - name: Extensions
    description: The REST collections for End-to-end encryption extension.
  - name: Extensions
    description: The REST collections for In-flight message moderation extension.
  - name: Extensions
    description: The REST collections for Stickers extension.
  - name: Extensions
    description: The REST collections for Data masking extension.
  - name: Extensions
    description: The REST collections for Email replies extension.
  - name: Extensions
    description: The REST collections for SMS Notification extension.
  - name: Extensions
    description: The REST collections for Push notification extension.
  - name: Extensions
    description: The REST collections for Chatwoot extension.
  - name: Extensions
    description: The REST collections for Message shortcuts extension.
  - name: Extensions
    description: The REST collections for Email Notification extension.
  - name: Team Management
    description: The REST collections for team management.
  - name: Settings
    description: The REST collections for Settings.
  - name: Extensions
    description: The REST collections for Profanity-filter extension.
  - name: Webhooks
    description: The REST collections for Webhooks.
  - name: Moderation
    description: The REST collections for Moderations.
paths:
  /apps/{appId}/extensions/widget/v2/settings:
    put:
      tags:
        - Extensions
      summary: Chat Widgets Update
      description: Chat Widgets Update an existing Chat Widget.
      operationId: update-chat-widget
      parameters:
        - $ref: '#/components/parameters/key'
        - $ref: '#/components/parameters/secret'
        - $ref: '#/components/parameters/appId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/chatWidgetPutSchema'
      responses:
        '200':
          description: Create Chat Widget
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      statusCode:
                        type: integer
                      success:
                        type: boolean
                      responseTime:
                        type: integer
                      body:
                        properties:
                          data:
                            properties:
                              success:
                                type: boolean
                            type: object
                        type: object
                    type: object
                type: object
              example:
                data:
                  statusCode: 200
                  success: true
                  responseTime: 1.8547508716583252
                  body:
                    data:
                      success: true
components:
  parameters:
    key:
      name: key
      in: header
      description: Authorization Key
      required: true
      schema:
        type: string
    secret:
      name: secret
      in: header
      description: Authorization Secret
      required: true
      schema:
        type: string
    appId:
      name: appId
      in: path
      description: AppID in which the extension has to be enabled/disabled
      required: true
      schema:
        type: string
  schemas:
    chatWidgetPutSchema:
      properties:
        settings:
          required:
            - name
            - version
          properties:
            name:
              description: Name of the Chat Widget
              type: string
              default: Test Chat Widget
            version:
              description: Version is always v2
              type: string
              default: v2
            style:
              required:
                - docked_layout_icon_background
                - docked_layout_icon_close
                - docked_layout_icon_open
              properties:
                custom_css:
                  description: Custom CSS if required
                  type: string
                custom_js:
                  description: Custom JS if required
                  type: string
                  default: v2
                docked_layout_icon_background:
                  description: The background color for Icon in the Docked mode
                  type: string
                  default: '#03a9f4'
                docked_layout_icon_close:
                  description: >-
                    The image to be displayed on the Docked layout icon when the
                    Widget is closed.
                  type: string
                  default: https://widget-js.cometchat.io/v2/resources/chat_close.svg
                docked_layout_icon_open:
                  description: >-
                    The image to be displayed on the Docked layout icon when the
                    widget is opened.
                  type: string
                  default: https://widget-js.cometchat.io/v2/resources/chat_bubble.svg
                primary_color:
                  description: Primary Colour
                  type: string
                  default: '#03A9F4'
                foreground_color:
                  description: Foreground Colour
                  type: string
                  default: ' #000000'
                background_color:
                  description: Background Colour
                  type: string
                  default: '#FFFFFF'
                override_system_background_colors:
                  description: Override System Background Colours
                  type: boolean
                  default: true
              type: object
            sidebar:
              required:
                - users
                - groups
                - calls
                - recent_chat_listing
                - user_listing
                - sidebar_navigation_sequence
              properties:
                chats:
                  description: Show Chats section in the Sidebar
                  type: boolean
                  default: true
                users:
                  description: Show Users section in the Sidebar
                  type: boolean
                  default: true
                groups:
                  description: Show Groups section in the Sidebar
                  type: boolean
                  default: true
                calls:
                  description: Show Calls section in the Sidebar
                  type: boolean
                user_settings:
                  description: Show User Settings section in the Sidebar
                  type: boolean
                recent_chat_listing:
                  description: Which chats should be displayed in the Recent chat section
                  type: string
                  default: all_chats
                user_listing:
                  description: Which users should be displayed in the User list
                  type: string
                  default: all_users
                sidebar_navigation_sequence:
                  description: Order of sections in Sidebar. Do not add any new values.
                  type: array
                  items:
                    type: string
                  default:
                    - chats
                    - users
                    - groups
                    - calls
                    - settings
              type: object
            main:
              required:
                - allow_creating_polls
                - allow_delete_groups
                - allow_kick_ban_members
                - allow_message_reactions
                - allow_moderator_to_delete_member_messages
                - allow_promote_demote_members
                - block_user
                - create_groups
                - enable_collaborative_document
                - enable_collaborative_whiteboard
                - enable_deleting_messages
                - enable_editing_messages
                - enable_message_translation
                - enable_sending_messages
                - enable_sound_for_calls
                - enable_sound_for_messages
                - enable_threaded_replies
                - enable_video_calling
                - enable_voice_calling
                - hide_deleted_messages
                - hide_join_leave_notifications
                - join_or_leave_groups
                - send_emojis
                - send_message_in_private_to_group_member
                - send_photos_videos
                - share_live_reactions
                - show_call_notifications
                - show_delivery_read_indicators
                - show_emojis_in_larger_size
              properties:
                allow_add_members:
                  description: Allow adding new group members
                  type: boolean
                  default: true
                allow_creating_polls:
                  description: Enable Polls extension to allow sending polls
                  type: boolean
                allow_delete_groups:
                  description: Allow deletion of groups
                  type: boolean
                  default: true
                allow_kick_ban_members:
                  description: Allow kick/ban group member actions
                  type: boolean
                  default: true
                allow_message_reactions:
                  description: Enable Reactions extension to allow reactions to messages
                  type: boolean
                allow_moderator_to_delete_member_messages:
                  description: Allow moderators to delete messages from group
                  type: boolean
                allow_promote_demote_members:
                  description: Allow changing scopes of group members
                  type: boolean
                block_user:
                  description: Allow blocking a user
                  type: boolean
                  default: true
                create_groups:
                  description: Allow creating new groups
                  type: boolean
                  default: true
                enable_collaborative_document:
                  description: Enable Collaborative Document extension before enabling this
                  type: boolean
                enable_collaborative_whiteboard:
                  description: >-
                    Enable Collaborative Whiteboard extension before enabling
                    this.
                  type: boolean
                enable_deleting_messages:
                  description: Allow deletion of messages from chats
                  type: boolean
                  default: true
                enable_editing_messages:
                  description: Allow edition of messages from chats
                  type: boolean
                  default: true
                enable_message_translation:
                  description: Enable Message translation extension before enabling this.
                  type: boolean
                enable_sending_messages:
                  description: Allow sending messages
                  type: boolean
                  default: true
                enable_sound_for_calls:
                  description: Play sound for incoming calls
                  type: boolean
                  default: true
                enable_sound_for_messages:
                  description: Play sound for incoming messages
                  type: boolean
                  default: true
                enable_threaded_replies:
                  description: Allow creation of message threads
                  type: boolean
                  default: true
                enable_video_calling:
                  description: Enable video calling
                  type: boolean
                  default: true
                enable_voice_calling:
                  description: Enable voice calling
                  type: boolean
                  default: true
                hide_deleted_messages:
                  description: Hide message bubbles for deleted messages
                  type: boolean
                  default: true
                hide_join_leave_notifications:
                  description: >-
                    Hide the notifications in chat when someone joins or leaves
                    a group
                  type: boolean
                  default: true
                join_or_leave_groups:
                  description: Allow joining/leaving groups
                  type: boolean
                  default: true
                send_emojis:
                  description: Show the emojis keyboard
                  type: boolean
                  default: true
                send_files:
                  description: Allow sending files in chats
                  type: boolean
                  default: true
                send_message_in_private_to_group_member:
                  description: Allow sending private messages to group members
                  type: boolean
                send_photos_videos:
                  description: Allow sending Photos and Videos in chat
                  type: boolean
                  default: true
                share_live_reactions:
                  description: Allow sending Live Reactions
                  type: boolean
                  default: true
                show_call_notifications:
                  description: Show notification for incoming calls
                  type: boolean
                  default: true
                show_delivery_read_indicators:
                  description: Show delivery and read receipts
                  type: boolean
                  default: true
                show_emojis_in_larger_size:
                  description: >-
                    Display larger emojis when sending one, two or three in a
                    message.
                  type: boolean
                  default: true
                show_stickers:
                  description: Enable Stickers extension before enabling this
                  type: boolean
                  default: true
                show_typing_indicators:
                  description: Show typing... indicators in chats
                  type: boolean
                show_user_presence:
                  description: Show user preferences
                  type: boolean
                  default: true
                view_group_members:
                  description: Allow viewing group members
                  type: boolean
                  default: true
                allow_mention_members:
                  description: Allow Mention Members
                  type: boolean
                  default: false
                enable_replying_to_messages:
                  description: Enable Replying To Messages
                  type: boolean
                  default: false
                enable_share_copy_forward_messages:
                  description: Enable Share Copy Forward Messages
                  type: boolean
                  default: false
                highlight_messages_from_moderators:
                  description: Highlight Messages From Moderators
                  type: boolean
                  default: false
                show_call_recording_option:
                  description: Show Call Recording Option
                  type: boolean
                  default: false
                send_voice_notes:
                  description: Send Voice Notes
                  type: boolean
                  default: false
                send_gifs:
                  description: Send Gifs
                  type: boolean
                  default: false
                share_location:
                  description: Share Location
                  type: boolean
                  default: false
                view_shared_media:
                  description: Allow viewing all Shared media in a group
                  type: boolean
                  default: true
                set_groups_in_qna_mode_by_moderators:
                  description: Set Groups In Qna Mode By Moderators
                  type: boolean
                  default: false
                send_reply_in_private_to_group_member:
                  description: Send Reply In Private To Group Member
                  type: boolean
                  default: false
              type: object
            appId:
              description: Cometchat appid
              type: string
              default: 564663ddb71bbb
            widgetId:
              description: Widget Id that need to modify
              type: string
              default: 9af42f42-2f27-456d-9bfc-d77c29ec67bc
          type: object
      type: object

````