Skip to API content
TalkLabs API Docs v3
Recipes
POST Chat

Reply to a Message (Threaded)

The purpose of this method is to enable support of a sub chat within the chat room.

POST /api/v3/{appid}/chat/rooms/{roomid}/events/{eventid}/reply

The purpose of this method is to enable support of a sub-chat within the chat room. You can use it to split off the conversation into a nested conversation. You can build a tree structure of chat messages and replies, but it is recommended not to build experiences deeper than parent and child conversation level or it becomes complex for the users to follow.

  • Replies do not support admin or action commands

URL PARAMETERS

  • appid : (required) The ID of your application
  • chatroomid : (required) The ID of your chat room
  • eventid : (required) The ID of the event you are quoting

BODY PARAMETERS

  • userid : (Required) The userid of the user who is publishing the quoted reply
  • body : (Required) The contents of the reply for the quoted reply. Cannot be empty.
  • customid: (Optional) Assigns a custom ID to the quoted reply event.
  • custompayload: (Optional) Attach a custom payload string to the quoted reply such as JSON or XML.
  • customfield1: (Optional) Use this field however you wish
  • customfield2: (Optional) Use this field however you wish
  • customtags: (Optional) An array of strings, use this field however you wish.
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
eventid path
string TalkLabs ID required

The TalkLabs assigned chat event 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
moderationState
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[]
Request example
{
  "body": "I spy with my little eye an opportunity to post 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": "",
  "errors": {},
  "data": {
    "kind": "chat.executecommand",
    "op": "speech",
    "room": {
      "kind": "chat.room",
      "id": "5ec3c1945617e21bd8c5567b",
      "appid": "5ebbe03d5617e00de4b044c2",
      "ownerid": "userid_abe",
      "name": "ROOM HAS NEW NAME",
      "description": "Live from the top of the Empire State Building",
      "customtype": "",
      "customid": "new-york-city-club",
      "custompayload": "",
      "customtags": [],
      "customfield1": "",
      "customfield2": "",
      "enableactions": true,
      "enableenterandexit": true,
      "open": true,
      "inroom": 1,
      "added": "2020-05-19T11:23:00.3049587Z",
      "whenmodified": "2020-05-20T03:54:04.4814629Z",
      "moderation": "post",
      "maxreports": 0,
      "enableprofanityfilter": true,
      "delaymessageseconds": 0
    },
    "speech": {
      "kind": "chat.event",
      "id": "5ec4aa755617e40ed4e82ab2",
      "roomid": "5ec3c1945617e21bd8c5567b",
      "body": "This is my reply↵",
      "added": "2020-05-20T03:56:37.4495882Z",
      "ts": 637255437974495900,
      "eventtype": "reply",
      "userid": "userid_abe",
      "user": {
        "kind": "app.user",
        "userid": "userid_abe",
        "handle": "HonestAbe",
        "handlelowercase": "honestabe",
        "displayname": "Abraham Lincoln",
        "pictureurl": "https://www.biography.com/.image/ar_1:1%2Cc_fill%2Ccs_srgb%2Cg_face%2Cq_auto:good%2Cw_300/MTU5MDUzMTE0Mzk2MTI0OTUy/abraham-lincoln-1809---18652c-sixteenth-president-of-the-united-states-of-america-photo-by-stock-montagestock-montagegetty-images_promo.jpg",
        "profileurl": "https://www.biography.com/us-president/abraham-lincoln",
        "banned": false
      },
      "customtype": "",
      "customid": null,
      "custompayload": "",
      "customtags": [],
      "customfield1": "",
      "customfield2": "",
      "replyto": {
        "kind": "chat.event",
        "id": "5ec4aa385617e40ed4e82aaf",
        "roomid": "5ec3c1945617e21bd8c5567b",
        "body": "Hello a second time!",
        "added": "2020-05-20T03:55:36.9845354Z",
        "ts": 637255437369845400,
        "eventtype": "speech",
        "userid": "userid_abe",
        "user": {
          "kind": "app.user",
          "userid": "userid_abe",
          "handle": "HonestAbe",
          "handlelowercase": "honestabe",
          "displayname": "Abraham Lincoln",
          "pictureurl": "https://www.biography.com/.image/ar_1:1%2Cc_fill%2Ccs_srgb%2Cg_face%2Cq_auto:good%2Cw_300/MTU5MDUzMTE0Mzk2MTI0OTUy/abraham-lincoln-1809---18652c-sixteenth-president-of-the-united-states-of-america-photo-by-stock-montagestock-montagegetty-images_promo.jpg",
          "profileurl": "https://www.biography.com/us-president/abraham-lincoln",
          "banned": false
        },
        "customtype": "",
        "customid": null,
        "custompayload": "",
        "customtags": [],
        "customfield1": "",
        "customfield2": "",
        "replyto": null,
        "parentid": "",
        "hierarchy": [],
        "edited": false,
        "deleted": false,
        "active": true,
        "mutedby": [],
        "shadowban": false,
        "hashtags": [],
        "likecount": 0,
        "replycount": 0,
        "reactions": [
          {
            "type": "like",
            "count": 1,
            "users": [
              {
                "userid": "userid_abe",
                "handle": "HonestAbe",
                "displayname": "Abraham Lincoln"
              }
            ]
          }
        ],
        "moderation": "na",
        "reports": []
      },
      "parentid": "",
      "hierarchy": [],
      "edited": false,
      "deleted": false,
      "active": true,
      "mutedby": [],
      "shadowban": false,
      "hashtags": [],
      "likecount": 0,
      "replycount": 0,
      "reactions": [],
      "moderation": "na",
      "reports": []
    },
    "action": null
  }
}
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.