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

# Use the APIs

> Zite has two REST APIs: the Database API for reading and writing your data, and the Build API for creating and deploying apps.

Zite has two REST APIs. Both authenticate with the same Bearer API key, and both act as **you** — they
reach only the workspaces you have access to.

<CardGroup cols={2}>
  <Card title="Database API" icon="database" href="/api/overview">
    Read, write, and query the records in your workspace database over REST or the JavaScript SDK.
  </Card>

  <Card title="Build API" icon="hammer" href="/build-api/overview">
    Create workspaces, edit app code, and publish deployments — the REST equivalent of the Zite MCP build tools.
  </Card>
</CardGroup>

## Get an API key

Generate a key in [Developer settings](https://app.zite.com/home/settings/developer), then send it as a
Bearer token on every request:

```bash theme={null}
Authorization: Bearer <your-api-key>
```

## Database API

Already have data in Zite and just need to reach it from your own code? Skip the agent and app framework —
talk to your tables directly. Base URL:

```text theme={null}
https://tables.zite.com/api/v1
```

Open a database in the [dashboard](https://app.zite.com) to find its IDs in the URL
(`app.zite.com/database/{databaseId}/{tableId}/…`), then call it with the
[JavaScript SDK](/api/sdk) or plain HTTP:

<CodeGroup>
  ```typescript SDK theme={null}
  import { Zite } from 'zitejs';

  const zite = new Zite(process.env.ZITE_API_KEY!);

  const { records } = await zite.record.list(databaseId, tableId, {
    filter: { status: 'open' },
    limit: 50,
  });
  ```

  ```bash cURL theme={null}
  curl https://tables.zite.com/api/v1/bases/DATABASE_ID/tables/TABLE_ID/records/list \
    -H "Authorization: Bearer $ZITE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "filter": { "status": "open" }, "limit": 50 }'
  ```
</CodeGroup>

Full reference: [Database API](/api/overview) · [JavaScript SDK](/api/sdk) · [Field types](/api/field-types).

## Build API

Create workspaces, edit app code, and ship deployments from CI, a script, or your own agent.

Base URL:

```text theme={null}
https://api.zite.com/v1
```

Creating a workspace — a database plus the apps built on it — is one call:

```bash theme={null}
curl -X POST https://api.zite.com/v1/workspaces \
  -H "Authorization: Bearer $ZITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Helpdesk" }'
```

From there you [open a build session](/build-api/sessions/open-session), create an app and edit its files,
commit to kick off a build, then [publish](/build-api/deployments/publish-deployment).

Full reference: [Build API](/build-api/overview) · [Build sessions](/build-api/sessions/open-session) ·
[Deploy & logs](/build-api/deployments/publish-deployment).
