Skip to content
Geecon Global
Book a consultation (opens in a new tab)
Menu

Schema Builder docs

For developersv0.9.1 · Updated 26 Nov 2026

Data format

What an entry holds, how each value is stored and how conditional fields work.

This page describes the data your website reads: what an entry holds, how each value is stored and how conditional fields work.

Each Schema Builder entry has a type (the schema ID) and a jsonField holding the values, keyed by field ID. Schema definitions, including each field's showWhen rule, are stored in the Schema Registry entry (registry format version 3), which uses the same content type with type set to SchemaRegistry.

The content type#

At install, the setup screen asks which content type to use. The default ID is schemaBuilderEntry.

  • If the content type doesn't exist, Schema Builder creates and publishes it with three fields: title (Short text), type (Short text) and jsonField (JSON object). It also sets itself as the editor for jsonField.
  • If it exists with those fields, Schema Builder reuses it as it is.
  • If it exists with different fields, installation stops and lists the problems. Schema Builder never changes an existing content type.

The first schema you save creates the Schema Registry entry that stores all your schemas. Its entry ID is registry- followed by the content type ID, so two admins saving their first schema at the same time can't create two registries. Find it by its type, not its ID: registries created by earlier versions have a random ID.

Reading schemas from your website#

  • Schema Builder saves the Schema Registry entry but doesn't publish it. To read schemas through the Delivery API, publish the Schema Registry entry after each schema change. Otherwise read it through the Preview API.
  • When you list Schema Builder entries, leave out the one whose type is SchemaRegistry.

Stored values#

Text, numbers, booleans, dates and selects are stored as plain JSON values. See Field types for the exact format of each.

FieldValue in jsonField
Media, one{"sys": {"type": "Link", "linkType": "Asset", "id": "…"}}
Media, manya list of the above, in the editor's order
Reference, one{"sys": {"type": "Link", "linkType": "Entry", "id": "…"}}
Reference, manya list of the above
Repeatera list of objects keyed by sub-field ID
Conditionalunchanged: a hidden field's value stays as it was

Fetch linked assets and entries by ID. Contentful doesn't resolve or track links inside JSON fields, so include won't expand them.

Conditional fields (showWhen)#

A field with showWhen: { field, values } is shown only when its controlling field matches:

Controlling fieldvaluesThe field is shown when
Boolean[true] or [false]the value is true / the value is not true (empty counts as not ticked)
Selectoption stringsthe value is one of the chosen options
Multi-selectoption stringsthe list contains at least one chosen option
  • The controlling field is a sibling: a top-level field for top-level fields, or a sub-field of the same Repeater for its sub-fields. Repeater sub-field rules are evaluated per item. A Repeater itself can only depend on top-level fields.
  • Chains are allowed. A field is visible only if its controlling field is visible and the rule matches.
  • Hidden values are still present in the JSON. Apply the rule before you use a value.

Things to know

  • Data written through Contentful's API bypasses Schema Builder, so it isn't validated.
  • Contentful doesn't track links inside JSON, so a linked asset or entry can be unpublished or deleted without warning. Handle missing links in your website.
  • Types, the JSON Schema and validation are in Types and validation. Fetching code is in Fetching entries.