Skip to main content
PATCH
/
:projectId
/
api
/
v7
/
conversations
/
:conversationId
/
messages
/
:messageId
Edit Message
curl --request PATCH \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "gif": "<string>",
  "mentions": [
    {}
  ],
  "metadata": {}
}
'
Updates the content, GIF, mentions, or metadata of an existing message. Only the message author can edit their own messages. Deleted or moderator-removed messages cannot be edited. If no fields actually changed, the endpoint returns the current message without updating editedAt.

Path Parameters

conversationId
string
required
The ID of the conversation.
messageId
string
required
The ID of the message to edit.

Body Parameters

All fields are optional. Only provided fields are updated.
content
string
New text content. After editing, the message must still have at least one of: content, GIF, or an attached file.
gif
string
Updated GIF URL. Set to null to remove the GIF.
mentions
array
Updated array of Mention objects.
metadata
object
Updated metadata.

Response

Returns the updated ChatMessage, with editedAt set to the current time.

Error Responses

{ "error": "You are not a member of this conversation.", "code": "chat/not-a-member" }
{ "error": "Message not found.", "code": "chat/message-not-found" }
{ "error": "Only the message author can edit this message.", "code": "chat/forbidden" }
{ "error": "Deleted messages cannot be edited.", "code": "chat/message-deleted" }
{ "error": "Removed messages cannot be edited.", "code": "chat/message-removed" }
{ "error": "Edited message must have at least content, a GIF, or a file.", "code": "chat/empty-message" }