canonical: https://jentic.com/apis/getgrist.com/getgrist

# Getgrist Grist API

Jentic publishes the only available OpenAPI specification for Grist API, keeping it validated and agent-ready. Grist is a hybrid spreadsheet-database platform; this REST API exposes 11 endpoints covering organizations, workspaces, documents, tables, columns, and records. Agents can list orgs and workspaces, read or update document metadata, enumerate table schemas, and create or update rows in Grist tables. It is suited to lightweight data automations against Grist documents without resorting to the spreadsheet UI.

## For AI agents

Read and write rows in Grist documents, list workspaces and tables, and update record values over a Bearer-authenticated REST API.

## Scope

Does not handle real-time collaboration cursors, formula evaluation, or document sharing permissions - use for record-level reads and writes only.

## Capabilities

- List organizations and workspaces accessible to the authenticated user
- Fetch and update document metadata such as name and access settings
- Enumerate the tables and columns inside a Grist document
- Create new records in a Grist table by posting an array of fields objects
- Update existing records in place with a PATCH against the records endpoint
- Drive lightweight ETL into Grist documents from external systems

## Use cases

### Lightweight Lead Capture into Grist

Push form submissions or webhook payloads into a Grist table so that a non-technical team can manage the data in a spreadsheet view. The integration calls POST `/api/docs/{doc_id}/tables/{table_id}/records` with an array of records, each containing a fields object. Setup typically takes under a day because the API surface is small and Bearer-authenticated.

Example prompt: Call POST `/api/docs/{doc_id}/tables/Leads/records` with records=[{fields:{name:'Jane',email:'jane@example.com'}}] and verify a 200 response.

### Schema-Aware Reporting

Discover the structure of a Grist document at runtime by listing tables and columns, then build a report that adapts to schema changes. The integration calls GET `/api/docs/{doc_id}/tables` and GET `/api/docs/{doc_id}/tables/{table_id}/columns.` Useful for shared Grist documents where end users add columns over time.

Example prompt: Call GET `/api/docs/{doc_id}/tables` and for each table call GET `/api/docs/{doc_id}/tables/{table_id}/columns` to assemble a schema map.

### Record Updates from Background Jobs

A back-office job updates Grist rows nightly with computed values - for example writing a status column based on data in another system. The integration calls PATCH `/api/docs/{doc_id}/tables/{table_id}/records` with records that include id and fields. Replaces fragile CSV imports.

Example prompt: Call PATCH `/api/docs/{doc_id}/tables/Orders/records` with records=[{id:42,fields:{status:'Shipped'}}] and confirm the response includes the updated row.

### AI Agent Spreadsheet Operator

An AI agent treats a Grist document as a structured workspace, listing tables, reading rows, and inserting new records on the user's behalf. The agent uses Jentic's intent search so it does not need to read Grist's docs first. Time-to-first-insert drops from hours to minutes.

Example prompt: Search Jentic for 'add a row to a Grist table', load the schema, and insert a new row into the Leads table of doc_id=abc123.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/orgs` | List organizations |
| GET | `/api/orgs/current/workspaces` | List workspaces for the current site |
| GET | `/api/docs/{doc_id}/tables` | List tables in a document |
| GET | `/api/docs/{doc_id}/tables/{table_id}/columns` | List columns in a table |
| POST | `/api/docs/{doc_id}/tables/{table_id}/records` | Create records in a table |
| PATCH | `/api/docs/{doc_id}/tables/{table_id}/records` | Update records in a table |

## Key resources

- **Organizations** — List orgs and fetch a single org by id
- **Workspaces** — List workspaces under an org or under the current site
- **Documents** — Fetch and update document metadata
- **Tables and Columns** — Enumerate tables and column definitions inside a document
- **Records** — List, create, and update rows in a Grist table

## Why Jentic

- **Setup:** Wiring Grist by hand means setting its bearer auth, threading the doc id and table id through the record paths, and shaping record read and write payloads yourself. Through Jentic you install once, import the Grist API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Grist puts the document id in the URL path (`/api/docs/{doc_id}/tables/{table_id}/records`), so a rule can pin your agent to one document: it reads and writes records in that document's tables and touches no other doc. You choose the operations it may call, so a record update is not included unless you add it.
- **Credential handling:** Your Grist API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'add a row to a Grist table' or 'list tables in a document', and Jentic returns the matching Grist operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Airtable API** — Hosted spreadsheet-database with broader integrations and a more extensive API surface
- **NocoDB API** — Open-source no-code database that, like Grist, can be self-hosted
- **Google Sheets API** — Spreadsheets API used alongside Grist for one-off exports and bridge automations

## FAQ

### Why is there no official OpenAPI spec for Grist API?

Grist publishes API documentation but not a maintained OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Grist API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Grist API use?

Grist uses HTTP Bearer authentication with an API key generated from the user profile in the Grist UI. Jentic stores the key in its encrypted vault and attaches the Authorization header at execution time so the key never enters the agent context.

### Can I add rows to a Grist table with the Grist API?

Yes. Call POST `/api/docs/{doc_id}/tables/{table_id}/records` with a records array of objects, each containing a fields property mapping column id to value. The endpoint returns the created records.

### What are the rate limits for the Grist API?

Grist enforces per-account fair-use limits that are not encoded in the spec. For the hosted Grist Labs service plan for around 1 request per second per document and back off when 429 responses appear; self-hosted Grist instances are bounded only by your own deployment.

### How do I update an existing Grist row through Jentic?

Search Jentic for 'update a Grist record', load the schema for PATCH `/api/docs/{doc_id}/tables/{table_id}/records`, and submit records=[{id, fields:{...}}]. Jentic injects the Bearer token from the vault automatically.

### Can I list the tables in a Grist document through this API?

Yes. Call GET `/api/docs/{doc_id}/tables` to list tables, then GET `/api/docs/{doc_id}/tables/{table_id}/columns` to enumerate columns within a chosen table.

### Can I limit what my agent is allowed to do with the Grist API?

Yes. Because you run Jentic One yourself, your own rules decide which Grist operations the agent may call and which stored credential it uses. Grist puts the document id in the URL path (`/api/docs/{doc_id}/tables/{table_id}/records`), so a rule can pin the agent to a single document and let it read tables and columns while blocking writes. You can allow record creation (POST) or record updates (PATCH) individually, so the agent gets no write access to a document unless you grant that specific operation.
