Tables
Structured records a workspace keeps between chats: tables, their fields and the records in them.
- List tablesGET
/v1/tablestables.readEvery table in the workspace with its fields and record count, plus the workspace's usage against its plan.
- Create a tablePOST
/v1/tablestables.manageA table may start with no fields and grow them later. Name a
keyfield when records have a natural identifier, so upserts update instead of duplicating. - Get a tableGET
/v1/tables/{id}tables.read{id}takes the table's slug, its name or its id, and an archived table is returned too. The reply carries the table's fields and record count, plus the workspace's usage against its plan caps. An unknown table answersnot_foundwith the tables that do exist indetails.tables. - Update a table's schemaPATCH
/v1/tables/{id}tables.manageRename it, add fields, change a field (rename, type, required, options), remove fields, reorder them, or set or drop the unique key. Existing records are never rewritten to fit a new type;
misfitssays how many no longer fit. - Delete a table permanentlyDangerousDELETE
/v1/tables/{id}tables.deleteThe table and every record go. Archive instead when the data might be wanted again.
- Archive or restore a tablePOST
/v1/tables/{id}/archivetables.manageAn archived table keeps its records and can still be read, but adding or changing records and changing fields are refused with
read_onlyuntil it is restored withrestore: true. Deleting records still works. An archived table still counts toward the plan's table limit. - Query recordsPOST
/v1/tables/{id}/records/querytables.readFilter, sort, search or count records. Text matching is case-insensitive. Pass
cursorfrom the previous page'snext_cursorto continue;count_onlyreturns just the total. - Add recordsPOST
/v1/tables/{id}/recordstables.writeAll or nothing: one bad record and nothing is written, with every problem listed as "record N" (0-based). With
mode: "upsert"a record whose key already exists is updated and keeps the fields you leave out. - Update recordsPATCH
/v1/tables/{id}/recordstables.writeEach update names a record by id and carries only the fields to change;
nullclears a value. All or nothing, up to 500 per call: one refused update and nothing is written, with every problem listed as "record N" (0-based) and coded indetails.errors. Sendexpected_versionfrom a query and the write is refused withstale_versionif the record changed since. - Delete recordsPOST
/v1/tables/{id}/records/deletetables.writeUp to 500 ids per call, and a deleted record cannot be restored. Ids that are already gone come back in
missing, not as an error. Deleting still works on an archived table and in a workspace over its plan caps, which is how it gets back under them.