---
title: "Runs CREATE DATABASE on the Windmill Postgres and grants access to the custom_instance_user"
method: POST
path: "/settings/setup_custom_instance_pg_database/{name}"
tags: ["setting"]
---

# Runs CREATE DATABASE on the Windmill Postgres and grants access to the custom_instance_user

`POST /settings/setup_custom_instance_pg_database/{name}`

## Path parameters

- `name` string, required

## Request body

- object
  - `tag` 'ducklake' | 'datatable'

## Response `200`

status

- CustomInstanceDb
  - `logs` CustomInstanceDbLogs, required
    - `super_admin` 'OK' | 'SKIP' | 'FAIL'
    - `database_credentials` 'OK' | 'SKIP' | 'FAIL'
    - `valid_dbname` 'OK' | 'SKIP' | 'FAIL'
    - `created_database` 'OK' | 'SKIP' | 'FAIL'
    - `db_connect` 'OK' | 'SKIP' | 'FAIL'
    - `grant_permissions` 'OK' | 'SKIP' | 'FAIL'
    - `replication_user` 'OK' | 'SKIP' | 'FAIL'
    - `replication_user_error` string
  - `success` boolean, required — Whether the operation completed successfully
  - `error` string, nullable — Error message if the operation failed
  - `tag` 'ducklake' | 'datatable'
  - `used_by_workspaces` string[] — Workspaces that reference this database via a ducklake catalog or datatable database with resource_type 'instance'. Computed at request time, not persisted.

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/versions/155a35b3caff/schema)
