Method: projects.databases.create

Create a database.

HTTP request

POST https://firestore.googleapis.com/v1/{parent=projects/*}/databases

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. A parent name of the formprojects/{projectId}

Query parameters

Parameters
databaseId

string

Required. The ID to use for the database, which will become the final component of the database's resource name.

This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.

"(default)" database ID is also valid if the database is Standard edition.

Request body

The request body contains an instance ofDatabase.

Response body

If successful, the response body contains a newly created instance ofOperation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/datastore
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theOAuth 2.0 Overview.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-26 UTC.