---
title: "Delete Trace"
method: DELETE
path: "/admin/api/v1/traces/{otel_trace_id}"
tags: ["Traces"]
---

# Delete Trace

`DELETE /admin/api/v1/traces/{otel_trace_id}`

Delete a single trace and cascade to its spans.

The trace row's PK is composite ``(started_at, otel_trace_id)`` so
we look it up first to grab ``started_at``, then delete by full PK.
Spans match on the 8-byte trace id slice. The 404 path leaves both
tables untouched.

## Path parameters

- `otel_trace_id` string, required

## Response `200`

Successful Response

- StandaloneTraceDeleteResult — Body of a single ``DELETE /admin/api/v1/traces/{id}`` response. Reports the deleted trace plus the cascaded span count so the UI can show "removed N spans" without a follow-up read.
  - `deleted` true
  - `deletedSpans` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/idun-group/apis/idun-agent-engine-server.md) · [All operations](https://skmtc.net/idun-group/apis/idun-agent-engine-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/idun-group/idun-agent-engine-server/revisions/8909cd73cc1c/schema)
