Skip to main content
DELETE
/
api
/
collections
/
{collection_id}
Delete Collection
curl --request DELETE \
  --url https://api.example.com/api/collections/{collection_id} \
  --header 'Authorization: <authorization>'

Authentication

Authorization
string
required
Bearer token: Bearer <admin_token>
This endpoint requires admin privileges.

Path Parameters

collection_id
string
required
Collection ID (UUID)

Example Request

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

Response

{
  "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
This action is irreversible. All client access will be revoked.

Errors

StatusDescription
401Invalid or expired token
403Admin access required
404Collection not found