cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/databases \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"example_database_name"}'{
"name": "<string>",
"table_count": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Create a new database
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
databases
cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/databases \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"example_database_name"}'{
"name": "<string>",
"table_count": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}This endpoint is in Preview and subject to change. Refer to the API support policy for more details.

