{
"id": "app.tempomusic.staff.banAccount",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did",
"reason"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"reason": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"notifyUser": {
"type": "boolean",
"default": false,
"description": "When true, persist a moderation notice addressed to the affected user (content author or account holder). Delivery is out of scope."
},
"closeAttachedReports": {
"type": "boolean",
"default": false,
"description": "Same semantics as suspendAccount: closes `open`/`underReview` reports against the ACCOUNT subject in the same transaction, with linked `reportClosedByCascade` audit rows. Reports against individual posts/replies stay open."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "Forbidden",
"description": "The caller is not a super-admin."
},
{
"name": "AccountAlreadyBanned",
"description": "The account is already banned."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"auditEntryId",
"attachedReportsClosed"
],
"properties": {
"auditEntryId": {
"type": "integer",
"minimum": 1
},
"attachedReportsClosed": {
"type": "integer",
"minimum": 0,
"description": "Number of account-subject reports auto-closed in this transaction. Zero when closeAttachedReports=false or none were open."
}
}
},
"encoding": "application/json"
},
"description": "Permanently ban an account: all of its content disappears from the public read surface and no surface can lift the state. Escalating an active suspension replaces it. Requires the `superAdmin` role. Writes an `accountBanned` audit row. Federation caveat: the ban blocks this DID — re-registration under a fresh DID is structurally possible in AT Protocol."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}