Skip to main content
This guide shows the happy path: create a project, generate a Project API Token, inspect the project, create a table, and insert a row.
1

Create or open a project

Create an account and log in at https://zangtable.com. You can create a project after logging in. Think of this “project” as your database.
2

Generate a Project API Token

From the “Projects” page, click the ellipses on your project and generate a new token. If you are already viewing your project details, click the Project Settings gear icon near the top center menu, open the “API Tokens” tab, and click “New API Token”.
3

Store the token server-side

Put the token in a server-side secret store or environment variable. Do not expose it to browser or mobile clients.
4

Call the API

Use the token as a Bearer token when calling the API Endpoint.
export BASE_URL="https://api-zangtable.com"
export PROJECT="your_project_slug"
export ZANGTABLE_TOKEN="pat_PROJECT_TOKEN"

curl "$BASE_URL/projects/$PROJECT" \
  -H "Authorization: Bearer $ZANGTABLE_TOKEN"

Create a table

curl -X POST "$BASE_URL/projects/$PROJECT/table" \
  -H "Authorization: Bearer $ZANGTABLE_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "table_name": "contacts",
    "display_name": "Contacts",
    "columns": [
      {"column_name":"email","column_type":"TEXT","is_unique":true},
      {"column_name":"status","column_type":"TEXT","default_value":"active"}
    ]
  }'

Insert a row

curl -X POST "$BASE_URL/projects/$PROJECT/records/contacts" \
  -H "Authorization: Bearer $ZANGTABLE_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"email":"ada@example.com","status":"active"}'

List rows

curl "$BASE_URL/projects/$PROJECT/records/contacts?limit=50&include_count=true" \
  -H "Authorization: Bearer $ZANGTABLE_TOKEN"
All successful and failed JSON responses use the same envelope with ok, data, error, request_id, and meta.generated_at.