diff --git a/proposals/4260-report-user.md b/proposals/4260-report-user.md index f93446f79..9f7803d15 100644 --- a/proposals/4260-report-user.md +++ b/proposals/4260-report-user.md @@ -18,7 +18,7 @@ a new endpoint is introduced: ``` POST /_matrix/client/v3/users/:userId/report { - "reason": "" + "reason": "" } ``` @@ -36,6 +36,35 @@ successful (`200`) response instead. Like `/report/:eventId`, handling of the report is left as a deliberate implementation detail. +### Examples + +**Note**: Some clients may need to `encodeURIComponent` (or similar) the user ID to use it in a path +parameter. + +``` +POST /_matrix/client/v3/users/@alice:example.org/report +{"reason":"bad person"} + +> 200 OK +> {} +``` + +``` +POST /_matrix/client/v3/users/@alice:example.org/report +{"reason":""} + +> 200 OK +> {} +``` + +``` +POST /_matrix/client/v3/users/@alice:example.org/report +{"reason":""} + +> 404 OK +> {"errcode":"M_NOT_FOUND","error":"User does not exist"} +``` + ## Safety considerations * Server admins may be exposed to harmful content through `reason`. This is an existing issue with