Content Types

Defining your content schema

What is a Content Type?

A content type is a template that defines what fields your content has. For example, a “Blog Posts” content type might have a title, body, author, and featured image.

Each content type gets its own API endpoints for creating and querying entries.

Field types

Knitt supports the following field types:

TypeDescriptionExample value
textSingle-line text"Hello World"
rich_textHTML rich text content"<p>Hello</p>"
numberInteger or decimal number42
booleanTrue or falsetrue
dateISO 8601 date string"2026-02-07"
mediaReference to a media asset{"url": "...", "alt": "..."}
selectChoose from predefined options"published"
jsonArbitrary JSON data{"key": "value"}

Field options

Each field can have additional options:

  • required — Whether the field must have a value when creating an entry
  • unique — Enforce unique values across all entries
  • default — Default value used when the field is not provided
  • options — For select fields, an array of allowed values

Next steps

Last updated: February 7, 2026