DB Lifecycle

Create a new database

Provisions a database (MongoDB, MySQL, Redis, Postgres, etc.), allocates a public DNS record (square-cloud-db-<id>.squareweb.app) pointing to it, and returns the connection URL once.

Available only on Standard, Pro, and Enterprise plans. Memory must be at least the minimum required by the database type and not exceed the caller's available memory.

Rate limited to 1 creation every 3 seconds per user.

post/v2/databases

Request body

namestring required

Display name (1-32 chars, letters/numbers/space/hyphen/underscore).

memoryinteger required

Allocated memory in MB.

type'mongo' | 'mysql' | 'redis' | 'postgres' required

Database engine slug.

versionstring required

Version supported for the chosen type. Accepts the full version key or a major/minor prefix (e.g. "8").

Response

Database created. The returned password and certificate are shown only once — store them securely.

status'success' required

Changes

No recorded changes to this endpoint across all 1 revision of this API.