> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://notion.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://notion.ferndocs.com/_mcp/server.

# Update a data source

PATCH https://api.notion.com/v1/data_sources/{data_source_id}
Content-Type: application/json

Updates the [data source](/reference/data-source)  object — the properties, title, description, or whether it's in the trash — of a specified data source under a database.

Returns the updated data source object.

Use the `parent` parameter to move the data source to a different `database_id`. If you do so, any existing views that refer to the data source in the current database continue to exist, but become *linked* views. A new standard "table" view for the moved data source is created under the new (destination) database. Use the Notion app to make any further changes to the views; managing views using the API is not currently supported.

Data source properties represent the columns (or schema) of a data source. To update the properties of a data source, use the `properties` [body param](/reference/update-data-source-properties) with this endpoint. Learn more about data source properties in the [data source properties](/reference/property-object) and [Update data source properties](/reference/update-data-source-properties) docs.

To update a `relation` data source property, share the related database with the integration. Learn more about relations in the [data source properties](/reference/property-object#relation) page.

For an overview of how to use the REST API with databases, refer to the [Working with databases](https://developers.notion.com/docs/working-with-databases) guide.

### How data sources property type changes work

All properties in pages are stored as rich text. Notion will convert that rich text based on the types defined in a data source's schema. When a type is changed using the API, the data will continue to be available, it is just presented differently.

For example, a multi select property value is represented as a comma-separated list of strings (eg. "1, 2, 3") and a people property value is represented as a comma-separated list of IDs. These are compatible and the type can be converted.

Note: Not all type changes work. In some cases data will no longer be returned, such as people type → file type.

### Interacting with data source rows

This endpoint cannot be used to update data source rows.

To update the properties of a data source row — rather than a column — use the [Update page properties](https://developers.notion.com/reference/patch-page) endpoint. To add a new row to a database, use the [Create a page](https://developers.notion.com/reference/post-page) endpoint.

### Recommended data source schema size limit

Developers are encouraged to keep their data source schema size to a maximum of **50KB**. To stay within this schema size limit, the number of properties (or columns) added to a data source should be managed.

Data source schema updates that are too large will be blocked by the REST API to help developers keep their data source queries performant.

### Errors

Each Public API endpoint can return several possible error codes. See the [Error codes section](https://developers.notion.com/reference/status-codes#error-codes) of the Status codes documentation for more information.

* `formula`
* `status`
* [Synced content](https://www.notion.so/help/guides/synced-databases-bridge-different-tools)
* `place`

To update a data source [relation](https://www.notion.so/help/relations-and-rollups#what-is-a-database-relation) property, the related database must also be shared with your integration.

Reference: https://notion.ferndocs.com/reference/update-a-data-source

## Request

### Path parameters

- `data_source_id` (string, required) — ID of a Notion data source. This is a UUIDv4, with or without dashes.

### Headers

- `Notion-Version` (string, required) — The [API version](/reference/versioning) to use for this request. The latest version is `<<internalLatestNotionVersion>>`.

### Body (application/json)

This endpoint expects an object.

- `properties` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchema, optional)
- `title` (list of V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaTitleItems, optional)
- `icon` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIcon, optional) — Optionally provide a new icon object to update the data source's icon, or provide `null` to remove the existing icon.
- `in_trash` (boolean, optional) — Pass `true` to move a data source to the trash, or `false` to restore it from the trash.
- `parent` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaParent, optional) — The parent of the data source, when moving it to a different database. If not provided, the parent will not be updated.

## Response

### 200

200

- `object` (string, optional)
- `id` (string, optional)
- `created_time` (string, optional)
- `last_edited_time` (string, optional)
- `properties` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchema, optional)
- `parent` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaParent, optional)
- `database_parent` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaDatabaseParent, optional)
- `archived` (boolean, optional, default: true)
- `is_inline` (boolean, optional, default: true)
- `icon` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaIcon, optional)
- `cover` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaCover, optional)
- `url` (string, optional)
- `title` (list of V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaTitleItems, optional)

## Errors

### 400 Bad Request Error

400

## Types

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchema

- `<propertyIdentifier>` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifier, optional) — Map from property identifier strings to `null` (to remove an existing property) or an an object with a property configuration update.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaTitleItems

- `annotations` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaTitleItemsAnnotations, optional) — The styling for the rich text.
- `plain_text` (string, optional) — The plain text content of the rich text object, without any styling.
- `href` (string, optional) — A URL that the rich text object links to or mentions.
- `type` (enum, optional)
  - Allowed values: `"text"`, `"mention"`, `"equation"`

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIcon

