Skip to API content
TalkLabs API Docs v3
Recipes
POST Comments

Vote on Comment

URL Arguments comment conversation id : required The ID of the comment conversation, URL ENCODED.

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

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 Properties

  • vote : (required) Must be one of "up", "down", or "none" (empty value). If up, the comment receives an upvote. If down, the comment receives a down vote. If empty, the vote is removed.
  • userid : (required) The application specific user id performing the action.
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.

vote
string required
userId
string customer-defined required

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

Request example
{
  "vote": "up",
  "userId": "u-8842"
}
Request examples

Common variations

Historical examples filtered through the current request schema.

Vote on Comment (Upvote)
{
  "vote": "up",
  "userId": "u-8842"
}
Vote on Comment (Downvote)
{
  "vote": "down",
  "userId": "u-8842"
}
Vote on Comment (Remove Vote)
{
  "vote": "none",
  "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": "5edfe3e686c2921148f12902",
    "appid": "5ededa7086c2920e6ccc06f8",
    "conversationid": "demo-conversation-id",
    "commenttype": "comment",
    "added": "2020-06-09T19:32:54.9919172Z",
    "modified": "2020-06-09T19:32:54.9919172Z",
    "userid": "u-8842",
    "user": {
      "kind": "app.user",
      "userid": "u-8842",
      "handle": "dave_m",
      "handlelowercase": "georgew",
      "displayname": "Dave M.",
      "pictureurl": "https://example.com/users/u-8842s/photos/original/a9/c7/a6/44-1-george-washington-18-1549729902.jpg",
      "profileurl": "https://example.com/users/u-8842shington",
      "banned": false
    },
    "body": "This is a reply.",
    "originalbody": "",
    "hashtags": [],
    "customtype": "",
    "customid": null,
    "custompayload": "",
    "customtags": [],
    "customfield1": "",
    "customfield2": "",
    "edited": false,
    "censored": false,
    "deleted": false,
    "parentid": "5edfe3da86c2921148f12901",
    "hierarchy": [
      "5edfe3da86c2921148f12901"
    ],
    "mentions": [],
    "reactions": [
      {
        "type": "like",
        "count": 1,
        "users": [
          {
            "userid": "u-8842",
            "handle": "dave_m",
            "displayname": "Dave M."
          }
        ]
      }
    ],
    "likecount": 1,
    "replycount": 0,
    "votecount": 1,
    "votescore": 1,
    "votes": [
      {
        "type": "up",
        "count": 1,
        "users": [
          {
            "userid": "u-8842",
            "handle": "dave_m",
            "displayname": "Dave M."
          }
        ]
      }
    ],
    "moderation": "na",
    "active": true,
    "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.