DELETE /api/v2/users/{userId} causing data loss in historical interactions?

Running into a weird issue with the Users API. We have a cleanup script that uses DELETE /api/v2/users/{userId} to remove inactive agents. The call returns 204 No Content, which is expected. But when we run reports on historical interactions later, the agent name shows up as null or ‘Unknown User’ instead of the actual name.

I checked the interaction objects via GET /api/v2/analytics/interactions/summary. The userId is still there, but the displayName is gone. It seems deleting the user removes the reference data that the analytics layer uses to resolve the name.

We need to keep the historical data intact with the correct agent names for compliance. Is there a way to delete the user without breaking this link? Or should I be using a different approach, like deactivating them via PATCH /api/v2/users/{userId} with a specific status? I’ve tried setting the state to ‘inactive’ but the API still returns 400 if I don’t provide valid credentials or something.

Here is the curl command I’m using for deletion:

curl -X DELETE https://{{env}}.api.nice-incontact.com/api/v2/users/{{userId}}
-H ‘Authorization: Bearer {{token}}’

Any ideas on how to preserve the user metadata in historical records while removing the active login?