> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# data_sources_update

> Change a data source's columns, title or icon. A key that is not already a column adds one, `{"name": ...}` renames one, and mapping a key to null removes it along with its data.

<div className="tool-route"><span className="tool-row-method" data-method="PATCH">PATCH</span><code>{"https://api.notion.com/v1/data_sources/{dataSourceId}"}</code></div>

```python notion_data_sources_update.py theme={null}
from charter.packs import notion

result = await notion.data_sources_update.ainvoke({"dataSourceId": ..., "body": ...})
```

<Note>
  Requires `Update content`.
</Note>

<Warning>
  This tool's JSON schema is 22 KB, because it models the whole resource this endpoint writes.
  That is more context than most tasks. Narrow it at the call site
  with [`Tool.derived`](/charter/charter/reference/tool#tool-derived):

  ```python theme={null}
  narrowed = notion.data_sources_update.derived(
      name="data_sources_update_narrowed",
      drop={"body.title", "body.icon", "body.parent"},
  )
  ```

  Those are its heaviest branches by schema size, not a recommendation: which ones you can spare is yours to decide. The tool underneath is unchanged.
  See [Projections](/charter/charter/tools/projections).
</Warning>

## Path parameters

<div className="reference-table">
  | Field                                                                | Type     | Description                |
  | -------------------------------------------------------------------- | -------- | -------------------------- |
  | `dataSourceId` <span className="required" title="required">\*</span> | `string` | The ID of the data source. |
</div>

## Body

<div className="reference-table">
  | Field                                                        | Type                                                                                    | Description           |
  | ------------------------------------------------------------ | --------------------------------------------------------------------------------------- | --------------------- |
  | `body` <span className="required" title="required">\*</span> | [DataSourceUpdateBody](/charter/charter/packs/notion/data_sources/objects#datasourceupdatebody) | The fields to change. |
</div>
