Updating Custom Data Sources

You can update the projectIds of a already existing custom data source.

Assuming you know the NUMERIC_ID of the data source you wish to delete, you can use the following request to update the projectsIds:

curl -X PATCH 'https://api.brandwatch.com/content/sources/NUMERIC_ID' \
-H 'authorization: bearer xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxx' \
-H 'Content-Type: application/json' \
-d '{"projectIds": [<projectId>]}'

You can use this to add or remove projects, but you must provide the full list of project IDs each time.

The response will look like:

{
"name": "my_data_source",
"id": NUMERIC_ID,
"description": null,
"projectIds": [<projectId>]
}

If you want the content source to no longer be project scoped then supply an empty array:

curl -X PATCH '<https://api.brandwatch.com/content/sources/NUMERIC_ID>'  
-H 'authorization: bearer xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxx'  
-H 'Content-Type: application/json'  
-d '{"projectIds": []}'

Adding projects should always work, but if you are removing a project then this may fail if that project contains queries that are using the content source. Those queries will need to have that content source remove first.