Add ban reason
/api/settings/ban-reasonsAdd a reason to the end of the list.
Needs the EditClassifications 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
curl -X POST "https://example.com/api/settings/ban-reasons" \ -H "Content-Type: application/json" \ -d '{ "label": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": "string", "description": "string", "sortOrder": 0, "isActive": true, "needsWrittenReason": true, "usedFor": [ "string" ]}List ban reasons GET
The reasons a moderator picks from when banning, kicking, unbanning or turning a join request down; usedFor says which actions offer each one. In button order, switched-off ones included with isActive false. Seeded with a plain default set the first time anybody asks, so the first case file can be written without inventing a list first. reasonAlwaysRequired says whether the actions other than a ban need a reason too.
Require a reason on every action PUT
Whether a kick, an unban and turning a join request down each need a reason, as a ban always does (foundation 5.8.1: optional unless the group asks for it). Approving a join request never takes one. Needs the `EditClassifications` permission.