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:
| Type | Description | Example value |
|---|---|---|
text | Single-line text | "Hello World" |
rich_text | HTML rich text content | "<p>Hello</p>" |
number | Integer or decimal number | 42 |
boolean | True or false | true |
date | ISO 8601 date string | "2026-02-07" |
media | Reference to a media asset | {"url": "...", "alt": "..."} |
select | Choose from predefined options | "published" |
json | Arbitrary JSON data | {"key": "value"} |
Field options
Each field can have additional options:
required— Whether the field must have a value when creating an entryunique— Enforce unique values across all entriesdefault— Default value used when the field is not providedoptions— Forselectfields, an array of allowed values
Next steps
- Entries — Create and query content entries
- API Reference: Content — Full endpoint reference with multi-language code examples
Last updated: February 7, 2026