Deleting user via API causes historical interaction data loss in reporting queries

Having some issues getting my configuration to work… I am attempting to automate the offboarding process for our CXone instance using a Python script that leverages the Users & Groups API. The specific requirement is to remove a user from the active directory without corrupting or deleting their historical interaction data, which is critical for our OData reporting dashboards and Power BI integrations.

I am currently using the DELETE /api/v2/users/{userId} endpoint. Based on the documentation, this should simply deactivate the user or remove them from the active roster, but it seems to have a cascading effect on the analytics tables. When I run a subsequent OData query against /api/v2/analytics/conversations/details/query, the interactions previously attributed to this user are either missing or the ownerId is nullified, breaking our historical trend analysis.

Here is the JSON payload I am sending in the request body (though DELETE usually doesn’t require one, I am explicitly sending an empty object to ensure no side effects):

{}

The API call returns a 204 No Content status code, indicating success. However, when I verify the data integrity using the following OData filter:

$filter=ownerId eq '12345-abcd-6789' and timestamp ge 2023-01-01T00:00:00.000Z

The result set is empty immediately after the deletion. I need a way to mark the user as inactive or archived via the API so they cannot log in, but their historical data remains intact and queryable. Is there a different endpoint, such as updating the user’s status via PUT /api/v2/users/{userId} with a specific status field, that achieves this without the destructive nature of the DELETE verb? Or is there a flag I am missing in the deletion request?