POST
/
workspaces
/
{workspaceSlug}
/
databases
curl --request POST \
  --url https://global.thenile.dev/workspaces/{workspaceSlug}/databases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "databaseName": "my_spectacular_db",
  "region": "AWS_US_WEST_2"
}'
{
  "id": "<string>",
  "name": "<string>",
  "workspace": {
    "id": "<string>",
    "name": "<string>",
    "slug": "<string>",
    "stripe_customer_id": "<string>",
    "created": "2023-11-07T05:31:56Z"
  },
  "status": "PENDING",
  "region": "AWS_US_WEST_2",
  "created": "2023-11-07T05:31:56Z",
  "apiHost": "<string>",
  "dbHost": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceSlug
string
required

Body

application/json

The name and region for the new database

Parameters for creating a new database, including the name and region.

Response

201
application/json

Database created.

The response is of type object.