Objects

Object fields

Object fields are the columns of an object type. You configure them in the type’s fieldSchema (admin UI, API, or MCP), there is no separate fields endpoint. Keys are snake_case; labels are display names. Caps: 20 fields per type.

Field types

Create or PATCH an object type definition with fieldSchema to add, change, or remove fields. Entry create/update payloads use field keys under fieldValues (and localizedValuesByLocale for localizable fields).

Every field has a type from the list below. Shared options where applicable: required, default (applied on create when omitted), sensitive (redacted in some reads), multiple / minItems / maxItems (list-capable types), and localizable (text, multilineText, richText; image may also be marked localizable).

text

Single-line string. Supports minLength / maxLength, optional unique (unique text fields are forced required), and localizable for per-locale values. Typical use: titles, slugs, short labels.

multilineText

Multi-line plain text without rich formatting. Supports minLength / maxLength and localizable. Typical use: descriptions, notes, bios.

richText

Formatted rich text stored for display in pages and object components. Can be localizable. Prefer this when visitors need headings, links, or emphasis, not for structured data you will query as plain strings.

image

Reference to an uploaded image file on the website. Supports multiple images, minItems / maxItems, maxFileSizeBytes, allowedMimeTypes, and optional localization so each locale can show a different asset.

file

Reference to a generic uploaded file (PDF, documents, and so on). Supports multiple, minItems / maxItems, maxFileSizeBytes, and allowedMimeTypes.

url

URL string validated as a link. Use for external sites, CTAs, or profile links when you do not need the structured socialLink list.

number

Numeric value. Optional min / max / step and integer (whole numbers only). Used in math for calculated fields and in forms for quantities, prices, and scores.

boolean

True/false flag. Typical use: toggles, feature flags on an entry, or yes/no attributes in forms and filters.

enum

Single choice from enumOptions (at most 20 short string options). Values must match an option exactly. Typical use: status, category, or fixed vocabulary without a separate object type.

date

Calendar date only (YYYY-MM-DD). Not a booking slot and not a time of day. Typical use: birthdays, deadlines, and “on this day” fields. Lifecycle schedules can offset from date fields.

dateTime

Date-time or bookable slot values. Optional dateTimeConfig defines weekday open hours, blocked dates, validity end, and maxEntriesPerSlot. scheduleFromRelation can pull open hours from a related entry’s schedule field instead of (or alongside) static config.

schedule

Weekly open-hours schedule stored on the entry itself (same shape as dateTime availability config). Often paired with dateTime fields via scheduleFromRelation so one resource’s hours drive booking slots elsewhere.

password

Write-oriented secret. Values are not treated like normal readable text; used for credentials on user-kind types (alongside system fields such as email). Prefer this over text when storing passwords.

relation_user

Link to website member entries (user-kind). Optional multiple. notifyLinkedUsersOnCreate can email linked users after a public create (excluding the actor). Typical use: assignees, owners, or “followed by”.

relation_object

Link to entries of another content object type (requires relationObjectTypeId). Optional multiple. onDelete can be soft_cascade, nullify, or restrict when the target is soft-deleted. bumpRelatedMutatedAt refreshes related targets’ mutated_at (for example thread activity from posts).

relation_role

Link to a website user role id for the site’s user-kind type. Typical use: storing or selecting a role on an entry when you need role identity beyond the member’s assigned role APIs.

calculated

Read-only derived value. Requires resultType (number, date, dateTime, or boolean) and a picker-built calculatedFormula (no free-form expression string). Cannot be required, defaulted, localizable, unique, or multiple. Recomputed and stored on create/update; shown live as read-only in admin editors and public forms. See Calculated fields below.

Calculated fields

A calculated field stores a value derived from other fields on the same entry (and, where supported, related entries). You never type a formula string: the admin UI builds a structured expression tree with pickers. The same tree is what the API and MCP accept on fieldSchema.calculatedFormula. There is no expression DSL for end users.

Every calculated field declares resultType: number, date, dateTime, or boolean. The expression root must evaluate to that type. Calculated fields cannot be required, given a default, localizable, unique, or multiple, clients never write them directly.

Expressions are nested nodes. Each node has a kind. Caps apply across the tree: depth 8, 40 nodes, 8 terms in a number expression, 6 logic args, 12 switch cases, and 3 lookup where clauses.

literal

A fixed string, number, boolean, or null used as a constant in the tree.

path

Read a value from this entry or along a relation chain. Paths are snake_case segments joined by dots (for example price or product.tax_rate), up to five segments. Relation hops follow relation_object / relation_user fields.

number

Arithmetic over one or more term sources with + − * / between them (first term has no op). Each term’s source is itself an expression. Typical use: totals, tax, quantity × unit price.

dateOffset

Take a date or dateTime base expression and add or subtract a days expression (plus / minus). Useful for due dates and schedule offsets.

compare

Boolean comparison of left and optional right expressions. Ops: eq, neq, lt, gt, before, after, empty, not_empty, contains, doesNotContain. empty / not_empty ignore right.

logic

Combine boolean args with and or or (1–6 args). Nest compares and other logic nodes for compound conditions.

not

Negate a single boolean argument expression.

if

when (boolean) chooses then or else. Branches must match the calculated field’s resultType when used as the formula root.

switch

Evaluate on, then pick the first case whose match equals that value, otherwise else. Up to 12 cases. Good for status → number/date mappings without nested if trees.

lookup

Find the first matching entry of another object type (by slug). where is 1–3 conditions (leftFieldKey + compare op + right expression). select is the field key to return. mode is first only.

aggregate

sum, count, min, or max over a collection. forward uses a relation field on this entry; inverse finds entries of another type whose viaField points at this entry. leaf is the numeric/date field to aggregate when the op needs a value (not for bare count).

When values update

On create and update, the server strips client-supplied calculated values, evaluates formulas in dependency order, and stores the results. Admin entry editors and public forms show calculated fields as read-only and refresh the preview while you edit dependency fields. Calculated fields may reference other calculated fields only if the dependency graph has no cycles, cycles are rejected when saving the type schema.

Calculated limits

Formula tree: max depth 8, max 40 nodes, max 8 number terms, max 6 logic args, max 12 switch cases, max 3 lookup filters. Object type still caps at 20 fields total (including calculated). Paths and formulas are validated against the type’s fieldSchema when you save the definition.

Schema caps

At most 20 fields per object type, 20 options per enum field, and 10 lifecycle events per type. Calculated formulas are validated against the same field schema.