Rule Object


Properties
actionAction

What action should be taken after the rule is triggered.


audienceAudience

Audience to which the rule applies.


createdDatestringRead-onlyformat date-time

Date and time when the rule was created.


enabledboolean

Whether the rule is enabled.


exemptionsExemptions

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


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.


idstringRead-onlyformat GUID

Rule ID.


namestringmaxLength 120

Rule name.


namespacestringminLength 1maxLength 120

The app name and entity which the rule belongs to. Currently, moderation rules support Comments and Reviews:

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


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.


triggerTrigger

A condition that triggers the rule.

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


updatedDatestringRead-onlyformat date-time

Date and time when the rule was updated.

Did this help?