Skip to API content
TalkLabs API Docs v3
Recipes
POST Comments

Reply to Comment

The reply to comment method is the same as the create comment method, except you pass in the ID of the parent comment using the replyto field.

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

The reply to comment method is the same as the create comment method, except you pass in the ID of the parent comment using the replyto field.
See WEBHOOKS SERVICE API for information on receiving a notification when someone replies to a comment.
See documentation on Create and Publish Comment

URL Arguments

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

  • comment_comment_id : (required) The unique ID of the comment we will reply to.

BODY Parameters

  • userid : (required) The application's userid representing the user who submitted the comment

  • body : (required) The body of the reply (what the user is saying). Supports unicode characters including EMOJIs and international characters.

  • added: (optional) If this timestamp is provided (in Unix time format, for example 1588106064 (Tue Apr 28 2020 16:34:24 GMT-0400)) then the created timestamp of the conversation is overriden. Use this only to import data.

OPTIONAL BODY Properties to Create or Update a User

If the user with matching userid does not exist, the user will be created. If the user does exist, that user will be updated with whatever values you provide from this list

  • userid: Required. If the userid is new then the user will be created. If the userid is already in use in the database then the user will be updated.

  • handle: (Optional) If you are creating a user and you don't specify a handle, the system will generate one for you (using Display Name as basis if you provide that). If you request a handle and it's already in use a new handle will be generated for you and returned. Handle is an easy to type unique identifier for a user, for example @GeorgeWashington could be the handle but Display Name could be "da prez numero uno".

  • displayname: Optional. This is the desired name to display, typically the real name of the person.

  • pictureurl: Optional. The URL to the picture for this user.

  • profileurl: Optional. The profileurl for this user.

  • displayname : (required if creating a new user, otherwise optional) The non-unique name to display when showing the user's name

  • pictureurl : (optional) A URL to the user's photo

  • profileurl : (optional) A URL to the user's profile

  • customid : (optional) 250 characters for a custom ID for your app. This field is indexed for high performance object retrieval.

  • customtype : (optional) Custom type string.

  • custompayload : (optional) Custom payload string.

  • customfield1 : (optional) User custom field 1. Store any string value you want here, limit 1024 bytes.

  • customfield2 : (optional) User custom field 2. Store any string value you want here, limit 1024 bytes.

  • customtags : (optional) A comma delimited list of tags

RESPONSE CODES

  • 200 | OK : Sweet, sweet success.

  • 204 | NoContent : The content was blocked because it contained profanity and filtermode was set to 'block'. Can also be returned if content is too short.

  • 400 | BadRequest : Something is wrong with your request. View response message and errors list for details.

  • 403 | Forbidden : The userid issuing the request is banned from commenting.

  • 409 | Conflict : The customid of your event is already in use.

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.

userId
string customer-defined required

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

body
string required
added
string · date-time
commentType
integer · int32
customType
string
customId
string customer-defined

A customer defined ID chosen by your application. TalkLabs stores it so you can retrieve the resource without keeping its TalkLabs ID.

customPayload
string
customField1
string
customField2
string
customTags
string[]
handle
string
displayName
string
pictureUrl
string
profileUrl
string
role
integer · int32
userCustomTags
string[]
Request example
{
  "body": "This is a reply.",
  "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": "Success",
  "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": "",
    "custompayload": "",
    "customtags": [],
    "customfield1": "",
    "customfield2": "",
    "edited": false,
    "censored": false,
    "deleted": false,
    "parentid": "5edfe3da86c2921148f12901",
    "hierarchy": [
      "5edfe3da86c2921148f12901"
    ],
    "mentions": [],
    "reactions": [],
    "likecount": 0,
    "replycount": 0,
    "votecount": 0,
    "votescore": 0,
    "votes": [],
    "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.