Deleting users via API breaks OTel trace correlation on historical interactions

Running into a weird issue where deleting a user via DELETE /api/v2/users/{id} seems to nuke their historical interaction data in our trace backend. We’re using OpenTelemetry to correlate Data Action calls with agent activity.

Here’s the flow: We fetch interaction history to enrich spans. After the delete, the API returns 404s for those interactions, breaking the trace context.

Is there a way to soft-delete or anonymize the user without losing the interaction IDs needed for our Jaeger traces?

The docs are pretty clear on this. Deleting a user doesn’t just hide them, it removes the association from the interaction records if those records depend on the user ID for lookup. You’re seeing 404s because the resource is gone.

If you need to keep the history for tracing, don’t delete the user. Deactivate them.

Here is the C# way to do it with the SDK. This keeps the user record intact but sets the status to inactive. The interaction data remains linked, so your OTel spans can still resolve the user ID.

var userApi = new UserApi(platformClient);
var user = await userApi.GetUserAsync(userId);

user.Status = "inactive";
user.Name = "Archived User - " + user.Name; // Optional: rename for clarity

await userApi.PutUserAsync(userId, user);

The DELETE /api/v2/users/{id} endpoint is for GDPR style erasure. If you are not erasing data, use the PUT method. The interaction API calls won’t break because the user object still exists in the directory.

Also check if your Data Actions are caching user data. If they are, a delete might clear the cache but the underlying DB interaction record might still have the ID. The 404 suggests the API call is trying to fetch the user details to enrich the span, and the user is gone.

Keep the user, just turn them off.