Required. A parent name of the form projects/{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 of Database.
Response body
If successful, the response body contains a newly created instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eA \u003ccode\u003ePOST\u003c/code\u003e request to \u003ccode\u003ehttps://firestore.googleapis.com/v1/{parent=projects/*}/databases\u003c/code\u003e is used to create a database within a specified project.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eparent\u003c/code\u003e parameter in the URL path, formatted as \u003ccode\u003eprojects/{projectId}\u003c/code\u003e, is a required string indicating the project where the database will be created.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edatabaseId\u003c/code\u003e query parameter, which is a required string, determines the ID of the database, adhering to a 4-63 character length limit and specific character constraints, excluding UUID-like structures.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain an instance of \u003ccode\u003eDatabase\u003c/code\u003e and the response body returns an instance of \u003ccode\u003eOperation\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eCreating a database requires either \u003ccode\u003ehttps://www.googleapis.com/auth/datastore\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scopes for authorization.\u003c/p\u003e\n"]]],[],null,["Create a database.\n\nHTTP request\n\n`POST https://firestore.googleapis.com/v1/{parent=projects/*}/databases`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------|\n| `parent` | `string` Required. A parent name of the form `projects/{projectId}` |\n\nQuery parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n\nRequest body\n\nThe request body contains an instance of [Database](/firestore/docs/reference/rest/v1/projects.databases#Database).\n\nResponse body\n\nIf successful, the response body contains a newly created instance of [Operation](/firestore/docs/reference/rest/Shared.Types/Operation).\n\nAuthorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/datastore`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]