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

# Bulk delete resources

> Delete multiple resources in a single request. Supports repositories, documentation, research papers, contexts, and local folders.



## OpenAPI

````yaml /openapi-docs.yaml post /bulk-delete
openapi: 3.1.0
info:
  title: Nia AI API
  version: 1.1.0
  description: >-
    Nia AI API provides a single, consistent `sources` resource for all indexed
    content.


    ## Core Resources


    **Sources** (`/sources`)

    - `repository`

    - `documentation`

    - `research_paper`

    - `huggingface_dataset`

    - `local_folder`


    **Search** (`/search`)

    - `mode`: query | web | deep | universal


    Legacy endpoints are deprecated and will be removed in a future version.
    Prefer `/sources` and `/search` for new integrations.
servers:
  - url: https://apigcp.trynia.ai/v2
    description: Production API
  - url: http://localhost:8000/v2
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
    description: API-first signup, login, and API key bootstrapping
  - name: Sources
    description: >-
      Unified source management (repositories, documentation, papers, datasets,
      local folders)
  - name: Search
    description: Unified search endpoint with mode discriminator
  - name: Context Sharing
    description: Cross-agent context management and retrieval
  - name: Categories
    description: Category management for organizing indexed sources
  - name: GitHub Search
    description: Live GitHub search and repository exploration
  - name: Advisor
    description: Context-aware code advisor against indexed documentation
  - name: Dependencies
    description: Dependency analysis and documentation subscription
  - name: Usage
    description: Usage tracking and bulk operations
paths:
  /bulk-delete:
    post:
      tags:
        - Usage
      summary: Bulk delete resources
      description: >-
        Delete multiple resources in a single request. Supports repositories,
        documentation, research papers, contexts, and local folders.
      operationId: bulk_delete_resources_v2_bulk_delete_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BulkDeleteRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BulkDeleteItem'
          type: array
          minItems: 1
          title: Items
          description: Items to delete
      type: object
      required:
        - items
      title: BulkDeleteRequest
      description: Request for bulk deletion
    BulkDeleteResponse:
      properties:
        deleted:
          type: integer
          title: Deleted
          description: Number of successfully deleted items
        failed:
          type: integer
          title: Failed
          description: Number of failed deletions
        results:
          items:
            $ref: '#/components/schemas/BulkDeleteResult'
          type: array
          title: Results
          description: Per-item results
      type: object
      required:
        - deleted
        - failed
        - results
      title: BulkDeleteResponse
      description: Response for bulk deletion
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkDeleteItem:
      properties:
        id:
          type: string
          title: Id
          description: Resource ID
        type:
          type: string
          enum:
            - repository
            - documentation
            - research_paper
            - context
            - local_folder
          title: Type
          description: Resource type
      type: object
      required:
        - id
        - type
      title: BulkDeleteItem
      description: Single item to delete
    BulkDeleteResult:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          title: Type
        success:
          type: boolean
          title: Success
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - id
        - type
        - success
      title: BulkDeleteResult
      description: Result of a single delete operation
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key must be provided in the Authorization header

````