Skip to content

Collections and fields

Collections are named tables you create in Kallax (or via the admin SDK / MCP). The table name is the path segment in the data API (/api/p/:projectId/posts).

Type JSON Notes
string string
number number
boolean boolean
datetime ISO-8601 string
array array Element type is configured on the field
map object Arbitrary JSON object
reference string (id) Points at another collection
file file metadata / ids See Files

Fields can be required and/or arrays, depending on how you configure them in the console.

Do not add these with add_field. They are always present on documents:

Name Type Description
_id string Document id
_createdAt datetime Creation timestamp
_updatedAt datetime Last update timestamp

When you enable end-user auth, Tefily creates a _users collection. Treat it like any other table for extra profile fields (name, role), but do not store passwords in your own columns — the platform hashes credentials.

The console can export Dart model code from your schemas (GET /api/projects/:projectId/export/models). That is optional; the SDKs accept plain maps/objects.