@@ -103,6 +103,10 @@ No access token was specified for the request.
103
103
` M_USER_LOCKED `
104
104
The account has been [ locked] ( #account-locking ) and cannot be used at this time.
105
105
106
+ ` M_USER_SUSPENDED `
107
+ The account has been [ suspended] ( #account-suspension ) and can only be used for
108
+ limited actions at this time.
109
+
106
110
` M_BAD_JSON `
107
111
Request contained valid JSON, but it was malformed in some way, e.g.
108
112
missing required keys, invalid values for keys.
@@ -1499,6 +1503,73 @@ and other APIs to detect when the lock has been lifted.
1499
1503
To enable users to appeal to a lock clients MAY use
1500
1504
[ server contact discovery] ( #getwell-knownmatrixsupport ) .
1501
1505
1506
+ #### Account suspension
1507
+
1508
+ {{% added-in v="1.13" %}}
1509
+
1510
+ Server administrators MAY suspend a user's account to prevent further activity
1511
+ from that account. The effect is similar to [ locking] ( #account-locking ) , though
1512
+ without risk of the client losing state from a logout. Suspensions are reversible,
1513
+ like locks and unlike deactivations.
1514
+
1515
+ The actions a user can perform while suspended is deliberately left as an
1516
+ implementation detail. Servers SHOULD permit the user to perform at least the
1517
+ following, however:
1518
+
1519
+ * Log in and create additional sessions (which are also suspended).
1520
+ * See and receive messages, particularly through [ ` /sync ` ] ( #get_matrixclientv3sync )
1521
+ and [ ` /messages ` ] ( #get_matrixclientv3roomsroomidmessages ) .
1522
+ * [ Verify other devices] ( #device-verification ) and write associated
1523
+ [ cross-signing data] ( #cross-signing ) .
1524
+ * [ Populate their key backup] ( #server-side-key-backups ) .
1525
+ * [ Leave rooms and reject invites] ( #post_matrixclientv3roomsroomidleave ) .
1526
+ * [ Redact] ( #redactions ) their own events.
1527
+ * [ Log out] ( #post_matrixclientv3logout ) or [ delete] ( #delete_matrixclientv3devicesdeviceid )
1528
+ any device of theirs, including the current session.
1529
+ * [ Deactivate] ( #post_matrixclientv3accountdeactivate ) their account, potentially
1530
+ with a time delay to discourage making a new account right away.
1531
+ * Change or add [ admin contacts] ( #adding-account-administrative-contact-information ) ,
1532
+ but not remove. Servers are recommended to only permit this if they keep a
1533
+ changelog on contact information to prevent misuse.
1534
+
1535
+ General purpose endpoints like [ ` /send/{eventType} ` ] ( #put_matrixclientv3roomsroomidsendeventtypetxnid )
1536
+ MAY return the error described below depending on the path parameters. For example,
1537
+ a user may be allowed to send ` m.room.redaction ` events but not ` m.room.message `
1538
+ events through ` /send ` .
1539
+
1540
+ Where a room is used to maintain communication between server administration
1541
+ teams and the suspended user, servers are recommended to allow the user to send
1542
+ events to that room specifically. Server administrators which do not want the
1543
+ user to continue receiving messages may be interested in [ account locking] ( #account-locking )
1544
+ instead.
1545
+
1546
+ Otherwise, the recommended set of explicitly forbidden actions is:
1547
+
1548
+ * [ Joining] ( #joining-rooms ) or [ knocking] ( #knocking-on-rooms ) on rooms.
1549
+ * Accepting or sending [ invites] ( #room-membership ) .
1550
+ * [ Sending messages] ( #put_matrixclientv3roomsroomidsendeventtypetxnid ) to rooms.
1551
+ * Changing [ profile data] ( #profiles ) (display name and avatar, primarily).
1552
+ * [ Redacting] ( #redactions ) other users' events, when permission is possible in a room.
1553
+
1554
+ When a client attempts to perform an action while suspended, the server MUST
1555
+ respond with a ` 403 Forbidden ` error response with ` M_USER_SUSPENDED ` as the
1556
+ error code, as shown below:
1557
+
1558
+ ```
1559
+ HTTP/1.1 403 Forbidden
1560
+ Content-Type: application/json
1561
+ ```
1562
+
1563
+ ``` json
1564
+ {
1565
+ "errcode" : " M_USER_SUSPENDED" ,
1566
+ "error" : " You cannot perform this action while suspended."
1567
+ }
1568
+ ```
1569
+
1570
+ APIs for initiating suspension or unsuspension are not included in this version
1571
+ of the specification, and left as an implementation detail.
1572
+
1502
1573
### Adding Account Administrative Contact Information
1503
1574
1504
1575
A homeserver may keep some contact information for administrative use.
0 commit comments