C
Chatty

Clear a Session

DELETE/api/v1/conversations/{session_id}

Permanently deletes all messages in the given session. The next message sent with the same session_id starts a fresh conversation.

Required scope: write

This operation is irreversible. All messages in the session are permanently deleted.

Path parameters

session_idstringpathrequired
The session to clear.

Response

successboolean
Always true.
session_idstring
The session that was cleared.
deletedboolean
Always true.

Example

cURL
curl -X DELETE \
  "https://api.personaliai.com/api/v1/conversations/visitor-xyz-789" \
  -H "Authorization: Bearer chatty_sk_your_key"

200 OK:

{ "success": true, "session_id": "visitor-xyz-789", "deleted": true }

Use cases

  • GDPR / privacy — delete a specific user's conversation history on request
  • Demo resets — clear a test session between automated runs
  • Fresh start — allow a visitor to restart their conversation