Skip to main content
Permanently delete multiple chat conversations and all associated messages. This action cannot be undone. Partial success is allowed — chats that exist are deleted even if some IDs are not found. The endpoint always returns 200 with a breakdown of which IDs were deleted and which were not found.
Authorization
string
required
Bearer token obtained from the authenticate endpoint.
chat_ids
string[]
required
List of chat IDs to delete. Must not be empty.

Response

deleted
string[]
required
List of chat IDs that were successfully deleted.
not_found
string[]
required
List of chat IDs that were not found (invalid UUIDs or belonging to another user).
deleted_count
integer
required
Number of chats that were successfully deleted.
curl -X DELETE https://api.trellis.sh/v1/chats \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"chat_ids": ["chat_abc123", "chat_def456", "chat_invalid"]}'
{
  "deleted": ["chat_abc123", "chat_def456"],
  "not_found": ["chat_invalid"],
  "deleted_count": 2
}