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

# Delete Collection

> Delete a collection

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

<ParamField path="id" type="string" required>
  Collection ID
</ParamField>

## Response

```json theme={null}
{
  "success": true,
  "message": "Collection coll123 deleted successfully"
}
```

<Warning>
  Collections containing components cannot be deleted. Move or delete all components from the collection first.
</Warning>

## Error Responses

### Collection Not Found

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Collection not found"
  }
}
```

### Collection Not Empty

```json theme={null}
{
  "error": {
    "code": "COLLECTION_NOT_EMPTY",
    "message": "Cannot delete a collection that contains items"
  }
}
```

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/collections/coll123" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/collections/coll123',
    {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  const result = await response.json();
  console.log(result.message);
  ```
</CodeGroup>
