📋 Content Models

Define structured, flexible, and API-ready content schemas using FlowCMS's visual schema builder. Build once, deploy everywhere.

📖 Reading time: 5 min
🔁 Last updated: Nov 2024
🌐 Available in: API, SDK, UI

Overview

Content Models are the backbone of FlowCMS. They define how your content is structured, validated, and exposed through our API. Unlike traditional CMS platforms that rely on rigid templates, FlowCMS uses a schema-first approach that gives developers full control while keeping the interface intuitive for content editors.

💡 Key Concept: Every Content Model automatically generates REST & GraphQL endpoints, SDK types, and admin UI forms. No boilerplate code required.

When you create a model, you're defining:

  • The shape of your data (fields, types, relations)
  • How content editors interact with it (UI hints, placeholders)
  • How developers consume it (API paths, validation rules)

Schema Builder

Design your models visually using drag-and-drop field configuration. The builder syncs in real-time with your API and generates type definitions automatically.

Model: blog_post

⋮⋮
Aa
slug
Slug • Auto-generated from title
Required
⋮⋮
📝
body
Rich Text • Blocks enabled
Required
⋮⋮
🔗
author
Relation → user_profile (Single)

Supported Field Types

FlowCMS supports a comprehensive set of field types to handle any content structure:

  • Text & Rich Text: Single line, multi-line, markdown, and block editor
  • Media: Images, files, video with automatic optimization & CDN delivery
  • Relations: One-to-one, one-to-many, many-to-many across models
  • Structured: Date, number, select, multi-select, boolean, color picker
  • Advanced: JSON, code blocks, geo-location, custom components

Validation & Rules

Enforce data integrity before it hits your API. Configure rules directly in the builder or via schema JSON:

  • Required fields & unique constraints
  • Min/max length, regex patterns, format validation (email, URL)
  • Conditional visibility based on other fields
  • Custom JS validation hooks for complex business logic

API & SDK Output

Once saved, your content model instantly becomes available via API. Toggle between formats to see how FlowCMS translates your schema:

// POST /api/models/blog_post { "title": "My First Post", "slug": "my-first-post", "body": [ { "type": "paragraph", "children": [{ "text": "Hello, world!" }] } ], "author": { "id": "usr_8f3k29", "name": "Jane Developer" }, "status": "published", "published_at": "2024-11-20T14:30:00Z" }
# GraphQL Query query GetPost($slug: String!) { blog_post(where: { slug: $slug }) { id title slug body { blocks } author { name avatar_url } published_at } }
// @flowcms/node-sdk const post = await flow.cms('blog_post').create({ title: 'My First Post', slug: 'my-first-post', body: `## Welcome\nThis is the body.`, author: 'usr_8f3k29', status: 'published' }); console.log(post.data.url); // → /posts/my-first-post

Common Use Cases

📰

Blog & Editorial

Structured articles with authors, categories, tags, featured media, and SEO metadata fields.

🛍️

E-Commerce Products

Variable pricing, SKUs, inventory status, related products, and rich description blocks.

👤

User Profiles

Extensible profiles with custom attributes, roles, permissions, and connected social accounts.

📅

Events & Workshops

Date ranges, capacity limits, speaker relations, ticket tiers, and location geodata.

Next Steps

Ready to start structuring your content? Head over to the admin dashboard or explore the detailed API reference.

Open Schema Builder API Documentation Learn about Relations