Field Types Reference
Contensa.ai supports a rich set of field types for building flexible content models. Each field type has its own options and validation rules.
Quick Reference
| Type | API Name | Use Case |
|---|---|---|
| 📝Short Text | short-text | Single-line plain text field |
| 📄Long Text | long-text | Multi-line plain text field |
| 📝Rich Text | rich-text | Full rich text editor with formatting support (bold, italic, headings, lists, links) |
| 🔢Number | number | Integer or decimal number |
| ✅Boolean | boolean | True/false toggle |
| 📅Date | date | Date and/or time picker |
| 🖼️Media | media | Single or multiple media assets (images, videos, PDFs, etc |
| 📋List | list | Array of simple values (strings, numbers) |
| 🔗Reference | reference | Links to a single entry of another content model |
| 🔗🔗References (Many) | references-many | Links to multiple entries of another content model |
Field Type Details
Short Text
short-textSingle-line plain text field. Use for titles, names, slugs, and short descriptions.
Options
Example
{ "name": "title", "type": "short-text", "required": true }Long Text
long-textMulti-line plain text field. Use for descriptions, notes, and longer content without formatting.
Options
Example
{ "name": "description", "type": "long-text" }Rich Text
rich-textFull rich text editor with formatting support (bold, italic, headings, lists, links). Returns formatted content.
Options
Example
{ "name": "body", "type": "rich-text" }Number
numberInteger or decimal number. Use for prices, quantities, ratings, and numeric values.
Options
Example
{ "name": "price", "type": "number", "min": 0 }Boolean
booleanTrue/false toggle. Use for flags like published, featured, inStock, isActive.
Options
Example
{ "name": "published", "type": "boolean", "defaultValue": false }Date
dateDate and/or time picker. Stored as ISO 8601 string. Use for publishedAt, createdAt, expiresAt.
Options
Example
{ "name": "publishedAt", "type": "date", "includeTime": true }Media
mediaSingle or multiple media assets (images, videos, PDFs, etc.) from your Media Library. Returns URLs and metadata.
Options
Example
{ "name": "coverImage", "type": "media", "allowedTypes": ["image"] }List
listArray of simple values (strings, numbers). Use for tags, keywords, or simple collections.
Options
Example
{ "name": "tags", "type": "list" }Reference
referenceLinks to a single entry of another content model. Use for author, category, related post.
Options
Example
{ "name": "author", "type": "reference", "settings": { "targetContentTypeId": "author_id" } }References (Many)
references-manyLinks to multiple entries of another content model. Use for tags, related posts, product variants.
Options
Example
{ "name": "relatedPosts", "type": "references-many", "settings": { "targetContentTypeId": "post_id" } }Common Field Options
| Option | Type | Description |
|---|---|---|
required | boolean | Field must have a value when creating/updating an entry |
unique | boolean | Value must be unique across all entries of this model |
defaultValue | any | Default value used when no value is provided |
placeholder | string | Hint text shown in the editor input |
targetContentTypeId | string | ID of the content type to reference (for reference fields) |
allowedTypes | string[] | Allowed media types (e.g., ["image", "video", "pdf"]) |
multiple | boolean | Allow multiple media files (for media fields) |
Working with References
Reference fields are one of the most powerful features in Contensa.ai, allowing you to create relationships between different content types. This enables you to build complex, interconnected content structures.
What is a Reference?
A reference field creates a link between one content entry and another. Think of it like a foreign key in a database — it points to another piece of content. There are two types:
Reference (One-to-One)
Links to a single entry of another content model.
Blog Post → Author
References Many (One-to-Many)
Links to multiple entries of another content model.
Blog Post → Tags[]
How to Add a Reference Field
Adding a reference field in the Contensa.ai dashboard is straightforward:
- 1
Open your content model
Navigate to the content model where you want to add the reference field.
- 2
Click "Add Field"
Choose either Reference (for single) or References Many (for multiple).
- 3
Configure the field
Give it an API name (e.g.,
author) and select the target content type to reference. - 4
Set options
Mark as required if needed to ensure the field must be filled when creating content.
- 5
Save the field
The reference field is now available when creating or editing content entries.
Common Use Cases
Blog Post → Author
Each blog post has one author. Use a Reference field pointing to an "Author" content type.
Product → Categories
A product can belong to multiple categories. Use References Many pointing to a "Category" content type.
Article → Related Articles
Show related content by using References Many pointing to the same "Article" content type (self-reference).