What’s the right way to delete a user via the API without nuking their historical interaction data?
We’re cleaning up a batch of inactive agents. I know I can hit DELETE /api/v2/users/{userId}. But the docs warn that this might affect data integrity for past interactions if not handled right. I don’t want those conversations to become orphaned or show “Unknown User” in the analytics.
I tried a dry run with a test user. The request looks like this:
DELETE /api/v2/users/12345678-1234-1234-1234-123456789012
Authorization: Bearer <token>
Content-Type: application/json
It returns a 204 No Content. Seems clean. But when I query the interaction history for that user ID afterwards, the records are still there. The user object is gone, obviously. But the participant field in the interaction still references the old ID.
Is there a soft delete flag? Or do I need to update the user status to INACTIVE via PATCH first? I’ve seen some posts mention reassigning ownership, but I don’t see an endpoint for that on the user object itself. Just looking for the standard pattern here.