---
title: "Delete a trace"
method: DELETE
path: "/api/traces/{trace_unique_id}/"
tags: ["Traces"]
---

# Delete a trace

`DELETE /api/traces/{trace_unique_id}/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/traces/{trace_unique_id}/`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Use `start_time` and `end_time` to narrow deletion to the relevant time range. Deletion is asynchronous: the trace leaves List traces right away, but its spans can stay visible in List spans and Get a trace for several minutes. An unknown ID also returns 200.

## Path parameters

- `trace_unique_id` string, required

## Query parameters

- `start_time` string, date-time
- `end_time` string, date-time

## Response `200`

Trace delete issued successfully.

- object
  - `message` string, required: Delete confirmation message.

## Other responses

- `403`: The API key is missing, invalid or expired.
- `500`: Internal Server Error

## Changes

- **2026-10-21** `c30bcb383ee8`: 4 info
  - api operation id `traces_deleteTrace` removed and replaced with `deleteTrace`
  - the endpoint scheme security `DashboardJwt` was added to the API
  - api tag `Traces` added
  - api tag `traces` removed
- **2026-10-02** `b830b79cfd52`: 2 info
  - added the non-success response with the status `403`
  - removed the non-success response with the status `401`
- **2026-09-17** `6fa8242da8c2`: 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `RespanApiKey` was added to the API
- **2026-09-12** `22b868ef3f22`: 1 info
  - api operation id `delete-trace` removed and replaced with `traces_deleteTrace`
- **2026-08-13** `4e064cf81dae`: 5 info
  - added the new optional `query` request parameter `end_time`
  - added the new optional `query` request parameter `start_time`
  - added the media type `application/json` for the response with the status `200`
  - added the non-success response with the status `401`
  - …1 more

[Operation history](https://skmtc.dev/keywordsai/apis/respan-api/changes/api/traces/:trace_unique_id/delete.md)

---

[API](https://skmtc.dev/keywordsai/apis/respan-api.md) - [All operations](https://skmtc.dev/keywordsai/apis/respan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keywordsai/apis/respan-api/revisions/900841387635?raw)
