> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

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

> Hard-delete trace 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.



## OpenAPI

````yaml delete /v1/projects/{project_identifier}/trace_annotations
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/projects/{project_identifier}/trace_annotations:
    delete:
      tags:
        - annotations
      summary: Delete trace annotations in a project that match the supplied filter.
      description: |-
        Hard-delete trace 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.
      operationId: deleteTraceAnnotations
      parameters:
        - name: project_identifier
          in: path
          required: true
          schema:
            type: string
            description: >-
              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.
            title: Project Identifier
          description: >-
            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.
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            description: >-
              Optional annotation name. When provided, must be non-empty and
              narrows the delete to annotations of that name.
            title: Name
          description: >-
            Optional annotation name. When provided, must be non-empty and
            narrows the delete to annotations of that name.
        - name: identifier
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
              - type: 'null'
            description: >-
              Optional annotation identifier. When provided, must be non-empty
              and narrows the delete to annotations with that identifier.
            title: Identifier
          description: >-
            Optional annotation identifier. When provided, must be non-empty and
            narrows the delete to annotations with that identifier.
        - name: annotator_kind
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - LLM
                  - CODE
                  - HUMAN
                type: string
              - type: 'null'
            description: >-
              Optional annotator kind. When provided, narrows the delete to
              annotations produced by this annotator kind.
            title: Annotator Kind
          description: >-
            Optional annotator kind. When provided, narrows the delete to
            annotations produced by this annotator kind.
        - name: start_time
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Optional inclusive lower bound on `created_at` (>=). Naive
              datetimes are interpreted as UTC.
            title: Start Time
          description: >-
            Optional inclusive lower bound on `created_at` (>=). Naive datetimes
            are interpreted as UTC.
        - name: end_time
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Optional exclusive upper bound on `created_at` (<). Naive
              datetimes are interpreted as UTC.
            title: End Time
          description: >-
            Optional exclusive upper bound on `created_at` (<). Naive datetimes
            are interpreted as UTC.
        - name: delete_all
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              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.
            default: false
            title: Delete All
          description: >-
            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.
      responses:
        '204':
          description: Successful Response
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '404':
          content:
            text/plain:
              schema:
                type: string
          description: Project not found
        '422':
          content:
            text/plain:
              schema:
                type: string
          description: Invalid parameters

````