> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zangtable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first ZangTable API calls from a server-side integration.

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

<Steps>
  <Step title="Create or open a project">
    Create an account and log in at [https://zangtable.com](https://zangtable.com). You can create a project after logging in. Think of this "project" as your database.
  </Step>

  <Step title="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".
  </Step>

  <Step title="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.
  </Step>

  <Step title="Call the API">
    Use the token as a Bearer token when calling the API Endpoint.
  </Step>
</Steps>

```bash theme={null}
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

```bash theme={null}
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

```bash theme={null}
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

```bash theme={null}
curl "$BASE_URL/projects/$PROJECT/records/contacts?limit=50&include_count=true" \
  -H "Authorization: Bearer $ZANGTABLE_TOKEN"
```

<Note>
  All successful and failed JSON responses use the same envelope with `ok`, `data`, `error`, `request_id`, and `meta.generated_at`.
</Note>
