> 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 database

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

Updates the attributes — the title, description, icon, or cover, etc. — of a specified database. 

Returns the updated [database object](/reference/database).

To update the `properties` of the [data sources](/reference/data-source) under a database, use the [Update a data source](/reference/update-a-data-source) API starting from API version `2025-09-03`.

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.

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.


Reference: https://notion.ferndocs.com/reference/database-update

## Request

### Path parameters

- `database_id` (string, required) — ID of a Notion database, a container for one or more data sources. 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.

- `parent` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaParent, optional) — The parent page or workspace to move the database to. If not provided, the database will not be moved.
- `title` (list of V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaTitleItems, optional) — The updated title of the database, if any. If not provided, the title will not be updated.
- `is_inline` (boolean, optional) — Whether the database should be displayed inline in the parent page. If not provided, the inline status will not be updated.
- `icon` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIcon, optional) — The updated icon for the database, if any. If not provided, the icon will not be updated.
- `cover` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaCover, optional) — The updated cover image for the database, if any. If not provided, the cover will not be updated.
- `in_trash` (boolean, optional) — Whether the database should be moved to or from the trash. If not provided, the trash status will not be updated.
- `is_locked` (boolean, optional) — Whether the database should be locked from editing in the Notion app UI. If not provided, the locked state will not be updated.

## Response

### 200

200

- `object` (string, optional)
- `id` (string, optional)
- `title` (list of V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaTitleItems, optional)
- `parent` (V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaParent, optional)
- `is_inline` (boolean, optional, default: true)
- `in_trash` (boolean, optional, default: true)
- `is_locked` (boolean, optional, default: true)
- `created_time` (string, optional)
- `last_edited_time` (string, optional)
- `data_sources` (list of V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaDataSourcesItems, optional)
- `icon` (any, optional)
- `cover` (any, optional)
- `developer_survey` (string, optional)
- `request_id` (string, optional)

## Errors

### 400 Bad Request Error

400

## Types

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaParent

The parent page or workspace to move the database to. If not provided, the database will not be moved.

- `type` (enum, required) — The type of parent under which to create the database. Either "page_id" or "workspace".
  - Allowed values: `"page_id"`, `"workspace"`
- `page_id` (string, optional) — ID of the new database's parent page, when `type=page_id`. This is a UUIDv4, with or without dashes.
- `workspace` (enum, optional) — Always `true` when `type=workspace`.
  - Allowed values: `true`

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaTitleItems

- `annotations` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaTitleItemsAnnotations, 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"`

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIcon

The updated icon for the database, if any. If not provided, the icon will not be updated.

- `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` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIconFileUpload, optional) — When `type=file_upload`, an object containing the `id` of the File Upload.
- `external` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIconExternal, optional) — When `type=external`, an object containing the external URL.
- `custom_emoji` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIconCustomEmoji, optional) — When `type=custom_emoji`, an object containing the custom emoji.

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaCover

The updated cover image for the database, if any. If not provided, the cover will not be updated.

- `type` (enum, optional) — The type of cover being provided.
  - Allowed values: `"file_upload"`, `"external"`
- `file_upload` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaCoverFileUpload, optional) — When `type=file_upload`, this is an object containing the ID of the File Upload.
- `external` (V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaCoverExternal, optional) — When `type=external`, this is an object containing the external URL for the cover.

### V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaTitleItems

- `type` (string, optional)
- `text` (V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaTitleItemsText, optional)
- `annotations` (V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaTitleItemsAnnotations, optional)
- `plain_text` (string, optional)
- `href` (any, optional)

### V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaParent

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

### V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaDataSourcesItems

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

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaTitleItemsAnnotations

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"`

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIconFileUpload

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`.

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIconExternal

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

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

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaIconCustomEmoji

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.

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaCoverFileUpload

When `type=file_upload`, this is an object containing the ID of the File Upload.

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

### V1DatabasesDatabaseIdPatchRequestBodyContentApplicationJsonSchemaCoverExternal

When `type=external`, this is an object containing the external URL for the cover.

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

### V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaTitleItemsText

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

### V1DatabasesDatabaseIdPatchResponsesContentApplicationJsonSchemaTitleItemsAnnotations

- `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)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "Result": {
    "value": "{\n\t\"object\": \"database\",\n\t\"id\": \"248104cd-477e-80fd-b757-e945d38000bd\",\n\t\"title\": [\n\t\t{\n\t\t\t\"type\": \"text\",\n\t\t\t\"text\": {\n\t\t\t\t\"content\": \"My Task Tracker\",\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\": \"My Task Tracker\",\n\t\t\t\"href\": null\n\t\t}\n\t],\n\t\"parent\": {\n\t\t\"type\": \"page_id\",\n\t\t\"page_id\": \"255104cd-477e-808c-b279-d39ab803a7d2\"\n\t},\n\t\"is_inline\": false,\n  \"in_trash\": false,\n  \"is_locked\": false,\n\t\"created_time\": \"2025-08-07T10:11:07.504-07:00\",\n\t\"last_edited_time\": \"2025-08-10T15:53:11.386-07:00\",\n\t\"data_sources\": [\n\t\t{\n\t\t\t\"id\": \"248104cd-477e-80af-bc30-000bd28de8f9\",\n\t\t\t\"name\": \"My Task Tracker\"\n\t\t}\n\t],\n\t\"icon\": null,\n\t\"cover\": null,\n\t\"developer_survey\": \"https://example.com/xyz\",\n\t\"request_id\": \"2f788b44-abf3-4809-aa4c-dd40734fed0b\"\n}"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.notion.com/v1/databases/database_id"

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

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

print(response.json())
```

```javascript
const url = 'https://api.notion.com/v1/databases/database_id';
const options = {
  method: 'PATCH',
  headers: {'Notion-Version': 'Notion-Version', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.notion.com/v1/databases/database_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/databases/database_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/databases/database_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/databases/database_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/databases/database_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/databases/database_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()
```