Ban a person
/api/moderation/banWorks on anybody, member or not: VRChat's group ban takes a user id, so somebody who has never joined can be kept out before they arrive. A person Modbot has never seen is recorded as a person by the ban, and their profile is fetched afterwards. A reason is required, and the ban's case file is written from it and the note. Nothing is recorded as done unless VRChat accepted it. When Discord is set up and the person has linked their Discord account, that account is banned too, whatever the ban sync switches say; if Discord refuses, the VRChat ban stands and the answer says what Discord said. The key makes one confirmation act once.
Needs the Ban permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/moderation/ban" \ -H "Content-Type: application/json" \ -d '{ "userId": "string", "key": "string" }'{ "action": "string", "userId": "string", "done": true, "at": "2019-08-24T14:15:22Z", "caseId": null, "error": null, "rateLimited": true, "repeat": true, "gone": false, "missingGroupPermission": null, "discordDone": false, "discordError": null, "caseFileError": null}Kick a person POST
Only somebody who is in the group can be kicked out of it; VRChat answers a kick of anybody else with "they are not in the group". Nothing is recorded as done unless VRChat accepted it. A reason is optional unless the group has asked for one. The key makes one confirmation act once: send the same key again and you get the first answer back, not a second kick. Needs the `Kick` permission.
Unban a person POST
There has to be a ban to lift; VRChat answers an unban of anybody who is not banned with "they are not banned". Nothing is recorded as done unless VRChat accepted it. A reason is optional unless the group has asked for one. When the person has a linked Discord account, its ban is lifted too. The key makes one confirmation act once. Needs the `Unban` permission.