🚀 Simplify your work by integrating Haufe Copilot via API
Guides

Data Deletion

How to delete threads and remove user information from Copilot via API.

Calling the DELETE /threads/:thread_id endpoint marks the thread as deleted. The thread becomes inaccessible immediately: a later read returns a ThreadDeactivated error.

Any user information attached to the thread (if provided) is replaced with a generic placeholder. The content of every message in the thread is then redacted: each content field is replaced with <REDACTED>. The message content is gone — it is not pseudonymized, and it cannot be recovered.

Redaction runs in the background, so a 204 No Content confirms that the thread is deleted and the redaction is scheduled, not that it has already finished. It normally follows within seconds. The thread is inaccessible in either case, so the delay is not observable through the API.

The thread and its messages stay in the database so that usage statistics keep working. What remains is the telemetry: the thread, the assistant, the number of messages, and the timestamps.

info

Redaction replaces the earlier behaviour, where a deletion applied an anonymization pass to the thread's messages. An anonymization pass removes identifiers such as names and addresses, but it leaves the surrounding context in place. Redaction removes the content itself.

Redaction keeps the shape of the message intact. A message still returns the same content-block structure with the same block types; only the content fields carry <REDACTED>.

Anonymization still applies to messages in threads you have not deleted, when it is active in the assistant's configuration. For more details on how it works, see Anonymization.

Next Steps

On this page