Update Chat Message Content
This API may be used to update the body of an existing Chat Event.
This API may be used to update the body of an existing Chat Event. It is used to enable the user to edit the message after it is published. This may only be used with MESSAGE event types (speech, quote, reply). When the chat event is updated another event of type "replace" will be emitted with the updated event contents, and the original event will be replaced in future calls to List Event History, Join and List Previous Events. The event will also be flagged as edited by user.
URL Arguments
- roomid : (required) The ID of the chat room conversation
- eventid : (required) The unique ID of the chat event to be edited. This must be a messsage type event (speech, quote or reply).
BODY Properties
- userid : (required) The application specific user ID updating the chat event. This must be the owner of the comment or moderator / admin.
- body : (required) The new body contents of the event.
- customid : (optional) Optionally replace the customid.
- custompayload : (optional) Optionally replace the payload of the event.
- customfield1 : (optional) Optionally replace the customfield1 value.
- customfield2 : (optional) Optionally replace the customfield2 value.
- customtags : (optional) Optionaly replace the custom tags.
The comment will be flagged to indicate that it has been modified.
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 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": "Message has been modified",
"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": "updated",
"errors": {},
"data": {
"kind": "chat.event",
"id": "5ffdaf0586c29a175c6c4702",
"roomid": "5ffdaefc86c29a175c6c46fe",
"body": "Message has been modified",
"originalbody": "",
"added": "2021-01-12T14:15:33.0724021Z",
"modified": "2021-01-20T12:53:06.8107428Z",
"ts": 637460577330724000,
"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,
"shadowbanned": false,
"shadowbanexpires": "0001-01-01T00:00:00Z",
"muted": false,
"moderation": "na",
"reports": []
},
"mentions": [],
"customtype": "",
"customid": null,
"custompayload": "",
"customtags": [],
"customfield1": "",
"customfield2": "",
"replyto": null,
"parentid": "",
"hierarchy": [],
"depth": 0,
"edited": true,
"editedbymoderator": false,
"censored": false,
"deleted": false,
"active": true,
"mutedby": [],
"shadowban": false,
"hashtags": [],
"likecount": 0,
"replycount": 0,
"reactions": [],
"moderation": "na",
"reports": []
}
}