---
schema_version: "1"
id: 162dc65015618d75d7c230b380fe0b3548e490f7e60d3fcfef795bb94fed68e4
title: ModerationRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_moderationrule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_moderationrule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6e8b797b85bcc9cb40ddf2033e12d2e5f386465d0f2999fdd3b50c9159794496
description: Represents a rule used in your Experience Cloud site to moderate member-generated content. Available in Tooling API version 36.0 and later.
---
# ModerationRule

Represents a rule used in your Experience Cloud site to moderate member-generated content. Available in Tooling API version 36.0 and later.

Moderation rules help protect your site from spammers, bots, and offensive or inappropriate content. Create and modify rules for your Experience Cloud site to moderate member-generated content. Each rule specifies the member-generated content the rule applies to, the criteria to enforce the rule on, and the moderation action to take.

## Supported SOAP Calls

create(), delete(), query(), retrieve(), update()

## Supported REST HTTP Methods

DELETE, GET, PATCH, POST

## Fields

| Field | Details |
| --- | --- |
| Action | 
Type

picklist

Properties

Defaulted on create, Filter, Group, Nillable, Restricted picklist

Description

Required. Indicates the moderation action that you want to take. The valid values are:

- Block
- Review
- Replace
- Flag
- FreezeAndNotify (Reserved for future use.)





 |
| ActionLimit | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

Indicates the moderation action limit measured in minutes. Available in API version 39.0 and later.



 |
| Active | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Required. Indicates whether the moderation rule is active (true) or inactive (false).



 |
| Description | 

Type

textarea

Properties

Filter, Nillable, Sort

Description

A description of the moderation rule.



 |
| DeveloperName | 

Type

string

Properties

Filter, Group, Namefield, Sort

Description

The developer’s internal name for the moderation rule used in the API.



 |
| FullName | 

Type

string

Properties

Create, Group, Nillable

Description

The full name of the associated metadata object in Metadata API.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.



 |
| Language | 

Type

picklist

Properties

Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

Description

The language of the moderation rule. Valid values are:

- Chinese (Simplified): zh\_CN
- Chinese (Traditional): zh\_TW
- Danish: da
- Dutch: nl\_NL
- English: en\_US
- Finnish: fi
- French: fr
- German: de
- Italian: it
- Japanese: ja
- Korean: ko
- Norwegian: no
- Portuguese (Brazil): pt\_BR
- Russian: ru
- Spanish: es
- Spanish (Mexico): es\_MX Spanish (Mexico) defaults to Spanish for customer-defined translations.
- Swedish: sv
- Thai: th The Salesforce user interface is fully translated to Thai, but Help is in English.





 |
| MasterLabel | 

Type

string

Properties

Filter, Group, Sort

Description

Label for the moderation rule.



 |
| Metadata | 

Type

mns:ModerationRule

Properties

Create, Nillable, Update

Description

Moderation rule metadata. Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.



 |
| NotifyLimit | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

Indicates the notification limit (in seconds) of the moderation rule. Available in API version 39.0 and later.



 |
| TimePeriod | 

Type

RateLimitTimePeriod (enumeration of type string)

Properties

Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

Description

The values that represent the time-frame for which a rate limiting rule is applied. The two values available represent a time periods measured in minutes: “Short” represents 3 minutes and “Medium” represents 15 minutes. Available in API version 39.0 and later. Valid values are:

- Short
- Medium





 |
| Type | 

Type

ModerationRuleType (enumeration of type string)

Properties

Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

Description

Type of moderation rule. Content rules protect your site from offensive language and inappropriate content created by spammers or malicious members. Rate rules protect your site against spammers and bots that attack your site by posting the same message multiple times in a row. Available in API version 39.0 and later. Valid values are:

- Content
- Rate





 |
| UserMessage | 

Type

textarea

Properties

Filter, Nillable, Sort

Description

The message you want your members to see when their content is blocked. Use the %BLOCKED\_KEYWORD% variable to display up to five blocked words in the user message. If you don’t specify a message, the member sees the standard message: “You can’t use %BLOCKED\_KEYWORD% or other inappropriate words in this site. Review your content and try again.”



 |