Could someone explain why deleting a user via DELETE /api/v2/users/{id} nullifies their historical interaction data in my ETL pipeline? I need to offboard an agent without losing the analytics history tied to their ID.
The pandas merge fails because the user_id becomes null after the API call. I cannot find a soft-delete option or a way to reassign historical data programmatically. What is the correct API workflow to preserve data integrity?
The root cause here is the hard-delete semantics of DELETE /api/v2/users/{id}, which cascades nulls to relational fields in analytics exports. Do not delete the resource if you need referential integrity for historical reporting.
Disable the user and clear their routing state instead. Use PUT /api/v2/users/{id} with "state": "inactive" and "routing": { "type": "unavailable" } to preserve the ID in your ETL joins.
{
"state": "inactive",
"routing": {
"type": "unavailable"
}
}
this looks like exactly what i saw with my pagerduty webhooks. disabling the user via put /api/v2/users/{id} with state: inactive works perfectly for keeping the id intact in analytics exports. no need to delete.