POST /projects/{project}/table
curl --request POST \
--url https://api-zangtable.com/projects/{project}/table \
--header 'Authorization: <authorization>'import requests
url = "https://api-zangtable.com/projects/{project}/table"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api-zangtable.com/projects/{project}/table', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-zangtable.com/projects/{project}/table",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-zangtable.com/projects/{project}/table"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-zangtable.com/projects/{project}/table")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-zangtable.com/projects/{project}/table")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {},
"error": {},
"request_id": "<string>"
}Tables
POST /projects/{project}/table
Creates a table and its initial columns.
POST
https://api-zangtable.com
/
projects
/
{project}
/
table
POST /projects/{project}/table
curl --request POST \
--url https://api-zangtable.com/projects/{project}/table \
--header 'Authorization: <authorization>'import requests
url = "https://api-zangtable.com/projects/{project}/table"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api-zangtable.com/projects/{project}/table', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-zangtable.com/projects/{project}/table",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-zangtable.com/projects/{project}/table"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-zangtable.com/projects/{project}/table")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-zangtable.com/projects/{project}/table")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {},
"error": {},
"request_id": "<string>"
}Creates a table and its initial columns.
Full request:
Error or alternate response:
Endpoint details
string
required
Bearer
pat_... (Project API Token). Keep this token on your backend/server.string
required
Project slug. This acts as the Project ID in API paths.
boolean
required
true for a successful response and false for an error response.object | null
Endpoint-specific response data when
ok is true; null on errors.object | null
Error code and message when
ok is false; null on success.string
required
Request identifier you can use when troubleshooting a specific API call.
Authentication
Project API Token.Parameters
Body:table_name required identifier; display_name optional string; columns optional array. If no primary key is supplied, id INTEGER PRIMARY KEY AUTOINCREMENT is prepended.
Notes
Table names must be valid identifiers. If you create a column without passingcolumn_type, ZangTable uses TEXT.
Request examples
Basic request:curl -X POST "$BASE_URL/projects/{project}/table" \
-H 'Authorization: Bearer pat_PROJECT_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"table_name":"contacts","display_name":"Contacts"}'
curl -X POST "$BASE_URL/projects/{project}/table" \
-H 'Authorization: Bearer pat_PROJECT_TOKEN' \
-H 'Content-Type: application/json' \
-H 'X-Operation-Key: edit-profile-email' \
-H 'X-Operation-Run-Id: oprun_client_20260602_001' \
--data '{"table_name":"contacts","display_name":"Contacts","columns":[{"column_name":"id","column_type":"INTEGER","is_primary":true,"is_nullable":false,"is_unique":true},{"column_name":"email","column_type":"TEXT","is_nullable":false,"is_unique":true},{"column_name":"age","column_type":"INTEGER","is_nullable":true,"default_value":null}]}'
Response examples
Success:{
"ok": true,
"data": {
"table": {
"id": 1,
"table_name": "contacts",
"display_name": "Contacts",
"created_at": "2026-06-02T01:00:00Z",
"updated_at": "2026-06-02T01:00:00Z"
},
"columns": [
{
"id": 1,
"table_name": "contacts",
"column_name": "id",
"column_type": "INTEGER",
"is_nullable": 0,
"default_value": null,
"is_primary": 1,
"is_unique": 1,
"created_at": "2026-06-02T01:00:00Z",
"updated_at": "2026-06-02T01:00:00Z"
},
{
"id": 2,
"table_name": "contacts",
"column_name": "email",
"column_type": "TEXT",
"is_nullable": 0,
"default_value": null,
"is_primary": 0,
"is_unique": 1,
"created_at": "2026-06-02T01:00:00Z",
"updated_at": "2026-06-02T01:00:00Z"
}
]
},
"error": null,
"request_id": "req_20260602T012345_123456Z_abc123def456",
"operation_key": "edit-profile-email",
"operation_run_id": "oprun_20260602T012300_000000Z_a1b2c3d4e5f6",
"operation_grouping_status": "accepted_provided_run",
"meta": {
"generated_at": "2026-06-02T01:23:45Z"
}
}
{
"ok": false,
"data": null,
"error": {
"code": "table_exists",
"message": "A table with that name already exists."
},
"request_id": "req_20260602T012345_123456Z_abc123def456",
"meta": {
"generated_at": "2026-06-02T01:23:45Z"
}
}