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

Flag Comment

This operation immediately sets a comment to the flagged state.

POST /api/v3/{appid}/comment/conversations/{conversationid}/comments/{commentid}/flag

This operation immediately sets a comment to the flagged state. It is intended for use by moderators who are human or AI. This API doesn't take into consideration the report limit of the conversation, or the history of the comment, it immediately sets it to flagged.

URL Arguments

  • comment_conversation_id : (required) The ID of the comment conversation, URL ENCODED.

  • comment_comment_id : (required) The unique ID of the comment, URL ENCODED.

BODY Parameters

  • reporttype: ("abuse" or "spam")

  • userid : (optional) This is the application specific user ID of the user reporting the comment.

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
conversationId path
string TalkLabs ID required

The TalkLabs assigned conversation ID.

Example: conversation-id
commentId path
string TalkLabs ID required

The TalkLabs assigned comment ID.

Example: comment-id
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
500 Internal Server Error ApiResult
Example response · 200
{
  "message": "",
  "errors": {},
  "data": {
    "kind": "comment.comment",
    "id": "666ee62cae246d237ad3f1d1",
    "appid": "662bb49bf10e9a26a7e8ed92",
    "conversationid": "api-conversation-demo1",
    "commenttype": "comment",
    "added": "2024-06-16T13:18:36.2221886Z",
    "modified": "2024-06-16T13:18:36.2216101Z",
    "tsunix": 1718543916,
    "userid": "u-8842",
    "user": {
      "kind": "app.user",
      "userid": "u-8842",
      "handle": "dave_m",
      "handlelowercase": "georgew",
      "displayname": "Thomas Jefferson",
      "pictureurl": "",
      "profileurl": "",
      "role": "admin",
      "customtags": [
        "taga",
        "tagb"
      ],
      "banned": false,
      "banexpires": "0001-01-01T00:00:00Z",
      "shadowbanned": false,
      "shadowbanexpires": "0001-01-01T00:00:00Z",
      "muted": false,
      "muteexpires": "0001-01-01T00:00:00Z",
      "moderation": "na",
      "reports": []
    },
    "body": "Hello, World! This is a comment with international characters and emojis. Intl: äöüÄÖÜß | Emojis: 😂🤣❤😍😒",
    "originalbody": "",
    "hashtags": [],
    "shadowban": false,
    "customtype": "my-custom-type",
    "customid": null,
    "custompayload": "{ num : 0 }",
    "customtags": [
      "taga",
      "tagb"
    ],
    "customfield1": "/sample/userdefined1/emojis/😂🤣❤😍😒",
    "customfield2": "/sample/userdefined2/intl/characters/äöüÄÖÜß",
    "edited": false,
    "censored": false,
    "deleted": false,
    "parentid": "",
    "hierarchy": [],
    "mentions": [],
    "reactions": [],
    "likecount": 0,
    "replycount": 0,
    "votecount": 0,
    "votescore": 0,
    "votes": [],
    "moderation": "flagged",
    "active": false,
    "reports": []
  }
}
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.