About Moderation Rules

With the Moderation Rules API you can maintain a safe and compliant online environment by automating content moderation through customizable rules. Also, you can integrate this API to moderate content within your own products, such as a comments app or review collection system.

The Moderation Rules API allows you to:

  • Create and manage custom moderation rules to control the content that appears on your site.
  • Automatically check and filter user-generated content to ensure it meets your site's standards.
  • Retrieve, update, and delete existing moderation rules to keep your content policies up-to-date and relevant.

Moderation rule flow

The following example describes the Moderation Rules API flow for a comment submitted in the Wix Blog app:

  1. A site visitor submits a new comment on a blog post.
  2. The comment is reviewed to determine if it violates any moderation rules. For example, the comment can't contain any links.
    • On a Wix site, a modal informs the user that the comment is undergoing moderation. In the UI, the comment is marked with the "Pending" status.
    • On the backend, the comment has the PENDING status.
  3. If a violation is detected (the comment contains links), the rule is triggered and appropriate action is taken. The comment is either sent for manual approval or rejected.

Before you begin

It’s important to note the following points before starting to code:

  • You don't need to install any additional apps. Moderation service is already integrated in Comments and Reviews.
  • You can create up to 20 rules per namespace.
  • For every trigger there must be a separate rule.
  • The content is checked only for newly submitted reviews and comments. Any comments or reviews made before the integration of this API aren't checked.

Use cases

Terminology

  • Audience: The group of users to whom a rule applies.
  • Trigger: The condition or event that activates a rule.
  • Exemptions: Specific users or groups that are excluded from a rule.
  • Action: The response or measure taken when a rule is triggered.
  • Content: The material or information that is subject to moderation.
  • Violations: Instances where content breaches the established rules.
  • Rule: A predefined set of conditions that manages user-created content on a website. It consists of three key components:
    • Audience
    • Triggers
    • Actions
  • Namespace: A namespace is a way to organize and separate different entities within a website, allowing each entity to have its own distinct set of rules or behaviors. This structure helps manage different features, like comments or reviews, by assigning specific rules to each, even when they coexist on the same site. For example, your site can have comments for both Wix Blog and Wix Forum. These comments may require different moderation rules, so namespaces like comments/{BLOG_APP_ID} or comments/{FORUM_APP_ID} can be defined to separate the rules.
Was this helpful?
Yes
No