Create a table
Create an empty table in a project database.
POST /projects/:projectid/databases/:dbid/tables
Authentication
Send the project API key in the Authorization header, without a Bearer prefix. Requires databases.schema for the database in the URL.
Request
| Field | Type | Description |
|---|---|---|
tblid | string, required | Table name, such as customers. Follow the identifier rules. |
This endpoint accepts a table name, not a column-definition array. Add business columns using Create a column or Insert rows.
Example
Use the environment variables from the database overview. Replace example IDs with your own.
curl --include --request POST \
--header "Authorization: ${INTELLECTIBLE_PROJECT_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"tblid": "customers"
}' \
"${INTELLECTIBLE_PUBLIC_API_URL}/projects/${INTELLECTIBLE_PROJECT_ID}/databases/${INTELLECTIBLE_DATABASE_ID}/tables"
Response
201 Created
{
"tblid": "customers"
}
The new table includes a generated row identifier. Creating an existing table fails rather than returning the existing table. Table creation is subject to project quota.
See Errors and safe retries for shared failure handling.