Optionally provide a new icon object to update the data source's icon, or provide `null` to remove the existing icon.

- `type` (enum, optional) — The type of icon parameter being provided.
  - Allowed values: `"file_upload"`, `"emoji"`, `"external"`, `"custom_emoji"`
- `emoji` (string, optional) — When `type=emoji`, an emoji character.
- `file_upload` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIconFileUpload, optional) — When `type=file_upload`, an object containing the `id` of the File Upload.
- `external` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIconExternal, optional) — When `type=external`, an object containing the external URL.
- `custom_emoji` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIconCustomEmoji, optional) — When `type=custom_emoji`, an object containing the custom emoji.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaParent

The parent of the data source, when moving it to a different database. If not provided, the parent will not be updated.

- `database_id` (string, required) — The ID of the parent database (with or without dashes), for example, 195de9221179449fab8075a27c979105
- `type` (enum, optional) — Always `database_id`.
  - Allowed values: `"database_id"`

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchema

- `+1` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchema1, optional)
- `In stock` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaInStock, optional)
- `Price` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPrice, optional)
- `Description` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaDescription, optional)
- `Last ordered` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaLastOrdered, optional)
- `Meals` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaMeals, optional)
- `Number of meals` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaNumberOfMeals, optional)
- `Store availability` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaStoreAvailability, optional)
- `Photo` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPhoto, optional)
- `Food group` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaFoodGroup, optional)
- `Name` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaName, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaParent

- `type` (string, optional)
- `database_id` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaDatabaseParent

- `type` (string, optional)
- `page_id` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaIcon

- `type` (string, optional)
- `emoji` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaCover

- `type` (string, optional)
- `external` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaCoverExternal, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaTitleItems

- `type` (string, optional)
- `text` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaTitleItemsText, optional)
- `annotations` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaTitleItemsAnnotations, optional)
- `plain_text` (string, optional)
- `href` (any, optional)

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifier

Map from property identifier strings to `null` (to remove an existing property) or an an object with a property configuration update.

- `name` (string, optional) — Updated name of the property. Must be provided when renaming an existing parameter. Otherwise, optional.
- `description` (string, optional) — Description of the property.
- `type` (enum, optional) — Type of property being updated, added, or renamed. (Optional)
  - Allowed values: `"number"`, `"formula"`, `"select"`, `"multi_select"`, `"status"`, `"relation"`, `"rollup"`, `"unique_id"`, `"title"`, `"rich_text"`, `"url"`, `"people"`, `"files"`, `"email"`, `"phone_number"`, `"date"`, `"checkbox"`, `"created_by"`, `"created_time"`, `"last_edited_by"`, `"last_edited_time"`, `"button"`, `"location"`, `"verification"`, `"last_visited_time"`, `"place"`
- `number` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierNumber, optional)
- `formula` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierFormula, optional)
- `select` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierSelect, optional)
- `multi_select` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierMultiSelect, optional)
- `relation` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRelation, optional)
- `rollup` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRollup, optional)
- `unique_id` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierUniqueId, optional)

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaTitleItemsAnnotations

The styling for the rich text.

- `bold` (boolean, optional, default: false) — Whether the text is formatted as bold.
- `italic` (boolean, optional, default: false) — Whether the text is formatted as italic.
- `strikethrough` (boolean, optional, default: false) — Whether the text is formatted with a strikethrough.
- `underline` (boolean, optional, default: false) — Whether the text is formatted with an underline.
- `code` (boolean, optional, default: false) — Whether the text is formatted as code.
- `color` (enum, optional, default: "default") — The color of the text.
  - Allowed values: `"default"`, `"gray"`, `"brown"`, `"orange"`, `"yellow"`, `"green"`, `"blue"`, `"purple"`, `"pink"`, `"red"`, `"default_background"`, `"gray_background"`, `"brown_background"`, `"orange_background"`, `"yellow_background"`, `"green_background"`, `"blue_background"`, `"purple_background"`, `"pink_background"`, `"red_background"`

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIconFileUpload

When `type=file_upload`, an object containing the `id` of the File Upload.

- `id` (string, required) — ID of a FileUpload object that has the status `uploaded`.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIconExternal

When `type=external`, an object containing the external URL.

- `url` (string, required) — The URL of the external file.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaIconCustomEmoji

When `type=custom_emoji`, an object containing the custom emoji.

