curl --request DELETE \
--url https://api.yourdomain.com/api/chats/chat_123abc/messages/msg_456def \
--header 'Authorization: Bearer <token>'
const chatId = 'chat_123abc';
const messageId = 'msg_456def';
const response = await fetch(
`https://api.yourdomain.com/api/chats/${chatId}/messages/${messageId}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
chat_id = "chat_123abc"
message_id = "msg_456def"
url = f"https://api.yourdomain.com/api/chats/{chat_id}/messages/{message_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Message deleted successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Message not found"
}
Messages
Delete Message
Deletes a specific message from a chat
DELETE
/
api
/
chats
/
{chatId}
/
messages
/
{messageId}
curl --request DELETE \
--url https://api.yourdomain.com/api/chats/chat_123abc/messages/msg_456def \
--header 'Authorization: Bearer <token>'
const chatId = 'chat_123abc';
const messageId = 'msg_456def';
const response = await fetch(
`https://api.yourdomain.com/api/chats/${chatId}/messages/${messageId}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
chat_id = "chat_123abc"
message_id = "msg_456def"
url = f"https://api.yourdomain.com/api/chats/{chat_id}/messages/{message_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Message deleted successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Message not found"
}
Path Parameters
string
required
Chat ID containing the message
string
required
Message ID to delete
Response
boolean
Indicates if the message was deleted successfully
string
Success or error message
curl --request DELETE \
--url https://api.yourdomain.com/api/chats/chat_123abc/messages/msg_456def \
--header 'Authorization: Bearer <token>'
const chatId = 'chat_123abc';
const messageId = 'msg_456def';
const response = await fetch(
`https://api.yourdomain.com/api/chats/${chatId}/messages/${messageId}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
chat_id = "chat_123abc"
message_id = "msg_456def"
url = f"https://api.yourdomain.com/api/chats/{chat_id}/messages/{message_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Message deleted successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Message not found"
}
Notes
Deleting a message is irreversible and will also remove any associated votes.
⌘I

