Open app
Moonborn — API · chat

End and hard-delete a session (messages + memory chunks)

Removes the session row, its messages, and any distilled memory chunks. Audit-log entries are retained per `engine.audit.retention_days` config.

DELETE/v1/chat/sessions/{id}scope · Bearer (API key or session JWT)
Path parameters
FieldTypeDescription
idreqstringChat session id (e.g. `chs_*`).

Responses

204Deleted (no content)
401Unauthenticated
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
404Session not found
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X DELETE https://api.moonborn.co/v1/chat/sessions/<id> \
  -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';

const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });

const result = await client.chat.deleteChatSession({
  id: '<id>',
});
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.chat.delete_chat_session(
    id="<id>",
)