> ## 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.

> Data masking : Store or update the settings for Data masking extension.

# Data masking Store or update settings

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


## OpenAPI

````yaml put /apps/{appId}/extensions/data-masking/v1/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/data-masking/v1/settings:
    put:
      tags:
        - Extensions
      summary: Data masking Store or update settings
      description: 'Data masking : Store or update the settings for Data masking extension.'
      operationId: store-or-update-settings-data-masking
      parameters:
        - $ref: '#/components/parameters/key'
        - $ref: '#/components/parameters/secret'
        - $ref: '#/components/parameters/appId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dataMaskingRequestSchema'
      responses:
        '200':
          description: Update Data Masking Settings
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      '':
                        $ref: '#/components/schemas/dataMaskingResponseSchema'
                    type: object
                type: object
              example:
                data:
                  statusCode: 200
                  success: true
                  responseTime: 3.061743974685669
                  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:
    dataMaskingRequestSchema:
      properties:
        settings:
          required:
            - dropMessage
            - customregexData
            - defaultRegexData
            - deleteCustomRegexData
          properties:
            dropMessage:
              description: Should drop message in case of sensitive information?
              type: boolean
              default: false
            defaultRegexData:
              description: Configure the default masks
              type: array
              items:
                type: object
              default:
                - enableFlag: false
                  id: '1'
                  name: US Phone numbers
                  regex: '[2-9]\\d{2}-\\d{3}-\\d{4}'
                - enableFlag: false
                  id: '2'
                  name: Emails
                  regex: \\w+([.-]?\\w+)*@\\w+([.-]?\\w+)*(\\.\\w{2,10})+
                - enableFlag: false
                  id: '3'
                  name: SSN
                  regex: \\d{3}-\\d{2}-\\d{4}
            customregexData:
              description: Configure the custom masks
              type: array
              items:
                type: object
              default:
                - name: one
                  regex: one
                  id: '1983958'
            deleteCustomRegexData:
              description: Remove custom masks by ID
              type: array
              items:
                type: string
              default:
                - '9393903'
          type: object
      type: object
    dataMaskingResponseSchema:
      properties:
        statusCode:
          type: integer
        success:
          type: boolean
        responseTime:
          type: number
        body:
          properties:
            data:
              properties:
                success:
                  type: boolean
              type: object
          type: object
      type: object

````