Delete Documents from Collection
DELETE /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents
Delete documents from a collection. Supports three deletion modes:
*
* 1. Purge All - Set purgeAll: true to delete ALL documents in the collection
*
* 2. By Document IDs - Provide documentIds array with specific document UUIDs
*
* 3. By Metadata - Provide metadata object with field and values to delete documents where the metadata field matches any of the values
*
* Drupal Integration:
* When using with Drupal AI Search, use metadata deletion with:
* - field: 'drupal_entity_id' to delete all chunks for specific entities
* - field: 'drupal_long_id' to delete specific chunks
Authorizations
Parameters
Path Parameters
Organisation machine name
Collection UUID
Request Body required
object
Delete ALL documents in collection
Delete specific documents by UUID
object
Metadata field name (e.g., ‘drupal_entity_id’)
Values to match (OR logic)
Responses
200
Documents deleted successfully
object
400
Invalid request - must specify purgeAll, documentIds, or metadata
403
Access denied
404
Collection not found
500
Failed to delete documents