{
"id": "app.tempomusic.staff.suspendAccount",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did",
"reason"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"until": {
"type": "string",
"format": "datetime",
"description": "Suspension expiry. Omitted = indefinite (until explicitly unsuspended). Must be in the future."
},
"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": "When true, all reports against the ACCOUNT subject still in `open` or `underReview` are marked `actioned` in the same transaction; each closed report gets a `reportClosedByCascade` audit row linked to this sanction's audit id. Reports against individual posts/replies of the account are left open — the moderator has not examined them."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "Forbidden",
"description": "The caller is not an active moderator."
},
{
"name": "InvalidRequest",
"description": "Malformed DID or `until` not in the future."
},
{
"name": "AccountBanned",
"description": "The account is banned — a ban is permanent and stricter than a suspension."
}
],
"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": "Suspend an account: all of its content disappears from the public read surface (feeds, single fetches, threads, notifications) while the row is active. Reversible via unsuspendAccount; optionally time-boxed via `until` (evaluated at read time — a lapsed suspension readmits content with no further action). Re-suspending replaces the current suspension (new reason/expiry, new audit row). Requires the `moderator` role. Writes an `accountSuspended` audit row."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}