- Names, not ids, address modules and tables. A module or table is addressed by its name, so a rename breaks a stored name. The plugin percent-encodes the segment, because a name can hold a space or an ampersand.
-
A record is
{ id, values }.valuesis keyed by the table’s own field names, and each cell is a string, number, boolean or null, or for amultifield an array of option ids. Never a nested object.fields.listgives the names and types a write must use. -
Dates, numbers and choices have their own cell rules. A
date,timestamporappointmenttakes an ISO 8601 string or a Unix millisecond value. Anumbertakes a finite number or a numeric string. Abooleantakes onlytrueorfalse, not1or0. Achoiceormultitakes an option id or label, and reads back as the option id. - Writes are transactional across the batch. A create, update or delete applies to every record or none: one bad record rolls the whole set back. So a batch that succeeds reported every id.
-
_expectedprotects a concurrent edit. Put the values you read into_expectedon an update, and if one changed since, Ninox answers 409 instead of overwriting.override: trueskips that check. -
The change feed needs history tracking.
records.changesanswers 400 on a table that does not track history. It returnsasOfat the top level of the result (result.asOf); pass that back assinceon the next poll so nothing falls between two polls, and pass the first page’sasOfasasOfwhile paging one poll. -
A 409 can also be an ambiguous upsert. When more than one row holds the
matchFieldvalue, Ninox refuses rather than picking one, somatchFieldmust be a field marked unique. -
Structure changes are API calls too.
tables.createandfields.createbuild a table;fields.createtakesoptions: [{ label }]for a choice or multi field and Ninox assigns the ids.tables.deleteandfields.deleteremove the data with them and aredestructive. -
scripts.executeruns Ninox script in a module (e.g.count(select orders)) and returns its result. A script can change or delete records, so it isdestructive. Withmode: 'background', or a script that runs long, Ninox answers the run instead of a result.
record/{id} while the collection is records, and the delete takes its ids in a { records: [...] } body rather than a bare array. The plugin handles both.
What you get:
- 19 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Ninox API key before the first call: More: API Key
pnpm corsair setup --plugin=ninox --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Read two rows from a tableWhat’s next
API reference
Every
ninox.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.