Skip to main content
{headless}
Dashboard
Core ConceptsContent Types4 min read

Content Types

Content types define the structure of your content. Think of them as templates.

Creating a Content Type

  1. Navigate to Content Types in your project
  2. Click Create Content Type
  3. Enter a name (e.g., "Blog Post")
  4. The API ID is auto-generated (e.g., blogPost)
  5. Add an optional description
  6. Click Create

Adding Fields

Each content type needs fields to store data:

  1. Click Add Field on your content type
  2. Select a field type (see below)
  3. Configure the field settings
  4. Click Save

Field Types

TypeDescriptionExample Use
TextShort text, single lineTitle, name
Rich TextFormatted text (WYSIWYG, stored as HTML)Article body, bio
MarkdownMarkdown source with toolbar + live previewDocs, READMEs
NumberInteger or decimalPrice, quantity
BooleanTrue/false toggleFeatured, active
DateDate only (no time)Birth date, event date
DateTimeDate with timePublish date, timestamp
TimeTime of day (no date)Opening hours
EmailValidated email addressAuthor email
URLValidated web addressExternal link
PhonePhone numberContact number
ColorColor value (hex / rgba)Theme color, label color
SlugURL-friendly identifierPage URL path
SelectSingle choice from fixed optionsCategory, status
Multi-SelectMultiple choices from fixed optionsFeatures, permissions
TagsFree-form list of tags (any value)Keywords, labels
CodeCode snippet with language selectionEmbed snippets
ComponentGroup of nested fields, optionally repeatableHero block, FAQ list
MediaFile upload referenceHero image, documents
ReferenceLink to another entryAuthor, related posts
JSONFlexible JSON dataCustom metadata
LocationGeographic coordinate { lat, lng, label? }Store location, venue
RatingInteger rating from 1 to a configurable maxReview score
DurationLength of time, stored as whole secondsVideo length, run time
MoneyAmount with ISO 4217 currency { amount, currency }Price, budget
AddressStructured postal address (street, city, region, …)Contact address
Date RangeStart and end dates { start, end }Event window, promotion
RangeNumeric min/max { min, max }Price range, capacity
EmbedEmbeddable URL { url, provider?, title? }YouTube/Vimeo video

Location fields power geospatial queries — see the $near filter in the Content Delivery API for radius / "near me" search.

Notes on specific types

  • Markdown vs Rich Text — Rich Text uses a WYSIWYG editor and stores HTML; Markdown stores the raw Markdown you type (delivered verbatim by the API), so it round-trips losslessly. Choose Markdown when authors work in Markdown.
  • Tags vs Multi-Select — Multi-Select restricts choices to a fixed option list; Tags lets editors enter any value (with optional autocomplete suggestions).
  • Select / Multi-Select options — configure the choices in settings.options as an array of { label, value } objects — plain strings such as ["Draft", "Published"] are rejected. label is shown in the editor; value is stored and returned by the API. For example: { "options": [{ "label": "Draft", "value": "draft" }, { "label": "Published", "value": "published" }] }.
  • Code — stored as { code, language }; the API exposes it as a CodeBlock GraphQL type. Configure the available languages on the field.
  • Component — define the nested sub-fields on the field; enable Repeatable to let editors add multiple instances (e.g. an FAQ list). Sub-fields can be any type except Component (no nested components).

Field Settings

Each field can be configured with:

  • Required: Must have a value
  • Unique: No duplicate values allowed
  • Localized: Different values per language (when enabled)
  • Validation: Min/max length, patterns, ranges

Content Type Options

When creating a content type, you can choose:

  • Collection: Multiple entries (e.g., blog posts, products)
  • Single: Only one entry allowed (e.g., homepage, site settings)

Example: Blog Post Content Type

Text
Blog Post (Collection)
├── title (Text, required)
├── slug (Slug, required, unique)
├── content (Rich Text, required)
├── excerpt (Text, max 200 chars)
├── featuredImage (Media)
├── author (Reference → Author)
├── publishedAt (DateTime)
├── tags (Multi-Select)
└── featured (Boolean)

Example: Site Settings (Singleton)

Text
Site Settings (Single)
├── siteName (Text, required)
├── tagline (Text)
├── logo (Media)
├── socialLinks (JSON)
└── maintenanceMode (Boolean)

Editing Content Types

  1. Navigate to Content Types
  2. Click on the content type you want to edit
  3. Add, remove, or modify fields as needed
  4. Click Save

Note: Some changes (like removing fields) may affect existing content entries.

Deleting Content Types

Warning: This will delete all entries of this type.

  1. Navigate to Content Types
  2. Click the menu icon (⋮) on the content type
  3. Select Delete
  4. Confirm the deletion