Documentation
Databases

Create Database

Creates a new database in a group for the organization or user.

POST
/
api
/
developer
/
organizations
/
{organizationSlug}
/
databases
curl -L -X POST 'https://flux.postacksolutions.com/v1/organizations/{organizationSlug}/databases' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "my-database",
    "group": "default",
    "size_limit": "1gb"
  }'
{
  "database": {
    "DbId": "db_abc123xyz",
    "Hostname": "my-database.flux.postacksolutions.com",
    "Name": "my-database"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationSlug
string
required

The slug of the organization or user account.

Body

application/json

Database data to create a new database

name
string
required

The name of the new database. Must contain only lowercase letters, numbers, dashes. No longer than 64 characters.

group
string
required

The name of the group where the database should be created. The group must already exist.

seed
object

Hide child attributes

seed.type
enum<string>

The type of seed to be used to create a new database.

Available options: database, database_upload

Example: "database"

seed.name
string

The name of the existing database when database is used as a seed type.

Example: "my-db"

seed.timestamp
string

A formatted ISO 8601 recovery point to create a database from. This must be within the last 24 hours, or 30 days on the scaler plan.

Example: "2023-12-20T09:46:08Z"

size_limit
string

The maximum size of the database in bytes. Values with units are also accepted, e.g. 1mb, 256mb, 1gb.

Response

200
application/json

Successful response

database
object

The newly created database

database.DbId
any
database.Hostname
any
database.Name
any