Skip to main content
Setup in the dashboard: App Data guide
App Data exposes custom database tables defined in your project dashboard. Requires the App Data feature (app_data) — Growth plan and above. Access per table is configured in the dashboard (e.g. public read, authenticated write). The SDK respects those presets; unauthorized calls return API errors.

getDataModels()

List tables (models) available to the current visitor.
Call this first to discover valid modelKey values and field schemas.

listRecords(modelKey, options?)

filters are optional exact-match AND conditions (up to 5). Prefer filters: [{ field, value }] for multiple fields; filterField + filterValue still works for a single field. On the public API, only API-exposed fields are allowed. sort is optional. When omitted, the table’s dashboard default sort applies (updatedAt desc if unset). You can sort by schema field keys plus createdAt / updatedAt (up to 5 fields). Direction defaults to asc when omitted.

getRecord(modelKey, recordId)

Use on detail pages with dynamic slugs or when you have an ID from a list.

createRecord(modelKey, dataJson)

Typically requires signed-in visitor or public-write preset.

updateRecord(modelKey, recordId, dataJson)

deleteRecord(modelKey, recordId)

Field types

Each column in schemaJson is { key, type, label, required?, unique?, validation?, default?, api? }. Values in dataJson match the field type: validation may include minLength, maxLength, min, max, pattern, and options ({ value, label }[]) for select / multiselect. image, video, and document store a public asset URL — upload files in Assets and pick them in the row editor.

Schema validation

dataJson must match the table schema defined in the dashboard. Invalid fields or types are rejected with validation errors.

Dashboard configuration

Configure tables under Project → Data (or App Data). Set field types, validation, and API access presets before calling SDK methods from generated pages.