Rule Object


Properties
idstringRead-onlyformat GUID

Rule ID.


revisionstringRead-onlyformat int64

Revision number, which increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule.


createdDatestringRead-onlyformat date-time

Date and time when the rule was created.


updatedDatestringRead-onlyformat date-time

Date and time when the rule was updated.


namespacestringminLength 1maxLength 120

The app name and entity which the rule belongs to. Currently, moderation rules support Comments (SDK | REST) and Reviews (SDK | REST):

  • When the namespace is comments the format is comments/{APP_ID}. For example, for moderating content on Wix Blog the namespace is "comments/14bcded7-0066-7c35-14d7-466cb3f09103".
  • When the namespace is reviews the format is reviews/{APP_NAME}. For example, for moderating content on Wix Reviews the namespace is "reviews/stores".

To retrieve the ID for a Wix app, see Apps Created By Wix (SDK | REST).


namestringmaxLength 120

Rule name.


audienceAudience

Audience to which the rule applies.


triggerTrigger

A condition that triggers the rule.

Note: If you need to have several triggers for the same namespace, create separate rules.


exemptionsExemptions

List of site members or groups to whom the rule doesn't apply.


actionAction

What action should be taken after the rule is triggered.


enabledboolean

Whether the rule is enabled.


extendedFieldsExtendedFields

Custom field data for the rule object.

Note: You must configure extended fields using schema plugin extensions in your app's dashboard before you can access the extended fields with API calls.

Did this help?