> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselemma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch delete traces

> Delete a batch of traces.



## OpenAPI

````yaml https://api.uselemma.ai/openapi.json post /traces/batch-delete
openapi: 3.1.0
info:
  title: Lemma Platform API
  description: Lemma Platform HTTP API for AI observability and workspace operations.
  version: 0.1.0
servers:
  - url: https://api.uselemma.ai
    description: Lemma production API
security:
  - bearerAuth: []
paths:
  /traces/batch-delete:
    post:
      tags:
        - Traces
      summary: Batch delete traces
      description: Delete a batch of traces.
      operationId: delete_traces_batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - project_id
                - trace_ids
              properties:
                project_id:
                  type: string
                trace_ids:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 50
      responses:
        '200':
          description: Batch delete results
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            trace_id:
                              type: string
                            ok:
                              type: boolean
                              const: true
                          required:
                            - trace_id
                            - ok
                          additionalProperties: false
                        - type: object
                          properties:
                            trace_id:
                              type: string
                            ok:
                              type: boolean
                              const: false
                            error:
                              type: object
                              properties:
                                detail:
                                  type: string
                                code:
                                  type: string
                              required:
                                - detail
                                - code
                              additionalProperties: false
                          required:
                            - trace_id
                            - ok
                            - error
                          additionalProperties: false
                required:
                  - results
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.