Skip to main content

Overview

The com.atproto.moderation namespace provides lexicons for reporting content and accounts that violate community guidelines or terms of service.

Key Concepts

  • Reports: User-submitted reports about problematic content or accounts
  • Report Reasons: Categorized reasons for reporting (spam, harassment, etc.)
  • Subjects: What can be reported (accounts, posts, profiles, etc.)
  • Moderation Services: Where reports are sent for review

Procedures

createReport

Create a report about an account or content. Endpoint: com.atproto.moderation.createReport Authentication: Required
reasonType
string
required
The reason for the report (see reason types below)
reason
string
Additional context provided by the reporter (max 20,000 characters)
subject
object
required
The subject being reported (account or record)
Response:
id
integer
required
Report ID
reasonType
string
required
The reason type used
reason
string
Additional context
subject
object
required
The reported subject
reportedBy
string
required
DID of the reporter
createdAt
string
required
When the report was created
Example - Report an Account:
await agent.com.atproto.moderation.createReport({
  reasonType: 'com.atproto.moderation.defs#reasonSpam',
  subject: {
    $type: 'com.atproto.admin.defs#repoRef',
    did: 'did:plc:spammer123'
  },
  reason: 'This account is posting spam links repeatedly'
})
Example - Report a Post:
await agent.com.atproto.moderation.createReport({
  reasonType: 'com.atproto.moderation.defs#reasonViolation',
  subject: {
    $type: 'com.atproto.repo.strongRef',
    uri: 'at://did:plc:user123/app.bsky.feed.post/3k2y...',
    cid: 'bafyrei...'
  },
  reason: 'This post contains harassment and threats'
})
curl -X POST https://bsky.social/xrpc/com.atproto.moderation.createReport \
  -H "Authorization: Bearer $ACCESS_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "reasonType": "com.atproto.moderation.defs#reasonSpam",
    "subject": {
      "$type": "com.atproto.admin.defs#repoRef",
      "did": "did:plc:spammer123"
    },
    "reason": "Posting spam links"
  }'

Type Definitions

reasonType

The type of violation being reported. Core reason types:

Legacy Reasons (Deprecated but still supported)

reasonSpam
token
com.atproto.moderation.defs#reasonSpamFrequent unwanted promotion, replies, mentions. Prefer tools.ozone.report.defs#reasonMisleadingSpam.
reasonViolation
token
com.atproto.moderation.defs#reasonViolationDirect violation of server rules, laws, or terms of service. Prefer tools.ozone.report.defs#reasonRuleOther.
reasonMisleading
token
com.atproto.moderation.defs#reasonMisleadingMisleading identity, affiliation, or content. Prefer tools.ozone.report.defs#reasonMisleadingOther.
reasonSexual
token
com.atproto.moderation.defs#reasonSexualUnwanted or mislabeled sexual content. Prefer tools.ozone.report.defs#reasonSexualUnlabeled.
reasonRude
token
com.atproto.moderation.defs#reasonRudeRude, harassing, or otherwise unwelcoming behavior. Prefer tools.ozone.report.defs#reasonHarassmentOther.
reasonOther
token
com.atproto.moderation.defs#reasonOtherReports not falling under another category. Prefer tools.ozone.report.defs#reasonOther.
reasonAppeal
token
com.atproto.moderation.defs#reasonAppealAppeal a previously taken moderation action.

Modern Reasons (via tools.ozone.report.defs)

The modern reporting system uses more granular categories: Violence:
  • tools.ozone.report.defs#reasonViolenceAnimal - Animal cruelty
  • tools.ozone.report.defs#reasonViolenceThreats - Threats of violence
  • tools.ozone.report.defs#reasonViolenceGraphicContent - Graphic violent content
  • tools.ozone.report.defs#reasonViolenceGlorification - Glorification of violence
  • tools.ozone.report.defs#reasonViolenceExtremistContent - Extremist content
  • tools.ozone.report.defs#reasonViolenceTrafficking - Human trafficking
  • tools.ozone.report.defs#reasonViolenceOther - Other violence
Sexual Content:
  • tools.ozone.report.defs#reasonSexualAbuseContent - Sexual abuse content
  • tools.ozone.report.defs#reasonSexualNCII - Non-consensual intimate imagery
  • tools.ozone.report.defs#reasonSexualDeepfake - Sexual deepfakes
  • tools.ozone.report.defs#reasonSexualAnimal - Sexual content involving animals
  • tools.ozone.report.defs#reasonSexualUnlabeled - Unlabeled sexual content
  • tools.ozone.report.defs#reasonSexualOther - Other sexual content issues
Child Safety:
  • tools.ozone.report.defs#reasonChildSafetyCSAM - Child sexual abuse material
  • tools.ozone.report.defs#reasonChildSafetyGroom - Grooming behavior
  • tools.ozone.report.defs#reasonChildSafetyPrivacy - Child privacy violation
  • tools.ozone.report.defs#reasonChildSafetyHarassment - Harassment of children
  • tools.ozone.report.defs#reasonChildSafetyOther - Other child safety issues
Harassment:
  • tools.ozone.report.defs#reasonHarassmentTroll - Trolling
  • tools.ozone.report.defs#reasonHarassmentTargeted - Targeted harassment
  • tools.ozone.report.defs#reasonHarassmentHateSpeech - Hate speech
  • tools.ozone.report.defs#reasonHarassmentDoxxing - Doxxing
  • tools.ozone.report.defs#reasonHarassmentOther - Other harassment
Misleading Content:
  • tools.ozone.report.defs#reasonMisleadingBot - Undisclosed bot account
  • tools.ozone.report.defs#reasonMisleadingImpersonation - Impersonation
  • tools.ozone.report.defs#reasonMisleadingSpam - Spam
  • tools.ozone.report.defs#reasonMisleadingScam - Scam
  • tools.ozone.report.defs#reasonMisleadingElections - Election misinformation
  • tools.ozone.report.defs#reasonMisleadingOther - Other misleading content
