Delete a conversation and its messages
Remove a conversation and every message in it, irreversibly. Only owner and admin may. To move one aside without losing it, archive it instead.
DELETE
/
conversations
/
{conversation_id}
curl --request DELETE "$MITHUNAI_URL/mithunai/api/v1/conversations/c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os, requests
conversation_id = "c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60"
response = requests.delete(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/conversations/{conversation_id}",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.status_code)
const conversationId = 'c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60'
const response = await fetch(
`${process.env.MITHUNAI_URL}/mithunai/api/v1/conversations/${conversationId}`,
{
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
console.log(response.status)
(empty body)
{ "code": "authorization_error", "message": "You do not have permission to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }
Deletion is irreversible. It requires a role that can delete conversations, which only
owner and admin hold; any other role gets 403. To take a conversation out of the way without losing it, archive it instead.
An owner or admin caller can delete any conversation in the organization. A conversation that does not exist, belongs to another organization, or has a malformed ID returns 404.
This works whatever state the conversation’s assistant is in. An assistant that is disabled or archived, or has no knowledge attached, refuses only new questions.
string
required
The conversation ID.
Response
Returns204 No Content with an empty body.
curl --request DELETE "$MITHUNAI_URL/mithunai/api/v1/conversations/c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os, requests
conversation_id = "c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60"
response = requests.delete(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/conversations/{conversation_id}",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.status_code)
const conversationId = 'c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60'
const response = await fetch(
`${process.env.MITHUNAI_URL}/mithunai/api/v1/conversations/${conversationId}`,
{
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
console.log(response.status)
(empty body)
{ "code": "authorization_error", "message": "You do not have permission to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }
Last modified on November 7, 2026
curl --request DELETE "$MITHUNAI_URL/mithunai/api/v1/conversations/c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60" \
--header "Authorization: Bearer $MITHUNAI_API_KEY"
import os, requests
conversation_id = "c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60"
response = requests.delete(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/conversations/{conversation_id}",
headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.status_code)
const conversationId = 'c41f8a2e-6d93-4b0a-b7e5-3f1d2c8a9e60'
const response = await fetch(
`${process.env.MITHUNAI_URL}/mithunai/api/v1/conversations/${conversationId}`,
{
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}` },
},
)
console.log(response.status)
(empty body)
{ "code": "authorization_error", "message": "You do not have permission to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }