Brandwatch Developer Hub

Welcome to the Brandwatch developer hub. You'll find comprehensive guides and API documentation to help you start working with Brandwatch as quickly as possible!

Get Started    

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.

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.

Updated a day ago

Deleting Documents


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.