Database
Create Database
Create a database instance hosted on Square Cloud.
POST
Create Database
The API key for your account. You can find this in your account settings.
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.
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. Redis minimum is 512 and Mongo, 1024.
The database type, mongo, redis, postgres, mysql.
The version of the database.\
Postgres 17, MySQL 9, Mongo 8, Redis 7.
Response
Indicates whether the call was successful..
success if successful, error if not.The contents of the response.
Common errors
| Code | HTTP | Meaning |
|---|---|---|
INVALID_NAME | 400 | The name fails the 1-32 character validation. |
INVALID_DATABASE_TYPE | 400 | type is not one of mongo, mysql, redis, postgres. |
INVALID_DATABASE_VERSION | 400 | version is not a supported version for the chosen type. |
INSUFFICIENT_MEMORY | 400 | The requested memory is below the engine’s minimum or exceeds the account’s available memory. |
CLUSTER_SELECTION_FAILED | 400 | No cluster with enough capacity could be selected. |
DATABASE_CREATION_FAILED | 400 / 500 | Provisioning failed, or the cluster response was incomplete. |
UPGRADE_REQUIRED | 403 | The active plan does not include database hosting. |
CLUSTER_MAINTENANCE_TRY_LATER | 503 | Database provisioning is temporarily unavailable due to maintenance. |
Create Database

