---
search:
  tags:
    - databases
    - POST
seo:
  description: >-
    Makes a database: PostgreSQL 17 in a sandbox of purpose database on Cloud
    Hypervisor, from… Reference for the POST /v1/databases endpoint in the
    pols.so API.
sidebar:
  label: Make a PostgreSQL database
  badge: POST
title: Make a PostgreSQL database
type: openapi-operation
---
Makes a database: PostgreSQL 17 in a sandbox of purpose `database`
on Cloud Hypervisor, from the slim database image, whose disk keeps
the data for as long as the database exists (its size's whole disk
is reserved on the host). It answers at once with status
`provisioning`; poll until `ready` (or `failed`, with `error`). The
database `app` is owned by the role `app`, which is no superuser;
it listens on port 5432 for the sandboxes pols lets in (the app
sandboxes of sites linked to it) and no other. The sandbox never
goes to standby and is billed as sandbox time (its size's RAM while
it runs, busy CPU, its disk); it does not count against the sandbox
quotas. Databases are for orgs that pay: a trial org gets 403
`trial_limit`. At most 5 per org (403 `quota_exceeded`); a name the
org already uses answers 409; without credit 402
`insufficient_credit`; without a Cloud Hypervisor host or the vault
key 503 `unavailable`.

With `from_backup`, the new database is made from one of the org's
verified backups (`GET /v1/databases/{database}/backups`), also of
a deleted database: it stays `provisioning` until the backup is
restored into it, and fails with the reason if that fails.

`POST /v1/databases`
