Skip to content

Latest commit

 

History

History
82 lines (62 loc) · 1.96 KB

File metadata and controls

82 lines (62 loc) · 1.96 KB

Report User

Report a user.

URL Requires Auth HTTP Method
/api/v1/moderation.reportUser yes POST

Payload

Argument Example Required Description
userId ByehQjC44FwMeiLbX Required The id of the user to be reported.
description test Required The reason for reporting the user.

Example Payload

{
    "userId":"kdgf7sgLvwBri9rtA",
    "description":"Verbal abuse"

}

Example Call

curl --location "http://localhost:3000/api/v1/moderation.reportUser" \
--header 'x-auth-token: _209_8t5fK_W1tEMyFwWZCXR44QOWjgdSJ8Hg6oX3ns' \
--header 'x-user-id: rmbMnnpqkuxEbrajt' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
    "userId":"BgJxHCKughQrg3TZP",
    "description":"Verbal abuse"

}'

Example Result

Success

{
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.
  • Invalid UserId: Occurs when the userId is invalid or does not belong to any user in the workspace.

{% tabs %} {% tab title="Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="Invalid UserId" %}

{
    "success": false,
    "error": "Invalid user id provided."
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.4.0 Added