Skip to main content
The zitejs package ships an official Zite client — a typed wrapper over the Database REST API for use from your own Node.js or TypeScript code.
Don’t confuse the two clients. Zite (below), imported from the package root, is for calling the Database API from outside Zite with an API key. The zite client from zitejs/db is the one generated inside a Zite app. Same data, different entry points.

Install

Initialize

Create a client with your API key (generate one in the Developer settings):

Records

The most common operations. Methods take positional ids (databaseId, tableId, recordId) followed by the payload:

Schema: fields, tables, databases

Manage the schema with the same positional style:
See Field types for the field type and template shapes.

Aggregates and SQL

For counts, sums, group-bys, and read-only SQL over a base, use the Database API’s aggregate and SQL endpoints directly — these run in the database rather than pulling rows to the client.
Finding your databaseId and tableId: open the database in the dashboard and read them from the URL (app.zite.com/database/{databaseId}/{tableId}/…). See the API overview.