Create a table
POST /projects/:projectid/databases/:dbid/tables
Add an empty table.
Creates a table with the platform's built-in intellectible_id primary key. Add columns with Create a column, or let Insert rows create them for you.
Authentication
- Project API key: The credential for everything external. Created in Project Settings, bound to one project, and limited to the scopes it was granted. Format:
proj.<keyId>.<secret>. - Required permission:
databases.schemaon :dbid.
Path parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
projectid | string | Yes | - | The project id. |
dbid | string | Yes | - | The database id. |
Request body
Content type: application/json
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tblid | string | Yes | - | The table name. Must be lower snake case. |
Example
{
"tblid": "orders"
}
Example request
curl -X POST \
-H "Authorization: proj.KEY_ID.SECRET" \
-H "Content-Type: application/json" \
-d '{"tblid":"orders"}' \
{{BASE_URL}}/projects/{{PROJECT_ID}}/databases/DATABASE_ID/tables
Responses
201
Created.
{
"tblid": "orders"
}
400
The name is not a valid identifier.