Delete Message
curl --request DELETE \
--url https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageIdimport requests
url = "https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_bodyChat — Messages
Delete Message
Delete or moderate a chat message
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/:messageIdimport requests
url = "https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/api/v7/conversations/:conversationId/messages/:messageId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_bodyDeletes a message. The behavior differs based on who is deleting:
For admin moderation:
- Author self-delete: The message is soft-deleted. The row is retained as a
[Message deleted]placeholder — content, GIF, mentions, and metadata are cleared, anduserDeletedAtis 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.
admin.
Path Parameters
string
required
The ID of the conversation.
string
required
The ID of the message to delete.
Response
For author self-delete:{ "message": "Message deleted.", "userDeletedAt": "2025-01-15T10:30:00.000Z" }
{ "message": "Message removed by admin." }
Error Responses
Forbidden — 403 (not a member)
Forbidden — 403 (not a member)
{ "error": "You are not a member of this conversation.", "code": "chat/not-a-member" }
Not Found — 404
Not Found — 404
{ "error": "Message not found.", "code": "chat/message-not-found" }
Forbidden — 403 (no permission)
Forbidden — 403 (no permission)
{ "error": "You do not have permission to delete this message.", "code": "chat/forbidden" }