- `id` (string, required) — The ID of the custom emoji.
- `name` (string, optional) — The name of the custom emoji.
- `url` (string, optional) — The URL of the custom emoji.

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchema1

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `people` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchema1People, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaInStock

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `checkbox` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaInStockCheckbox, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPrice

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `number` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPriceNumber, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaDescription

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `rich_text` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaDescriptionRichText, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaLastOrdered

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `date` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaLastOrderedDate, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaMeals

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `relation` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaMealsRelation, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaNumberOfMeals

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `rollup` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaNumberOfMealsRollup, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaStoreAvailability

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `multi_select` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaStoreAvailabilityMultiSelect, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPhoto

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `files` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPhotoFiles, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaFoodGroup

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `select` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaFoodGroupSelect, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaName

- `id` (string, optional)
- `name` (string, optional)
- `type` (string, optional)
- `title` (V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaNameTitle, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaCoverExternal

- `url` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaTitleItemsText

- `content` (string, optional)
- `link` (any, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaTitleItemsAnnotations

- `bold` (boolean, optional, default: true)
- `italic` (boolean, optional, default: true)
- `strikethrough` (boolean, optional, default: true)
- `underline` (boolean, optional, default: true)
- `code` (boolean, optional, default: true)
- `color` (string, optional)

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierNumber

- `format` (enum, optional) — The format of the number property.
  - Allowed values: `"number"`, `"number_with_commas"`, `"percent"`, `"dollar"`, `"australian_dollar"`, `"canadian_dollar"`, `"singapore_dollar"`, `"euro"`, `"pound"`, `"yen"`, `"ruble"`, `"rupee"`, `"won"`, `"yuan"`, `"real"`, `"lira"`, `"rupiah"`, `"franc"`, `"hong_kong_dollar"`, `"new_zealand_dollar"`, `"krona"`, `"norwegian_krone"`, `"mexican_peso"`, `"rand"`, `"new_taiwan_dollar"`, `"danish_krone"`, `"zloty"`, `"baht"`, `"forint"`, `"koruna"`, `"shekel"`, `"chilean_peso"`, `"philippine_peso"`, `"dirham"`, `"colombian_peso"`, `"riyal"`, `"ringgit"`, `"leu"`, `"argentine_peso"`, `"uruguayan_peso"`, `"peruvian_sol"`, ``

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierFormula

- `expression` (string, optional) — A valid Notion formula expression.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierSelect

- `options` (list of V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierSelectOptionsItems, optional) — Array of added or updated options for a `select` or `multi_select` property. One of `id` or `name` must be included in each array entry.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierMultiSelect

- `options` (list of V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierMultiSelectOptionsItems, optional) — Array of added or updated options for a `select` or `multi_select` property. One of `id` or `name` must be included in each array entry.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRelation

- `type` (enum, optional)
  - Allowed values: `"single_property"`, `"dual_property"`
- `single_property` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRelationSingleProperty, optional) — An empty object `{}`.
- `dual_property` (V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRelationDualProperty, optional)

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRollup

- `function` (enum, required)
  - Allowed values: `"count"`, `"count_values"`, `"empty"`, `"not_empty"`, `"unique"`, `"show_unique"`, `"percent_empty"`, `"percent_not_empty"`, `"sum"`, `"average"`, `"median"`, `"min"`, `"max"`, `"range"`, `"earliest_date"`, `"latest_date"`, `"date_range"`, `"checked"`, `"unchecked"`, `"percent_checked"`, `"percent_unchecked"`, `"count_per_group"`, `"percent_per_group"`, `"show_original"`
- `relation_property_name` (string, optional)
- `relation_property_id` (string, optional)
- `rollup_property_name` (string, optional)
- `rollup_property_id` (string, optional)

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierUniqueId

- `prefix` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchema1People

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaInStockCheckbox

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPriceNumber

- `format` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaDescriptionRichText

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaLastOrderedDate

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaMealsRelation

- `database_id` (string, optional)
- `synced_property_name` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaNumberOfMealsRollup

- `rollup_property_name` (string, optional)
- `relation_property_name` (string, optional)
- `rollup_property_id` (string, optional)
- `relation_property_id` (string, optional)
- `function` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaStoreAvailabilityMultiSelect

- `options` (list of V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaStoreAvailabilityMultiSelectOptionsItems, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaPhotoFiles

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaFoodGroupSelect

- `options` (list of V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaFoodGroupSelectOptionsItems, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaNameTitle

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierSelectOptionsItems

- `color` (enum, optional)
  - Allowed values: `"default"`, `"gray"`, `"brown"`, `"orange"`, `"yellow"`, `"green"`, `"blue"`, `"purple"`, `"pink"`, `"red"`, ``
- `description` (string, optional)
- `name` (string, optional)
- `id` (string, optional)

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierMultiSelectOptionsItems

- `color` (enum, optional)
  - Allowed values: `"default"`, `"gray"`, `"brown"`, `"orange"`, `"yellow"`, `"green"`, `"blue"`, `"purple"`, `"pink"`, `"red"`, ``
- `description` (string, optional)
- `name` (string, optional)
- `id` (string, optional)

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRelationSingleProperty

An empty object `{}`.

### V1DataSourcesDataSourceIdPatchRequestBodyContentApplicationJsonSchemaPropertyIdentifierRelationDualProperty

- `synced_property_id` (string, optional)
- `synced_property_name` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaStoreAvailabilityMultiSelectOptionsItems

- `id` (string, optional)
- `name` (string, optional)
- `color` (string, optional)

### V1DataSourcesDataSourceIdPatchResponsesContentApplicationJsonSchemaFoodGroupSelectOptionsItems

- `id` (string, optional)
- `name` (string, optional)
- `color` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "Result": {
    "value": "{\n\t\"object\": \"data_source\",\n\t\"id\": \"bc1211ca-e3f1-4939-ae34-5260b16f627c\",\n\t\"created_time\": \"2021-07-08T23:50:00.000Z\",\n\t\"last_edited_time\": \"2021-07-08T23:50:00.000Z\",\n\t\"properties\": {\n\t\t\"+1\": {\n\t\t\t\"id\": \"Wp%3DC\",\n\t\t\t\"name\": \"+1\",\n\t\t\t\"type\": \"people\",\n\t\t\t\"people\": {}\n\t\t},\n\t\t\"In stock\": {\n\t\t\t\"id\": \"fk%5EY\",\n\t\t\t\"name\": \"In stock\",\n\t\t\t\"type\": \"checkbox\",\n\t\t\t\"checkbox\": {}\n\t\t},\n\t\t\"Price\": {\n\t\t\t\"id\": \"evWq\",\n\t\t\t\"name\": \"Price\",\n\t\t\t\"type\": \"number\",\n\t\t\t\"number\": {\n\t\t\t\t\"format\": \"dollar\"\n\t\t\t}\n\t\t},\n\t\t\"Description\": {\n\t\t\t\"id\": \"V}lX\",\n\t\t\t\"name\": \"Description\",\n\t\t\t\"type\": \"rich_text\",\n\t\t\t\"rich_text\": {}\n\t\t},\n\t\t\"Last ordered\": {\n\t\t\t\"id\": \"eVnV\",\n\t\t\t\"name\": \"Last ordered\",\n\t\t\t\"type\": \"date\",\n\t\t\t\"date\": {}\n\t\t},\n\t\t\"Meals\": {\n\t\t\t\"id\": \"%7DWA~\",\n\t\t\t\"name\": \"Meals\",\n\t\t\t\"type\": \"relation\",\n\t\t\t\"relation\": {\n\t\t\t\t\"database_id\": \"668d797c-76fa-4934-9b05-ad288df2d136\",\n\t\t\t\t\"synced_property_name\": \"Related to Grocery List (Meals)\"\n\t\t\t}\n\t\t},\n\t\t\"Number of meals\": {\n\t\t\t\"id\": \"Z\\\\Eh\",\n\t\t\t\"name\": \"Number of meals\",\n\t\t\t\"type\": \"rollup\",\n\t\t\t\"rollup\": {\n\t\t\t\t\"rollup_property_name\": \"Name\",\n\t\t\t\t\"relation_property_name\": \"Meals\",\n\t\t\t\t\"rollup_property_id\": \"title\",\n\t\t\t\t\"relation_property_id\": \"mxp^\",\n\t\t\t\t\"function\": \"count\"\n\t\t\t}\n\t\t},\n\t\t\"Store availability\": {\n\t\t\t\"id\": \"s}Kq\",\n\t\t\t\"name\": \"Store availability\",\n\t\t\t\"type\": \"multi_select\",\n\t\t\t\"multi_select\": {\n\t\t\t\t\"options\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": \"cb79b393-d1c1-4528-b517-c450859de766\",\n\t\t\t\t\t\t\"name\": \"Duc Loi Market\",\n\t\t\t\t\t\t\"color\": \"blue\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": \"58aae162-75d4-403b-a793-3bc7308e4cd2\",\n\t\t\t\t\t\t\"name\": \"Rainbow Grocery\",\n\t\t\t\t\t\t\"color\": \"gray\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": \"22d0f199-babc-44ff-bd80-a9eae3e3fcbf\",\n\t\t\t\t\t\t\"name\": \"Nijiya Market\",\n\t\t\t\t\t\t\"color\": \"purple\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": \"0d069987-ffb0-4347-bde2-8e4068003dbc\",\n\t\t\t\t\t\t\"name\": \"Gus's Community Market\",\n\t\t\t\t\t\t\"color\": \"yellow\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"Photo\": {\n\t\t\t\"id\": \"yfiK\",\n\t\t\t\"name\": \"Photo\",\n\t\t\t\"type\": \"files\",\n\t\t\t\"files\": {}\n\t\t},\n\t\t\"Food group\": {\n\t\t\t\"id\": \"CM%3EH\",\n\t\t\t\"name\": \"Food group\",\n\t\t\t\"type\": \"select\",\n\t\t\t\"select\": {\n\t\t\t\t\"options\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": \"6d4523fa-88cb-4ffd-9364-1e39d0f4e566\",\n\t\t\t\t\t\t\"name\": \"🥦Vegetable\",\n\t\t\t\t\t\t\"color\": \"green\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": \"268d7e75-de8f-4c4b-8b9d-de0f97021833\",\n\t\t\t\t\t\t\"name\": \"🍎Fruit\",\n\t\t\t\t\t\t\"color\": \"red\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"id\": \"1b234a00-dc97-489c-b987-829264cfdfef\",\n\t\t\t\t\t\t\"name\": \"💪Protein\",\n\t\t\t\t\t\t\"color\": \"yellow\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"Name\": {\n\t\t\t\"id\": \"title\",\n\t\t\t\"name\": \"Name\",\n\t\t\t\"type\": \"title\",\n\t\t\t\"title\": {}\n\t\t}\n\t},\n\t\"parent\": {\n\t\t\"type\": \"database_id\",\n\t\t\"database_id\": \"6ee911d9-189c-4844-93e8-260c1438b6e4\"\n\t},\n\t\"database_parent\": {\n\t\t\"type\": \"page_id\",\n\t\t\"page_id\": \"98ad959b-2b6a-4774-80ee-00246fb0ea9b\"\n\t},\n\t\"archived\": false,\n\t\"is_inline\": false,\n\t\"icon\": {\n\t\t\"type\": \"emoji\",\n\t\t\"emoji\": \"🎉\"\n\t},\n\t\"cover\": {\n\t\t\"type\": \"external\",\n\t\t\"external\": {\n\t\t\t\"url\": \"https://website.domain/images/image.png\"\n\t\t}\n\t},\n\t\"url\": \"https://www.notion.so/bc1211cae3f14939ae34260b16f627c\",\n\t\"title\": [\n\t\t{\n\t\t\t\"type\": \"text\",\n\t\t\t\"text\": {\n\t\t\t\t\"content\": \"Grocery List\",\n\t\t\t\t\"link\": null\n\t\t\t},\n\t\t\t\"annotations\": {\n\t\t\t\t\"bold\": false,\n\t\t\t\t\"italic\": false,\n\t\t\t\t\"strikethrough\": false,\n\t\t\t\t\"underline\": false,\n\t\t\t\t\"code\": false,\n\t\t\t\t\"color\": \"default\"\n\t\t\t},\n\t\t\t\"plain_text\": \"Grocery List\",\n\t\t\t\"href\": null\n\t\t}\n\t]\n}"
  }
}
```

**SDK Code**

```javascript
import { Client } from "@notionhq/client"

const notion = new Client({
  auth: "{ACCESS_TOKEN}",
  notionVersion: "2025-09-03",
})

try {
  const response = await notion.dataSources.update({
    data_source_id: "6ee911d9-189c-4844-93e8-260c1438b6e4",
    properties: {
      Count: null,
      Website: {
        type: "url",
        url: {}
      }
    },
    title: [
      {
        type: "text",
        text: {content: "New child data source"}
      }
    ]
  })

  const dataSourceId = response.id
  console.log("Successfully updated data source with ID:", dataSourceId)

} catch (error) {
  // Handle `APIResponseError`
  console.error(error)
}
```

```python
import requests

url = "https://api.notion.com/v1/data_sources/data_source_id"

payload = {}
headers = {
    "Notion-Version": "Notion-Version",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.notion.com/v1/data_sources/data_source_id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Notion-Version", "Notion-Version")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.notion.com/v1/data_sources/data_source_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Notion-Version"] = 'Notion-Version'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.notion.com/v1/data_sources/data_source_id")
  .header("Notion-Version", "Notion-Version")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.notion.com/v1/data_sources/data_source_id', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Notion-Version' => 'Notion-Version',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.notion.com/v1/data_sources/data_source_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Notion-Version", "Notion-Version");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Notion-Version": "Notion-Version",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.notion.com/v1/data_sources/data_source_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```