curl -sS -X PUT 'https://matrix.example.com/_synapse/admin/v1/rooms/!abc123:example.com/block' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"block":true}'

Category: Matrix & Synapse

curl -sS -X PUT 'https://matrix.example.com/_synapse/admin/v1/rooms/!abc123:example.com/block' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"block":true}'

Block a room server-wide

Adds the room to a block list so users on your homeserver cannot join it, even pre-emptively for rooms your server has never seen. Unblock with {"block":false} on the same endpoint, and check the current state with the GET variant. Blocking is reversible and lighter than deleting the room.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.