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

# Delete Collection

> Delete an API collection (admin only)

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer token: `Bearer <admin_token>`
</ParamField>

<Note>
  This endpoint requires admin privileges.
</Note>

## Path Parameters

<ParamField path="collection_id" type="string" required>
  Collection ID (UUID)
</ParamField>

### Example Request

```bash theme={null}
curl -X DELETE https://api.sari-platform.com/api/collections/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer <admin_token>"
```

## Response

```json theme={null}
{
  "message": "Collection deleted successfully"
}
```

## What Happens

1. **Collection Deleted** - Removed from database
2. **Access Removed** - All client access grants deleted (cascade)
3. **Vector Deleted** - Embedding removed from Vector\_Collections
4. **Cache Invalidated** - All related caches cleared

<Warning>
  This action is irreversible. All client access will be revoked.
</Warning>

## Errors

| Status | Description              |
| ------ | ------------------------ |
| 401    | Invalid or expired token |
| 403    | Admin access required    |
| 404    | Collection not found     |
