Deleting users via API without nuking historical data in Genesys

We’re trying to automate user cleanup with Terraform, but the docs are vague on whether DELETE /api/v2/users/{id} actually removes interaction history or just soft-deletes the account. We tried it on a sandbox user and the calls still showed up under the old name in the dashboard, which is weird. Is there a specific flag or separate endpoint to purge the history before deleting the user? Or does the API just handle this gracefully? Here’s the snippet we’re using:

resource "genesyscloud_user" "temp_user" {
 name = "Temp User"
 email = "temp@example.com"
}

Any insights?

Are you using a service account or admin token for that delete?

The DELETE call only soft-deletes the user record. It never touches interaction history. Calls stay linked to the user ID, not the name. That’s why the dashboard still shows them.

You don’t need a purge endpoint. Just leave the history alone. The user disappears from active lists, but analytics keep the data intact. That’s by design for compliance.