curl --request DELETE \
--url https://api.yourdomain.com/api/chats/chat_123abc \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Chat deleted successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Chat not found"
}
Chat Management
Delete Chat
Deletes a specific chat and all associated data for the authenticated user
DELETE
/
api
/
chats
/
{id}
curl --request DELETE \
--url https://api.yourdomain.com/api/chats/chat_123abc \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Chat deleted successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Chat not found"
}
Path Parameters
string
required
Chat ID to delete
Response
boolean
Indicates if the chat was deleted successfully
string
Success or error message
curl --request DELETE \
--url https://api.yourdomain.com/api/chats/chat_123abc \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Chat deleted successfully"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Chat not found"
}
Notes
This action is irreversible. Deleting a chat will also delete:
- All messages in the chat
- All votes associated with messages
- All streams created for the chat
- Any other associated data
⌘I

