Skip to content

Custom Rules

Custom rules let you extend Sieve’s built-in moderation with rules specific to your platform. Block game-specific slurs that general models miss, allow terms that are false positives for your community, or match complex patterns with regex.

Match exact words or phrases. Sieve handles Unicode normalization and leetspeak variants automatically.

Match patterns using regular expressions. For complex patterns that wordlists can’t capture.

Prevent specific words or phrases from being flagged. Override false positives from the AI tier.

Wordlist rules match exact words or phrases. Sieve automatically normalizes Unicode and decodes leetspeak before matching, so you don’t need to add every variant manually.

Terminal window
curl -X POST https://api.getsieve.dev/v1/config/rules \
-H "Authorization: Bearer mod_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"type": "wordlist",
"action": "block",
"category": "spam",
"words": ["buy gold cheap", "account for sale", "boosting service"],
"priority": 10
}'

Use cases:

  • Game-specific slurs or offensive terms not in general datasets
  • Known scam phrases specific to your platform
  • Brand-specific terms that should always be blocked
  • Competitor names in contexts where they indicate spam

Regex rules match content against regular expressions. Use these for patterns that can’t be expressed as simple word lists.

Terminal window
curl -X POST https://api.getsieve.dev/v1/config/rules \
-H "Authorization: Bearer mod_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"type": "regex",
"action": "flag",
"category": "spam",
"pattern": "\\b\\d{2,}k\\s*gold\\s*(for\\s*)?\\$\\d+",
"priority": 5
}'

Use cases:

  • Matching price patterns in RMT spam (“10k gold $5”)
  • Detecting URLs with specific domain patterns
  • Complex obfuscation patterns unique to your platform
  • Matching structured data patterns (phone numbers, crypto wallet addresses)

Allowlist rules prevent specific terms from triggering moderation. Use these to fix false positives where legitimate terms in your community get flagged by the AI tier.

Terminal window
curl -X POST https://api.getsieve.dev/v1/config/rules \
-H "Authorization: Bearer mod_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"type": "allowlist",
"words": ["assassin", "killer bee", "execute order"],
"priority": 100
}'

Use cases:

  • Game character names that contain violent terms (“Assassin’s Creed”)
  • In-game abilities with aggressive names (“Execute,” “Backstab”)
  • Community slang that sounds offensive out of context
  • Technical terms that trigger false positives

Rules are evaluated in priority order (higher number = evaluated first). This matters when rules conflict:

PriorityRuleAction
100Allowlist: “assassin”Allow
10Wordlist: offensive termsBlock
5Regex: spam patternsFlag
0Default pipelineEvaluate

A higher-priority allowlist rule will override a lower-priority wordlist block. Use this to create nuanced rule sets:

  1. High priority (100+): Allowlists for known false positives
  2. Medium priority (10-50): Wordlists for must-block terms
  3. Low priority (1-9): Regex patterns for soft matching
Terminal window
curl -X GET https://api.getsieve.dev/v1/config/rules \
-H "Authorization: Bearer mod_live_your_key"
Terminal window
curl -X DELETE https://api.getsieve.dev/v1/config/rules/rule_abc123 \
-H "Authorization: Bearer mod_live_your_key"
Terminal window
curl -X PUT https://api.getsieve.dev/v1/config/rules/rule_abc123 \
-H "Authorization: Bearer mod_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"words": ["buy gold cheap", "account for sale", "boosting service", "power leveling"],
"priority": 15
}'