Skip to API content
TalkLabs API Docs v3
Recipes
POST Moderate chat

Report User In Room

This API enables users to report other users who exhibit abusive behaviors.

POST /api/v3/{appid}/chat/rooms/{roomid}/users/{userid}/report
  • This API enables users to report other users who exhibit abusive behaviors. It enables users to silence another user when a moderator is not present. If the user receives too many reports in a trailing 24 hour period, the user will become flagged at the room level.

  • This API moderates users on the ROOM LEVEL. If a There is an API method that enable reporting users at the global user level which impacts all rooms. This API impacts only the experience for the specified userid within the specified room.

  • This API will return an error (see responses below) if user reporting is not enabled for your application in the application settings by setting User Reports limit to a value > 0.

  • A user who is flagged will have the shadowban effect applied.

URL Arguments

  • userid : (required) The ID of the user who is being reported, URL ENCODED.

BODY Parameters

  • reporttype : (required) Possible values: "abuse", "spam". SPAM is unsolicited commercial messages and abuse is hate speach or other unacceptable behavior, 'false' represents information considered false by the reporter:

    • abuse

    • spam

    • selfharm

    • hate

    • violence

    • harassment

    • nudity

    • illegal

    • false

    • other

RESPONSES:

Code Meaning Description
200 OK Request completed successfully (or duplicate report ignored)
404 Not Found The specified user or application or room could not be found
412 Precondition Failed The request was rejected because user reporting is not enabled for the application.
Request

Parameters

Values in the path and query string.

appid path
string TalkLabs ID required

The TalkLabs application ID assigned to your account.

Example: your-app-id
roomid path
string TalkLabs ID required

The TalkLabs assigned room ID returned when the room was created.

Example: room-id
userid path
string customer-defined required

The customer defined user ID from your application or identity system.

Example: u-8842
Request

JSON body

Send as application/json.

reportType
integer · int32 required
userId
string customer-defined required

The customer defined user ID from your application or identity system.

Request example
{
  "reportType": {},
  "userId": "u-8842"
}
Response

Status codes

Every JSON response uses the API result envelope.

200 OK ApiResult
400 Bad Request ApiResult
403 Forbidden ApiResult
404 Not Found ApiResult
409 Conflict ApiResult
500 Internal Server Error ApiResult
Example response · 200
{
  "message": "",
  "errors": {},
  "data": {
    "kind": "chat.room",
    "id": "5fda771e91dfe04208da0295",
    "appid": "5fd60d0191dfe07304adde1a",
    "ownerid": null,
    "name": "New York City Chat (Post-Moderated)",
    "description": "Live from the top of the Empire State Building",
    "pictureurl": "",
    "customtype": "",
    "customid": "new-york-city-club",
    "custompayload": "",
    "customtags": [],
    "customfield1": "",
    "customfield2": "",
    "enableactions": true,
    "enableenterandexit": true,
    "open": true,
    "inroom": 8,
    "added": "2020-12-16T21:07:42.4358144Z",
    "whenmodified": "2021-02-11T13:59:43.2118834Z",
    "moderation": "post",
    "maxreports": 0,
    "enableprofanityfilter": true,
    "delaymessageseconds": 0,
    "bouncedusers": [],
    "flaggedusers": [
      "u-8842"
    ],
    "shadowbannedusers": [],
    "reportedusers": [
      {
        "userid": "u-8842",
        "reportedbyuserid": "userid_abelincoln",
        "reason": "abuse",
        "added": "2021-02-11T13:59:43.1969243Z"
      }
    ]
  }
}
Search all 118 endpoints Try “join room”, “moderate”, or “POST”.
Request environment

Connect your application

These values fill request examples and the API console. They stay in this browser tab and are never sent to TalkLabs until you run a request.

Credentials are stored in sessionStorage, not in cookies or analytics.