What is Moderation?
The moderation system handles:- Labels: Applied by moderators or self-labeled by authors
- Muting: User-initiated muting of accounts or keywords
- Blocking: User-initiated blocking of accounts
- Mutelists: Shared lists of accounts to mute
- Blocklists: Shared lists of accounts to block
- Hidden posts: User-specific hidden content
- Mute words: Keyword filtering
Core Concepts
Moderation Context
Every moderation decision requires context:UI Contexts
Moderation decisions vary by context:- profileList: Profiles in search results or follower lists
- profileView: A profile being viewed directly
- avatar: User avatars
- banner: User banners
- displayName: User display names
- contentList: Content in feeds (posts, lists, generators)
- contentView: Content being viewed directly
- contentMedia: Media embedded in content
Getting Started
Fetch User Preferences
Get the user’s moderation preferences:Get Label Definitions
Fetch custom label definitions from labelers:Label definitions should be cached (TTL of 6 hours is recommended) to avoid excessive API calls.
Configure App Labelers
Set the default labelers for your application:Moderating Content
Moderating Posts
Moderating Profiles
Other Content Types
Understanding Moderation Results
ModerationUI Interface
Each moderation check returns aModerationUI object:
Moderation Causes
Each cause explains why a moderation action was taken:Implementing Moderation UI
Feed Item Example
jsx
Profile Page Example
jsx
User Actions
Muting Users
Blocking Users
Mute Words
Mute words filter content containing specific keywords:Hide Posts
Working with Labelers
What are Labelers?
Labelers are services that apply moderation labels to content. They publish label value definitions that describe custom labels.Labeler Service Record
Fetching Labeler Services
Interpreting Label Definitions
Sending Reports
Report content or accounts to a labeler:com.atproto.moderation.defs#reasonSpamcom.atproto.moderation.defs#reasonViolationcom.atproto.moderation.defs#reasonMisleadingcom.atproto.moderation.defs#reasonSexualcom.atproto.moderation.defs#reasonRudecom.atproto.moderation.defs#reasonOther
Advanced Usage
Custom Moderation Logic
Extend the moderation system with custom rules:Merging Moderation Decisions
Checking Mute Words
Best Practices
1
Cache label definitions
Label definitions don’t change often. Cache them for ~6 hours.
2
Respect noOverride flag
When
noOverride is true, don’t allow users to view the content.3
Handle different UI contexts
Use the appropriate context for each situation.
4
Show informative messages
Explain why content is moderated.
Common Pitfalls
Next Steps
Using the API
Learn more about the Agent API
Rich Text
Work with mentions and links
OAuth Authentication
Implement OAuth authentication
API Reference
Explore the complete API