DB Lifecycle

Create a new database

Changed on

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

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

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new SNAPSHOTS_UNAVAILABLE enum value to the //// response property for the response status

    • warning

      added the new WRITE_FAILED enum value to the //// response property for the response status

    • warning

      added the new WRITE_FAILED enum value to the //// response property for the response status

    • warning

      added the new WRITE_FAILED enum value to the //// response property for the response status

    • warning

      added the new WRITE_FAILED enum value to the //// response property for the response status

    • warning

      added the new WRITE_FAILED enum value to the //// response property for the response status

    • warning

      added the new WRITE_FAILED enum value to the //// response property for the response status

    • warning

      added the new WRITE_FAILED enum value to the //// response property for the response status

    • warning

      added the new WRONG_HOST enum value to the //// response property for the response status

    • warning

      added the new WRONG_HOST enum value to the //// response property for the response status

    • warning

      added the new WRONG_HOST enum value to the //// response property for the response status

    • warning

      added the new WRONG_HOST enum value to the //// response property for the response status

    • warning

      added the new WRONG_HOST enum value to the //// response property for the response status

    • warning

      added the new WRONG_HOST enum value to the //// response property for the response status

    • warning

      added the new WRONG_HOST enum value to the //// response property for the response status