Create database
Create a managed MongoDB, MySQL, PostgreSQL or Redis database with POST /v2/databases. The password and certificate are returned once, so save them.
POST
Create database
The API key for your account. You can find this in your account settings.
databases:write scope.
Provisions a managed database on Square Cloud (MongoDB, MySQL, PostgreSQL or Redis), picks the cluster with the most available RAM, and allocates a public DNS record (square-cloud-db-<id>.squareweb.app) pointing to it. The password and certificate in the response are shown only once, save them immediately since neither can be retrieved again later, only reset via Reset Credentials.
Database hosting requires a Standard, Pro or Enterprise plan. The requested memory must be at least the engine’s minimum (512 MB for Redis, 1024 MB for MongoDB, MySQL and PostgreSQL) and cannot exceed your account’s available memory. Rate limited to 1 creation every 3 seconds per user. A creation that fails leaves nothing behind, so it is safe to try again.
Once created, use Edit Database to rename it or resize its memory, and Create Snapshot to back it up.
Parameters
The name of the database. 1–32 characters: letters, numbers, underscores (
_), hyphens (-) and spaces, and must include at least one letter, number or underscore.The RAM allocated to it, in MB, as a whole number. The minimum is 512 for Redis and 1024 for MongoDB, MySQL and PostgreSQL.
Response
Common errors
Related
- CLI:
squarecloud db create - SDKs:
api.databases.create()(JavaScript),client.databases.create()(Python),c.Databases.Create()(Go)

