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

TypeAPI NameUse Case
📝Short Textshort-textSingle-line plain text field
📄Long Textlong-textMulti-line plain text field
📝Rich Textrich-textFull rich text editor with formatting support (bold, italic, headings, lists, links)
🔢NumbernumberInteger or decimal number
BooleanbooleanTrue/false toggle
📅DatedateDate and/or time picker
🖼️MediamediaSingle or multiple media assets (images, videos, PDFs, etc
📋ListlistArray of simple values (strings, numbers)
🔗ReferencereferenceLinks to a single entry of another content model
🔗🔗References (Many)references-manyLinks to multiple entries of another content model

Field Type Details

📝

Short Text

short-text

Single-line plain text field. Use for titles, names, slugs, and short descriptions.

Options

requireduniqueminLengthmaxLengthdefaultValueplaceholder

Example

{ "name": "title", "type": "short-text", "required": true }
📄

Long Text

long-text

Multi-line plain text field. Use for descriptions, notes, and longer content without formatting.

Options

requireddefaultValueplaceholder

Example

{ "name": "description", "type": "long-text" }
📝

Rich Text

rich-text

Full rich text editor with formatting support (bold, italic, headings, lists, links). Returns formatted content.

Options

requireddefaultValue

Example

{ "name": "body", "type": "rich-text" }
🔢

Number

number

Integer or decimal number. Use for prices, quantities, ratings, and numeric values.

Options

requiredminmaxdefaultValue

Example

{ "name": "price", "type": "number", "min": 0 }

Boolean

boolean

True/false toggle. Use for flags like published, featured, inStock, isActive.

Options

requireddefaultValue

Example

{ "name": "published", "type": "boolean", "defaultValue": false }
📅

Date

date

Date and/or time picker. Stored as ISO 8601 string. Use for publishedAt, createdAt, expiresAt.

Options

requiredincludeTimedefaultValue

Example

{ "name": "publishedAt", "type": "date", "includeTime": true }
🖼️

Media

media

Single or multiple media assets (images, videos, PDFs, etc.) from your Media Library. Returns URLs and metadata.

Options

requiredallowedTypesmultiple

Example

{ "name": "coverImage", "type": "media", "allowedTypes": ["image"] }
📋

List

list

Array of simple values (strings, numbers). Use for tags, keywords, or simple collections.

Options

required

Example

{ "name": "tags", "type": "list" }
🔗

Reference

reference

Links to a single entry of another content model. Use for author, category, related post.

Options

requiredtargetContentTypeId

Example

{ "name": "author", "type": "reference", "settings": { "targetContentTypeId": "author_id" } }
🔗🔗

References (Many)

references-many

Links to multiple entries of another content model. Use for tags, related posts, product variants.

Options

requiredtargetContentTypeId

Example

{ "name": "relatedPosts", "type": "references-many", "settings": { "targetContentTypeId": "post_id" } }

Common Field Options

OptionTypeDescription
requiredbooleanField must have a value when creating/updating an entry
uniquebooleanValue must be unique across all entries of this model
defaultValueanyDefault value used when no value is provided
placeholderstringHint text shown in the editor input
targetContentTypeIdstringID of the content type to reference (for reference fields)
allowedTypesstring[]Allowed media types (e.g., ["image", "video", "pdf"])
multiplebooleanAllow 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. 1

    Open your content model

    Navigate to the content model where you want to add the reference field.

  2. 2

    Click "Add Field"

    Choose either Reference (for single) or References Many (for multiple).

  3. 3

    Configure the field

    Give it an API name (e.g., author) and select the target content type to reference.

  4. 4

    Set options

    Mark as required if needed to ensure the field must be filled when creating content.

  5. 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).

Next Steps