Skip to main content
DELETE
/
:projectId
/
api
/
v7
/
conversations
/
:conversationId
/
messages
/
:messageId
Delete Message
curl --request DELETE \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId
Deletes a message. The behavior differs based on who is deleting:
  • Author self-delete: The message is soft-deleted. The row is retained as a [Message deleted] placeholder — content, GIF, mentions, and metadata are cleared, and userDeletedAt is set. File attachments are deleted from storage.
  • Group admin moderation delete: The message is marked moderationStatus: "removed" and excluded from all future queries. Content is not cleared; the record is retained for moderation audit purposes.
The caller must be either the message author or a group admin.

Path Parameters

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

Response

For author self-delete:
{ "message": "Message deleted.", "userDeletedAt": "2025-01-15T10:30:00.000Z" }
For admin moderation:
{ "message": "Message removed by admin." }

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": "You do not have permission to delete this message.", "code": "chat/forbidden" }