---
title: "Delete span annotations in a project that match the supplied filter."
method: DELETE
path: "/v1/projects/{project_identifier}/span_annotations"
tags: ["annotations"]
---

# Delete span annotations in a project that match the supplied filter.

`DELETE /v1/projects/{project_identifier}/span_annotations`

Hard-delete span annotations within the named project that match the
supplied filter.

- The request must either supply both `start_time` AND `end_time`
  to bound the delete to a `[start_time, end_time)` time window,
  OR set `delete_all=true` to acknowledge an unbounded sweep. A request
  that satisfies neither is rejected with 422.
- `name`, `identifier`, and `annotator_kind` are optional narrowing
  filters; on their own they do NOT authorize the request — they only
  narrow within an already-authorized request (bounded time range or
  `delete_all=true`).
- All supplied filters are combined with AND. `name` and `identifier`,
  when present, must be non-empty.
- `start_time` is inclusive (`>=`); `end_time` is exclusive
  (`<`). When both are supplied, `start_time` must be strictly earlier
  than `end_time` (else 422). A half-bounded range (only one of
  the two) does NOT satisfy the gate and is rejected unless
  `delete_all=true` is also set. Naive datetimes are interpreted as UTC.
- The endpoint is idempotent: a request that matches no rows still
  returns 204.
- When authentication is enabled, non-admin callers can only delete rows
  they own (`user_id == current_user.id`); admins delete all matching
  rows.

## Path parameters

- `project_identifier` string, required — The project identifier: either project ID or project name. If using a project name as the identifier, it cannot contain slash (/), question mark (?), or pound sign (#) characters.

## Query parameters

- `name` string, nullable — Optional annotation name. When provided, must be non-empty and narrows the delete to annotations of that name.
- `identifier` string, nullable — Optional annotation identifier. When provided, must be non-empty and narrows the delete to annotations with that identifier.
- `annotator_kind` 'LLM' | 'CODE' | 'HUMAN', nullable — Optional annotator kind. When provided, narrows the delete to annotations produced by this annotator kind.
- `start_time` string, date-time, nullable — Optional inclusive lower bound on `created_at` (>=). Naive datetimes are interpreted as UTC.
- `end_time` string, date-time, nullable — Optional exclusive upper bound on `created_at` (<). Naive datetimes are interpreted as UTC.
- `delete_all` boolean — Opt-in flag that authorizes the request without a bounded `[start_time, end_time)` time window. When `false` (default) or absent, the request must supply both `start_time` AND `end_time` to bound the delete. When `true`, the time-range bound is waived and any other filters (`name`, `identifier`, `annotator_kind`) still narrow the delete within the project — e.g. `delete_all=true&name=X` deletes all annotations named X regardless of time.

## Response `204`

Successful Response

## Other responses

- `403` — Forbidden
- `404` — Project not found
- `422` — Invalid parameters

---

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