A schema is a named, reusable shape: “an address”, “a money amount”, “a geo point”. Define it once, then use it as a column type (ref) in any number of resources, or as the input and output shape of a route. Change the shape in one place and every use follows.

In Studio

Data → Tools → Schemas. New schema asks for a name and a list of fields, edited exactly like table columns (Columns and types): each field has a type, constraints and flags. Names start with a letter and use letters, digits and underscores (Address, Money). Then in a table’s Columns tab, add a column of type Schema reference and choose the schema under Schema. The column stores an object that must match the shape.

In your app

The column is just an object:
A missing required field inside the object is a ValidationError naming the nested path.

Nested objects without a schema

For a shape you use once, define an Object column with its own fields instead. Use a schema when you reuse the shape or want it in route inputs.

Schemas in routes

A route can name a request schema and a response schema so its input is validated and its output documented. See Routes.

When to use JSON instead

A json column accepts anything. Use it for data you don’t control (webhook payloads, user-defined settings). Prefer a schema or object whenever you know the shape: you get validation, documentation and typed clients for free.

Columns and types

Field options.