> ## 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 a span by span_identifier

> Delete a single span by identifier.

        **Important**: This operation deletes ONLY the specified span itself and does NOT
        delete its descendants/children. All child spans will remain in the trace and
        become orphaned (their parent_id will point to a non-existent span).

        Behavior:
        - Deletes only the target span (preserves all descendant spans)
        - If this was the last span in the trace, the trace record is also deleted
        - If the deleted span had a parent, its cumulative metrics (error count, token counts)
          are subtracted from all ancestor spans in the chain

        **Note**: This operation is irreversible and may create orphaned spans.



## OpenAPI

````yaml delete /v1/spans/{span_identifier}
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/spans/{span_identifier}:
    delete:
      tags:
        - spans
      summary: Delete a span by span_identifier
      description: |-
        Delete a single span by identifier.

                **Important**: This operation deletes ONLY the specified span itself and does NOT
                delete its descendants/children. All child spans will remain in the trace and
                become orphaned (their parent_id will point to a non-existent span).

                Behavior:
                - Deletes only the target span (preserves all descendant spans)
                - If this was the last span in the trace, the trace record is also deleted
                - If the deleted span had a parent, its cumulative metrics (error count, token counts)
                  are subtracted from all ancestor spans in the chain

                **Note**: This operation is irreversible and may create orphaned spans.
      operationId: deleteSpan
      parameters:
        - name: span_identifier
          in: path
          required: true
          schema:
            type: string
            description: >-
              The span identifier: either a relay GlobalID or OpenTelemetry
              span_id
            title: Span Identifier
          description: >-
            The span identifier: either a relay GlobalID or OpenTelemetry
            span_id
      responses:
        '204':
          description: Successful Response
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '404':
          content:
            text/plain:
              schema:
                type: string
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````