---
title: "Delete Trace"
method: DELETE
path: "/tracing/traces/{trace_id}"
tags: ["Deprecated"]
deprecated: true
---

# Delete Trace

`DELETE /tracing/traces/{trace_id}`

> **Deprecated.**

Delete a trace and all its spans.

Removes every span that shares this `trace_id` within the project.
Returns `202 Accepted` with the links for the spans that were
marked for deletion. `trace_id` must be a 32-char hex UUID.

Deletion is not reversible. For soft-removal semantics on a
single-trace simple annotation, prefer
`DELETE /simple/traces/{trace_id}`.

## Path parameters

- `trace_id` string, required

## Response `202`

Successful Response

- OTelLinksResponse — Response from span ingestion. `count` reflects how many spans were successfully parsed and published to the ingest stream. If you submitted N spans and see `count < N`, some spans failed server-side validation and were not persisted (check server logs for details). See [Tracing — Async write contract](/reference/api-guide/tracing#async-write-contract-202) for the full semantics of the `202 Accepted` response.
  - `count` integer — Number of spans that were accepted and published to the ingest stream. Compare against the number of spans you sent to detect partial failures.
  - `links` OTelLinkOutput[], nullable — List of `(trace_id, span_id)` pairs for the accepted spans, in submission order.
    - `span_id` string, nullable
    - `trace_id` string, nullable
    - `attributes` object, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/2e1079696f45/schema)
