> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-flutter-sdk-mark-as-unread.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove rule

> Delete a specific moderation rule by its ID.

export const calloutText = {
  moderation: {
    deprecationText: 'This API has been deprecated, use the updated version at - ',
    url: {
      createRule: {
        url: '/rest-api/moderation/add-rule',
        text: 'Create Rule'
      },
      listRules: {
        url: '/rest-api/moderation/list-rules',
        text: 'List Rules'
      },
      getRule: {
        url: '/rest-api/moderation/get-rule',
        text: 'List Rule'
      },
      updateRule: {
        url: '/rest-api/moderation/update-rule',
        text: 'Update Rule'
      },
      removeRule: {
        url: '/rest-api/moderation/remove-rule',
        text: 'Remove Rule'
      },
      listRuleKeywords: {
        url: '/rest-api/moderation/list-keywords',
        text: 'List Keywords'
      },
      addKeyWords: {
        url: '/rest-api/moderation/add-keywords',
        text: 'Add Keywords'
      },
      getKeyword: {
        url: '/rest-api/moderation/get-keyword',
        text: 'Get Keyword'
      },
      updateKeyword: {
        url: '/rest-api/moderation/update-keyword',
        text: 'Update Keyword'
      },
      removeKeyword: {
        url: '/rest-api/moderation/remove-keyword',
        text: 'Remove Keyword'
      },
      getRuleRevisions: {
        url: '/rest-api/moderation/get-rule-revisions',
        text: 'Get Rule Revisions'
      },
      listBlockedMessages: {
        url: '/rest-api/moderation/list-blocked-messages',
        text: 'List Blocked Messages'
      },
      approveBlockedMessages: {
        url: '/rest-api/moderation/approve-blocked-messages',
        text: 'Approve Blocked Messages'
      }
    }
  }
};

export const Callout = ({text, urlKey}) => {
  return <div>
      <Note>{text}<a href={urlKey['url']} target="blank">{urlKey['text']}</a></Note>
    </div>;
};

<Callout text={calloutText.moderation.deprecationText} urlKey={calloutText.moderation.url.removeRule} />


## OpenAPI

````yaml delete /apps/{appId}/moderation/rules/{ruleId}
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}/moderation/rules/{ruleId}:
    delete:
      tags:
        - Moderation
      summary: Remove rule
      description: Delete a specific moderation rule by its ID.
      operationId: delete-rule
      parameters:
        - $ref: '#/components/parameters/key'
        - $ref: '#/components/parameters/secret'
        - $ref: '#/components/parameters/appId'
        - $ref: '#/components/parameters/ruleId'
      responses:
        '200':
          description: Delete Rule
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      '':
                        $ref: '#/components/schemas/webhookSchema'
                    type: object
                type: object
              example:
                data:
                  success: true
                  message: Rule with id moderation-test has been deleted successfully.
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
    ruleId:
      name: ruleId
      in: path
      description: Rule ID
      required: true
      schema:
        type: string
  schemas:
    webhookSchema:
      properties:
        id:
          type: string
        name:
          type: string
        webhookURL:
          type: string
        enabled:
          type: boolean
      type: object

````