Newer
Older
A shadow-banned user will be unable to contact anyone on the server.
To shadow-ban a user the API is:
```
POST /_synapse/admin/v1/users/<user_id>/shadow_ban
```
To un-shadow-ban a user the API is:
```
DELETE /_synapse/admin/v1/users/<user_id>/shadow_ban
```
An empty JSON dict is returned in both cases.
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
**Parameters**
The following parameters should be set in the URL:
- `user_id` - The fully qualified MXID: for example, `@user:server.com`. The user must
be local.
## Override ratelimiting for users
This API allows to override or disable ratelimiting for a specific user.
There are specific APIs to set, get and delete a ratelimit.
### Get status of ratelimit
The API is:
```
GET /_synapse/admin/v1/users/<user_id>/override_ratelimit
```
A response body like the following is returned:
```json
{
"messages_per_second": 0,
"burst_count": 0
}
```
**Parameters**
The following parameters should be set in the URL:
- `user_id` - The fully qualified MXID: for example, `@user:server.com`. The user must
be local.
**Response**
The following fields are returned in the JSON response body:
- `messages_per_second` - integer - The number of actions that can
be performed in a second. `0` mean that ratelimiting is disabled for this user.
- `burst_count` - integer - How many actions that can be performed before
being limited.
If **no** custom ratelimit is set, an empty JSON dict is returned.
```json
{}
```
### Set ratelimit
The API is:
```
POST /_synapse/admin/v1/users/<user_id>/override_ratelimit
```
A response body like the following is returned:
```json
{
"messages_per_second": 0,
"burst_count": 0
}
```
**Parameters**
The following parameters should be set in the URL:
- `user_id` - The fully qualified MXID: for example, `@user:server.com`. The user must
be local.
Body parameters:
- `messages_per_second` - positive integer, optional. The number of actions that can
be performed in a second. Defaults to `0`.
- `burst_count` - positive integer, optional. How many actions that can be performed
before being limited. Defaults to `0`.
To disable users' ratelimit set both values to `0`.
**Response**
The following fields are returned in the JSON response body:
- `messages_per_second` - integer - The number of actions that can
be performed in a second.
- `burst_count` - integer - How many actions that can be performed before
being limited.
### Delete ratelimit
The API is:
```
DELETE /_synapse/admin/v1/users/<user_id>/override_ratelimit
```
An empty JSON dict is returned.
```json
{}
```
**Parameters**
The following parameters should be set in the URL:
- `user_id` - The fully qualified MXID: for example, `@user:server.com`. The user must
be local.
### Check username availability
Checks to see if a username is available, and valid, for the server. See [the client-server
API](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available)
for more information.
This endpoint will work even if registration is disabled on the server, unlike
`/_matrix/client/r0/register/available`.
The API is:
```

Stanislav Motylkov
committed
GET /_synapse/admin/v1/username_available?username=$localpart
The request and response format is the same as the
[/_matrix/client/r0/register/available](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available) API.