Reply to a Message (Threaded)
The purpose of this method is to enable support of a sub chat within the chat room.
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.
Parameters
Values in the path and query string.
appid path The TalkLabs application ID assigned to your account.
Example:your-app-id roomid path The TalkLabs assigned room ID returned when the room was created.
Example:room-id eventid path The TalkLabs assigned chat event ID.
JSON body
Send as application/json.
userId The customer defined user ID from your application or identity system.
body moderationState customType customId A customer defined ID chosen by your application. TalkLabs stores it so you can retrieve the resource without keeping its TalkLabs ID.
customPayload customField1 customField2 customTags {
"body": "I spy with my little eye an opportunity to post a reply!",
"userId": "u-8842"
} 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 {
"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
}
}