Skip to main content
DELETE
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
collections
/
{id}
Delete Collection
curl --request DELETE \
  --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/collections/{id}

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID
id
string
required
Collection ID

Response

{
  "message": "Collection successfully deleted",
  "id": "coll123"
}
Collections containing components cannot be deleted. Move or delete all components from the collection first.

Error Responses

Collection Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Collection not found"
  }
}

Collection Not Empty

{
  "error": {
    "code": "COLLECTION_NOT_EMPTY",
    "message": "Cannot delete collection that contains components",
    "details": {
      "componentCount": 5
    }
  }
}

Code Examples

curl -X DELETE "https://api.metabind.ai/v1/organizations/org123/projects/proj456/collections/coll123" \
  -H "Authorization: Bearer YOUR_API_KEY"