---
agentTools:
  projectIndex: https://developers.brandwatch.com/llms.txt
---

# Creating a Custom Data Source

Create a new custom data source

In order to start using custom data sources in Brandwatch Consumer Research, you must first create a new custom data source. The following call creates a new custom data source named `my_data_source`:

[block:code]
{
  "codes": [
    {
      "code": "curl -X POST 'https://api.brandwatch.com/content/sources' \\\n-H 'authorization: bearer xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxx' \\\n-H 'Content-Type: application/json' \\\n-d '{\"name\": \"my_data_source\",\"description\":\"\"}'",
      "language": "curl"
    }
  ]
}
[/block]

You can use alphanumeric characters and `_` in the name of your new custom data source.

[block:callout]
{
  "type": "warning",
  "title": "Project-scoped data sources",
  "body": "By default, a custom data source will be available for use in all of a client's projects. If instead you want a custom data source to be available for only one (or more) project(s), you can provide a `projectIds` attribute with a list of relevant Project IDs as seen below:"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "curl -X POST 'https://api.brandwatch.com/content/sources' \\\n-H 'authorization: bearer xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxx' \\\n-H 'Content-Type: application/json' \\\n-d '{\"name\": \"my_data_source\",\"description\":\"\",\"projectIds\": [<projectId>]}'",
      "language": "curl"
    }
  ]
}
[/block]

Here is the JSON response:

[block:code]
{
  "codes": [
    {
      "code": "{\n\"name\": \"my_data_source\",\n\"id\": DATA_SOURCE_NUMERIC_ID,\n\"description\": null\n}",
      "language": "json"
    }
  ]
}
[/block]