{
"id": "app.tempomusic.moderation.createReport",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"subject",
"reasonType"
],
"properties": {
"details": {
"type": "string",
"maxLength": 500,
"description": "Free-text context. Required when reasonType is `other`; optional otherwise.",
"maxGraphemes": 500
},
"subject": {
"refs": [
"app.tempomusic.moderation.defs#postSubject",
"app.tempomusic.moderation.defs#replySubject",
"app.tempomusic.moderation.defs#accountSubject"
],
"type": "union",
"description": "The reported entity. Discriminated by $type."
},
"reasonType": {
"ref": "app.tempomusic.moderation.defs#reasonType",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "RateLimited",
"description": "The reporter has exceeded the per-hour or per-day report limit. Try again later."
},
{
"name": "InvalidSubject",
"description": "The subject union carries a value outside the supported $type set, or is malformed (missing uri/cid/did)."
},
{
"name": "DetailsRequired",
"description": "reasonType is `other` but `details` was empty. Free-text context is mandatory for the catch-all reason."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"reportId",
"deduped"
],
"properties": {
"deduped": {
"type": "boolean",
"description": "True when the call hit the (reporter, subject) dedupe constraint and no new row was inserted."
},
"reportId": {
"type": "integer",
"minimum": 1,
"description": "Identifier of the report row. Same value returned for the original submission and any subsequent duplicate."
}
}
},
"encoding": "application/json"
},
"description": "Submit a user-initiated report on a post, reply, or actor account. The reporter DID is read from the authenticated principal. Reports are dedupe-forever on (reporter, subject): a duplicate submission returns the existing report id with `deduped: true` and no new row is inserted. Per-reporter rate limit applies (5/hour, 50/day). Reports are server-side records only — they are NEVER published as PDS records, never broadcast on the firehose, and are only readable by moderators via the admin surface."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}