Skip to main content
DELETE
/
v2
/
spans
Delete spans
curl --request DELETE \
  --url https://api.arize.com/v2/spans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "UHJvamVjdDox",
  "span_ids": [
    "a1b2c3d4e5f6a7b8",
    "f8e7d6c5b4a39281"
  ]
}
'
{
  "completed": true,
  "deleted_span_ids": [
    "a1b2c3d4e5f6a7b8",
    "b2c3d4e5f6a7b8c9"
  ],
  "not_deleted_span_ids": []
}

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Body

application/json

Body containing span IDs to delete

project_id
string
required

The project ID containing the spans to delete

span_ids
string[]
required

List of span IDs to delete (maximum 5000)

Required array length: 1 - 5000 elements

Response

Spans deleted. The response body always includes:

  • completed: whether all requested spans were fully processed. This endpoint is idempotent — retries are safe.
  • deleted_span_ids: IDs of spans confirmed deleted.
  • not_deleted_span_ids: IDs of spans not deleted — either not found, or not yet processed when completed is false.

Result of a DELETE /v2/spans request.

deleted_span_ids lists every span ID confirmed deleted. not_deleted_span_ids lists every requested span ID that was not deleted.

completed indicates whether the server fully processed all data for the request — not whether all spans were found and deleted. A span may appear in not_deleted_span_ids even when completed is true if it was not found in the system (never ingested or already deleted).

When completed is true, every requested ID appears in exactly one of deleted_span_ids or not_deleted_span_ids. No retry is needed.

When completed is false, the server could not fully process all data. Some IDs in not_deleted_span_ids may still be deletable — retry the original full request to resolve them. The delete is idempotent.

completed
boolean
required

true when the server fully processed all data for the request — both lists are complete and no retry is needed. false when processing could not fully complete; retry the original request. Note: completed reflects whether all data was processed, not whether all requested spans existed.

deleted_span_ids
string[]
required

Span IDs confirmed deleted in this request.

not_deleted_span_ids
string[]
required

Requested span IDs that were not deleted. When completed is true, these were not found in the system (never ingested or already deleted). When completed is false, some IDs may not have been reached — retry to resolve them.