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

# Delete a collection

> Permanently deletes a collection and its association records. The collection must belong to the authenticated team.



## OpenAPI

````yaml https://staging.aigmented.io/api/v1/openapi.json delete /api/v1/collections/{id}
openapi: 3.1.0
info:
  title: Aigmented API
  version: 1.0.0
  description: >-
    REST API for Aigmented — manage knowledge collections, upload files, search
    knowledge cards, and ask questions with LLM-powered answers.
  contact:
    name: Aigmented Support
    url: https://aigmented.com
servers:
  - url: https://aigmented.io
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Collections
    description: Create and manage knowledge collections
  - name: Files
    description: Upload and manage source documents
  - name: Search
    description: Semantic search over knowledge cards in a collection
  - name: Ask
    description: LLM-powered question answering over a collection
paths:
  /api/v1/collections/{id}:
    delete:
      tags:
        - Collections
      summary: Delete a collection
      description: >-
        Permanently deletes a collection and its association records. The
        collection must belong to the authenticated team.
      operationId: deleteCollection
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: Collection ID
      responses:
        '200':
          description: Collection deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Collection removed
        '400':
          description: Invalid ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Collection not found or not owned by team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key (sk-...)
      description: >-
        Pass your API key as a Bearer token. Example: `Authorization: Bearer
        sk-xxxxxxxxxxxx`

````