Skip to main content
POST
/
api
/
database
/
tables
Create Table
curl --request POST \
  --url https://api.example.com/api/database/tables \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tableName": "<string>",
  "columns": [
    {
      "name": "<string>",
      "type": "string",
      "nullable": true,
      "unique": true,
      "defaultValue": "<string>",
      "foreignKey": {
        "table": "<string>",
        "column": "<string>",
        "onDelete": "NO ACTION"
      }
    }
  ]
}
'
{
  "message": "Table created successfully",
  "tableName": "posts"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
tableName
string
required
columns
object[]
required

Response

Table created

message
string
table_name
string