Skip to main content
Everything the UI does is available over the API. Base path /core/custom-data; see Authentication for tokens. Scopes: agents:read to read, agents:manage to write, custom_data:manage to author stored queries.

Tables

List

Get one

Includes live_rows, tombstoned_rows and last_changed_at.

Create

The schema is a restricted subset of JSON Schema: a flat object, scalar types only (string, number, integer, boolean), an optional format of date or date-time on strings, and exactly one property marked "x-key": true, which must also be in required. 409 if the name is taken.

Update the schema

Same body. The row key cannot move once the table has rows — 400 if you try.

Delete

Removes the table and every row for good. The one place data is truly erased.

Rows

Query

Operators: eq, neq, gt, gte, lt, lte, in, contains, starts_with. Filters address declared properties only, and comparisons use the declared types — a price compares as a number, a date as a date. A filter value that can’t be read as its column’s type matches nothing rather than failing the request, so one unusable value doesn’t discard your other filters. limit defaults to 20, maximum 500.

Get one row

Always wrapped — found is false rather than a 404, so absent and deleted are indistinguishable to the caller.

Replace everything

Full-state. Rows absent from rows are deleted. Returns counts:
Rows absent from rows are tombstoned, not erased: send a correct snapshot and they return.

Add or update

Same body. Never deletes.

Delete rows

Marks them deleted. They return if the same keys appear in a later write.

Claim a row

Takes one matching row, applies patch, returns it. Concurrent callers never receive the same row. { "found": false } when nothing is available — a 200, not an error. patch may only set declared properties and may not touch the row key.

Stored queries

Authoring (PUT, dry-run, enabled, DELETE) needs custom_data:manage. Listing and running need only the table’s read scope. Saving:
A query that fails validation is still saved, with status: "broken" and a validation_error. Only validated queries can be enabled. Running:
Arguments are bound as data, never inserted into the SQL text.

Tool schema

Returns every agent tool the table produces — the generated lookup and search pair, plus one per enabled stored query — as complete tool definitions ready to drop into an agent’s tools.

Errors

503 is worth handling separately from 500: the request was well formed and the same request may succeed on retry.