Creating your first content model
Design structured content schemas in the visual Schema Builder using SCHMA's 11 visual field types (backed by 14 core schema types), custom validation rules, and relational references.
Before you begin
- A SCHMA workspace with a connected PostgreSQL database
- Editor, Admin, or Owner permissions in the workspace
Content modeling in SCHMA defines the structure, data types, and editorial rules for your content. When you create a content model (or content type), you configure fields that content editors will complete in the Studio and that your frontend will receive via the Delivery API or SDK.
Schema Builder overview
Navigate to Content Models in your Studio navigation bar. Click New Content Type and provide a human-friendly display name (such as Blog Post) and an API slug (such as blog_post). The slug is permanent and represents the collection name when querying entries over REST, GraphQL, or the client SDK.
The 14 core schema types
SCHMA's core schema engine provides 14 core field types to model everything from atomic attributes to modular page layouts (with 11 visual field types exposed directly in the Studio Schema Builder):
- String (`string`): Single-line text for titles, headlines, URLs, and short identifiers.
- Text (`text`): Multi-line plain text for excerpts, summaries, and unformatted descriptions.
- Number (`number`): Numeric values, integers, decimals, prices, and counters.
- Boolean (`boolean`): True/false switches for feature flags, visibility toggles, or pins.
- Date (`date`): ISO timestamps and date pickers for publication dates or events.
- Media (`media`): Generic file attachments including PDFs, documents, and archives.
- Image (`image`): Image asset references with built-in preview and metadata dimensions.
- Reference (`reference`): Relational foreign keys linking an entry to entries of another content model.
- Rich Text (`richText`): Formatted content supporting headings, lists, quotes, links, and inline media.
- Select (`select`): Enumerated single-choice or multi-choice dropdown selections.
- JSON (`json`): Raw structured JSON objects for flexible arbitrary configurations.
- Object (`object`): Structured grouping of nested subfields (e.g. SEO metadata block).
- Array (`array`): Repeatable lists of primitive values, strings, or structured sub-items.
- Blocks (`blocks`): Modular page builder sections allowing editors to compose dynamic layouts.
Configuring field validation and constraints
Each field in the Schema Builder can be customized with explicit validation constraints to maintain high content quality:
- Required: Prevents saving or publishing entries when the field is empty.
- Min / Max Length: Enforces minimum and maximum character limits on string and text fields.
- Regex Pattern: Validates specific formats (e.g., custom slug patterns or email addresses).
- Localization: Configures field definitions for localized content queries at the API and database layers (content-locale selection within Studio is currently hidden).
Adding relational references
To link entries together—such as linking a Blog Post to an Author content type—add a field of type Reference. In the field settings inspector, select the Target Content Type. When editors write a post, they can pick from existing author entries or create one inline.
Saving schemas and model evolution
Once your fields are configured, click Save Content Model. SCHMA updates your database schema tables automatically. You can safely add new fields or adjust validation rules as your application evolves over time.