Deleting Documents

Documents can be deleted from custom data sources either by batch id or guid.

Deleting by batch

When documents are uploaded, they will be assigned a batch id (if one is not already provided). This ID can then be used to delete that same batch of documents.

curl -X POST 'https://api.brandwatch.com/content/delete' \
-H 'authorization: bearer xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxx' \
-H 'content-type: application/json' \
-d '{"contentSource": NUMERIC_ID,"batch": BATCH_ID}'

Deleting individual documents

It is also possible to delete individual documents. This can be done for up to 1,000 documents at a time. As seen in the example below, items will contain one element for each document you want to delete. That item can have either a guid or url field to indicate which document to delete.

❗️

If the document contains both a url and a guid, then the guid is required to delete it.

curl -X POST 'https://api.brandwatch.com/content/delete' \
-H 'authorization: bearer xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxx' \
-H 'content-type: application/json' \
-d '{"contentSource": NUMERIC_ID,"items": [{"guid": "AGUID","URL": "AURL"}]}'

🚧

Please note that deletes happen asynchronously - this means if you re-upload documents with the same batch id or guid very quickly after sending a delete, there is a chance that the delete might run after the documents are uploaded. Therefore it's important to ensure you allow some time for deletes to have occurred first.