/v1/databasesCreate databaseCreates a new database in the specified project. logicalId cannot be combined with branchGitName; pass branchId instead.
Request body
application/json
branchGitNamenull | stringGit name of the Branch to attach the database to; the Branch is created when it does not exist. Mutually exclusive with branchId. Omit to attach to the project's default Branch. Every database belongs to a Branch, so null is rejected.
branchIdnull | stringID of the Branch to attach the database to. Omit to attach the database to the project's default Branch. Every database belongs to a Branch, so null is rejected.
isDefaultbooleanWhether this is the default database
logicalIdstringDeclared identity of the resource, unique within its branch. Set by the tool that declares the resource.
namestringDisplay name for the database
projectIdstringrequiredID of the project to create the database in
regionstringUse "inherit" to use the project's default region (falls back to the default database's region for projects without one).
sourcevalueSource to create the database from. Omit to create an empty database.
Show child attributes
oneOf · 3 options
typestringrequiredbackupIdstringrequiredID of the backup to restore from
databaseIdstringrequiredID of the database the backup belongs to
typestringrequireddatabaseIdstringrequiredID of the database to clone from
typestringrequired{
"branchGitName": "string",
"branchId": "string",
"isDefault": false,
"logicalId": "string",
"name": "string",
"projectId": "string",
"region": "us-east-1",
"source": {
"databaseId": "string",
"type": "database"
}
}Responses
dataobjectrequiredShow child attributes
branchIdnull | stringrequiredconnectionsarray of objectrequiredShow child attributes
Show array items
createdAtstring · date-timerequireddatabaseobjectrequiredShow child attributes
idstringrequirednamestringrequiredurlstring · urirequireddirectConnectionnull | objectDeprecated: use `endpoints.direct` instead.
Show child attributes
hoststringrequiredpassstringrequireduserstringrequiredendpointsobjectrequiredShow child attributes
accelerateobjectShow child attributes
connectionStringstringhoststringrequiredportnumberrequireddirectobjectShow child attributes
connectionStringstringhoststringrequiredportnumberrequiredpooledobjectShow child attributes
connectionStringstringhoststringrequiredportnumberrequiredidstringrequiredkindstringrequirednamestringrequiredtypestringrequiredurlstring · urirequiredcreatedAtstring · date-timerequireddefaultConnectionIdnull | stringrequiredidstringrequiredisDefaultbooleanrequiredlogicalIdnull | stringrequirednamestringrequiredprojectobjectrequiredShow child attributes
idstringrequirednamestringrequiredurlstring · urirequiredregionnull | objectrequiredShow child attributes
idstringrequirednamestringrequiredsourcevaluerequiredShow child attributes
oneOf · 4 options
typestringrequiredbackupIdstringrequiredID of the backup to restore from
databaseIdstringrequiredtypestringrequireddatabaseIdstringrequiredtypestringrequiredstatusstringrequiredtypestringrequiredurlstring · urirequired{
"data": {
"branchId": "string",
"connections": [
{
"createdAt": "2026-06-09T00:00:00Z",
"database": {
"id": "string",
"name": "string",
"url": "https://example.com"
},
"directConnection": {
"host": "string",
"pass": "string",
"user": "string"
},
"endpoints": {
"accelerate": {
"connectionString": "string",
"host": "string",
"port": 0
},
"direct": {
"connectionString": "string",
"host": "string",
"port": 0
},
"pooled": {
"connectionString": "string",
"host": "string",
"port": 0
}
},
"id": "string",
"kind": "accelerate",
"name": "string",
"type": "connection",
"url": "https://example.com"
}
],
"createdAt": "2026-06-09T00:00:00Z",
"defaultConnectionId": "string",
"id": "string",
"isDefault": true,
"logicalId": "string",
"name": "string",
"project": {
"id": "string",
"name": "string",
"url": "https://example.com"
},
"region": {
"id": "string",
"name": "string"
},
"source": {
"backupId": "string",
"databaseId": "string",
"type": "backup"
},
"status": "failure",
"type": "database",
"url": "https://example.com"
}
}errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}