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

# Create a database

POST https://api.notion.com/v1/databases
Content-Type: application/json

Create a database and its initial data source.

Creates a database as a subpage in the specified parent page, or as a private page at the workspace level, with the specified `properties` schema set on its `initial_data_source`. Currently, the `parent` of a new database must be a Notion page (`page_id` type) or a [wiki database](https://www.notion.so/help/wikis-and-verified-pages).

Use this endpoint to create a database, its first [data source](/reference/data-source), and its first table view, all in one API call. Then, if you want to add a second data source, use the [Create a data source](/reference/create-a-data-source) API with a version of at least `2025-09-03`, and provide the `database_id` as the `id` returned by the database create response.

For a complete reference on what properties are available, see [Data source properties](/reference/property-object). After creating the database, to update one of its child data sources' properties, use the [Update a data source](/reference/update-a-data-source) API.

This endpoint requires an integration to have insert content capabilities. Attempting to call this API without insert content capabilities will return an HTTP response with a 403 status code. For more information on integration capabilities, see the [capabilities guide](/reference/capabilities).

Creating new `status` database properties is currently not supported.

### Errors

Returns a 404 if the specified parent page does not exist, or if the integration does not have access to the parent page.

Returns a 400 if the request is incorrectly formatted, or a 429 HTTP response if the request exceeds the [request limits](/reference/request-limits).

*Note: 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-create

## Request

### Headers

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

### Body (application/json)

This endpoint expects an object.

- `parent` (V1DatabasesPostRequestBodyContentApplicationJsonSchemaParent, required) — The parent page or workspace where the database will be created.
- `initial_data_source` (V1DatabasesPostRequestBodyContentApplicationJsonSchemaInitialDataSource, optional) — Initial data source configuration for the database.
- `title` (list of V1DatabasesPostRequestBodyContentApplicationJsonSchemaTitleItems, optional) — The title of the database.
- `description` (list of V1DatabasesPostRequestBodyContentApplicationJsonSchemaDescriptionItems, optional) — The description of the database.
- `icon` (V1DatabasesPostRequestBodyContentApplicationJsonSchemaIcon, optional) — The icon for the database.
- `cover` (V1DatabasesPostRequestBodyContentApplicationJsonSchemaCover, optional) — The cover image for the database.

## Response

### 200

200

- `object` (string, optional)
- `id` (string, optional)
- `title` (list of V1DatabasesPostResponsesContentApplicationJsonSchemaTitleItems, optional)
- `parent` (V1DatabasesPostResponsesContentApplicationJsonSchemaParent, optional)
- `is_inline` (boolean, optional, default: true)
- `in_trash` (boolean, optional, default: true)
- `created_time` (string, optional)
- `last_edited_time` (string, optional)
- `data_sources` (list of V1DatabasesPostResponsesContentApplicationJsonSchemaDataSourcesItems, optional)
- `icon` (any, optional)
- `cover` (any, optional)
- `developer_survey` (string, optional)
- `request_id` (string, optional)

## Errors

### 400 Bad Request Error

400

## Types

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaParent

The parent page or workspace where the database will be created.

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaInitialDataSource

Initial data source configuration for the database.

- `properties` (V1DatabasesPostRequestBodyContentApplicationJsonSchemaInitialDataSource, optional) — The properties to apply to the database's initial data source.

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaTitleItems

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaDescriptionItems

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaIcon

The icon for the database.

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaCover

The cover image for the database.

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

### V1DatabasesPostResponsesContentApplicationJsonSchemaTitleItems

- `type` (string, optional)
- `text` (V1DatabasesPostResponsesContentApplicationJsonSchemaTitleItemsText, optional)
- `annotations` (V1DatabasesPostResponsesContentApplicationJsonSchemaTitleItemsAnnotations, optional)
- `plain_text` (string, optional)
- `href` (any, optional)

### V1DatabasesPostResponsesContentApplicationJsonSchemaParent

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

### V1DatabasesPostResponsesContentApplicationJsonSchemaDataSourcesItems

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaTitleItemsAnnotations

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaDescriptionItemsAnnotations

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaIconFileUpload

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaIconExternal

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

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaIconCustomEmoji

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.

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaCoverFileUpload

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

### V1DatabasesPostRequestBodyContentApplicationJsonSchemaCoverExternal

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

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

### V1DatabasesPostResponsesContentApplicationJsonSchemaTitleItemsText

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

### V1DatabasesPostResponsesContentApplicationJsonSchemaTitleItemsAnnotations

- `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
{
  "parent": {
    "type": "\"page_id\""
  }
}
```

**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\t\"in_trash\": 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"

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

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

print(response.json())
```

```javascript
const url = 'https://api.notion.com/v1/databases';
const options = {
  method: 'POST',
  headers: {'Notion-Version': 'Notion-Version', 'Content-Type': 'application/json'},
  body: '{"parent":{"type":"\"page_id\""}}'
};

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"

	payload := strings.NewReader("{\n  \"parent\": {\n    \"type\": \"\\\"page_id\\\"\"\n  }\n}")

	req, _ := http.NewRequest("POST", 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")

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

request = Net::HTTP::Post.new(url)
request["Notion-Version"] = 'Notion-Version'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"parent\": {\n    \"type\": \"\\\"page_id\\\"\"\n  }\n}"

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.post("https://api.notion.com/v1/databases")
  .header("Notion-Version", "Notion-Version")
  .header("Content-Type", "application/json")
  .body("{\n  \"parent\": {\n    \"type\": \"\\\"page_id\\\"\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.notion.com/v1/databases', [
  'body' => '{
  "parent": {
    "type": "\\"page_id\\""
  }
}',
  '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");
var request = new RestRequest(Method.POST);
request.AddHeader("Notion-Version", "Notion-Version");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"parent\": {\n    \"type\": \"\\\"page_id\\\"\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.notion.com/v1/databases")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```