curl -X DELETE "https://your-domain.com/api/channels/ch_abc123/delete" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
import requests
response = requests.delete(
"https://your-domain.com/api/channels/ch_abc123/delete",
headers={"Authorization": "Bearer YOUR_TOKEN"}
)
if response.json():
print("Channel deleted successfully")
const response = await fetch(
'https://your-domain.com/api/channels/ch_abc123/delete',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
}
);
const result = await response.json();
if (result) {
console.log('Channel deleted successfully');
}
true
{
"detail": "Not found"
}
{
"detail": "ERROR"
}
{
"detail": "ERROR"
}
Channels
Delete Channel
Delete a channel and all its messages
DELETE
/
api
/
channels
/
{id}
/
delete
curl -X DELETE "https://your-domain.com/api/channels/ch_abc123/delete" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
import requests
response = requests.delete(
"https://your-domain.com/api/channels/ch_abc123/delete",
headers={"Authorization": "Bearer YOUR_TOKEN"}
)
if response.json():
print("Channel deleted successfully")
const response = await fetch(
'https://your-domain.com/api/channels/ch_abc123/delete',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
}
);
const result = await response.json();
if (result) {
console.log('Channel deleted successfully');
}
true
{
"detail": "Not found"
}
{
"detail": "ERROR"
}
{
"detail": "ERROR"
}
Permanently deletes a channel and all associated messages, reactions, and member data. This action cannot be undone.
Authentication
Requires a valid user session. User must be the channel creator or an admin.Path Parameters
string
required
The unique identifier of the channel to delete
Response
Returns a boolean indicating success.boolean
required
true if the channel was deleted successfullycurl -X DELETE "https://your-domain.com/api/channels/ch_abc123/delete" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
import requests
response = requests.delete(
"https://your-domain.com/api/channels/ch_abc123/delete",
headers={"Authorization": "Bearer YOUR_TOKEN"}
)
if response.json():
print("Channel deleted successfully")
const response = await fetch(
'https://your-domain.com/api/channels/ch_abc123/delete',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
}
);
const result = await response.json();
if (result) {
console.log('Channel deleted successfully');
}
true
{
"detail": "Not found"
}
{
"detail": "ERROR"
}
{
"detail": "ERROR"
}
Notes
- Only the channel creator or admins can delete channels
- This action permanently deletes:
- The channel itself
- All messages in the channel
- All message reactions
- All member associations
- All webhooks associated with the channel
- All file associations
- This operation cannot be undone
- Members will be removed from the channel’s socket room automatically