Rule Violations:
  • tools.ozone.report.defs#reasonRuleSiteSecurity - Site security threat
  • tools.ozone.report.defs#reasonRuleProhibitedSales - Prohibited sales
  • tools.ozone.report.defs#reasonRuleBanEvasion - Ban evasion
  • tools.ozone.report.defs#reasonRuleOther - Other rule violations
Self-Harm:
  • tools.ozone.report.defs#reasonSelfHarmContent - Self-harm content
  • tools.ozone.report.defs#reasonSelfHarmED - Eating disorder content
  • tools.ozone.report.defs#reasonSelfHarmStunts - Dangerous stunts
  • tools.ozone.report.defs#reasonSelfHarmSubstances - Substance abuse
  • tools.ozone.report.defs#reasonSelfHarmOther - Other self-harm content

subjectType

Types of subjects that can be reported:
  • account: User account (DID)
  • record: Repository record (post, profile, etc.)
  • chat: Chat message or conversation

Report Subjects

Reports can target different types of content:

Reporting an Account

Use com.atproto.admin.defs#repoRef:
{
  $type: 'com.atproto.admin.defs#repoRef',
  did: 'did:plc:user123'
}

Reporting a Record (Post, Profile, etc.)

Use com.atproto.repo.strongRef:
{
  $type: 'com.atproto.repo.strongRef',
  uri: 'at://did:plc:user123/app.bsky.feed.post/3k2y...',
  cid: 'bafyrei...'
}

Reporting a Blob (Image, Video)

Use com.atproto.admin.defs#repoBlobRef:
{
  $type: 'com.atproto.admin.defs#repoBlobRef',
  did: 'did:plc:user123',
  cid: 'bafyrei...',
  recordUri: 'at://did:plc:user123/app.bsky.feed.post/3k2y...'
}

Common Use Cases

Report Spam Account

await agent.com.atproto.moderation.createReport({
  reasonType: 'tools.ozone.report.defs#reasonMisleadingSpam',
  subject: {
    $type: 'com.atproto.admin.defs#repoRef',
    did: 'did:plc:spammer123'
  },
  reason: 'Account is mass-following and posting promotional content'
})

Report Harassment

await agent.com.atproto.moderation.createReport({
  reasonType: 'tools.ozone.report.defs#reasonHarassmentTargeted',
  subject: {
    $type: 'com.atproto.repo.strongRef',
    uri: 'at://did:plc:user123/app.bsky.feed.post/3k2y...',
    cid: 'bafyrei...'
  },
  reason: 'This post contains targeted harassment and personal attacks'
})

Report Inappropriate Image

await agent.com.atproto.moderation.createReport({
  reasonType: 'tools.ozone.report.defs#reasonSexualUnlabeled',
  subject: {
    $type: 'com.atproto.admin.defs#repoBlobRef',
    did: 'did:plc:user123',
    cid: 'bafyreiblobcid...',
    recordUri: 'at://did:plc:user123/app.bsky.feed.post/3k2y...'
  },
  reason: 'Post contains sexual content without appropriate labels'
})

Report Impersonation

await agent.com.atproto.moderation.createReport({
  reasonType: 'tools.ozone.report.defs#reasonMisleadingImpersonation',
  subject: {
    $type: 'com.atproto.admin.defs#repoRef',
    did: 'did:plc:impersonator123'
  },
  reason: 'This account is impersonating @realuser.bsky.social'
})

Appeal a Moderation Action

await agent.com.atproto.moderation.createReport({
  reasonType: 'com.atproto.moderation.defs#reasonAppeal',
  subject: {
    $type: 'com.atproto.admin.defs#repoRef',
    did: agent.session.did // Your own account
  },
  reason: 'I believe my account was suspended in error. The flagged content was satire and did not violate community guidelines.'
})

Building a Report UI

function createReportForm(subject: { uri: string; cid: string }) {
  const reasons = [
    { 
      value: 'tools.ozone.report.defs#reasonMisleadingSpam',
      label: 'Spam'
    },
    { 
      value: 'tools.ozone.report.defs#reasonHarassmentTargeted',
      label: 'Harassment'
    },
    { 
      value: 'tools.ozone.report.defs#reasonSexualUnlabeled',
      label: 'Unlabeled Sexual Content'
    },
    { 
      value: 'tools.ozone.report.defs#reasonViolenceThreats',
      label: 'Threats or Violence'
    },
    {
      value: 'com.atproto.moderation.defs#reasonOther',
      label: 'Other'
    }
  ]

  return {
    reasons,
    async submit(reasonType: string, reason: string) {
      await agent.com.atproto.moderation.createReport({
        reasonType,
        reason,
        subject: {
          $type: 'com.atproto.repo.strongRef',
          uri: subject.uri,
          cid: subject.cid
        }
      })
    }
  }
}

Important Notes

Report Privacy

  • Reports are submitted to the appropriate moderation service (PDS or labeler)
  • The reported user is not notified who reported them
  • Reports are reviewed by moderators, not automatically actioned

Report Limits

  • Users can submit multiple reports
  • Duplicate reports of the same subject are allowed
  • Each report creates a new moderation queue item

Where Reports Go

  • Reports for content/accounts on your PDS go to your PDS moderators
  • Reports can also go to third-party labeling services if configured
  • AppView (bsky.app) has its own reporting system for network-wide content

False Reports

  • Submitting false or malicious reports may result in account suspension
  • Use the appeal process if you believe action was taken in error

Resources

Build docs developers (and LLMs) love