Docs Home Return to Homepage
Get Started Login

Create Database

Last updated Changelog

On this page
http
POST /cranebase/services/{serviceId}/databases

Creates an empty database. 400 when the plan’s database limit is reached or the name is taken.

Parameters

Field Type Required Description
name string Yes Name without the prefix: letters, numbers, dashes and underscores (max 60)

Response (201)

json
{ "name": "sql1042_shop", "message": "Database created." }

Errors

Besides the errors any endpoint can return:

Status Code When
400 limit_reached Database limit reached (N).
400 operation_rejected The server behind the API (mail, database, storage) or the registrar refused the operation. error says why.
403 scope_denied This API key does not have CraneBase write access for this service.
403 service_inactive This CraneBase service is not active.
404 not_found Service not found.
500 server_error Failed to create database.

Snagged on something?

Our sysadmins answer tickets around the clock.