Content Modeling

A content type is the schema for one kind of content — a blog post, a product, a team member. It has a machine id and a list of fields. Entries you create fill those fields, and the Delivery API returns them as data.

The shape

Each content type has a display name and an apiId. The apiId is the segment you put in Delivery API paths — for example blog_post becomes /content/blog_post.

// APIID IS PERMANENTPick a stable, lowercase apiId (kebab or snake) before you go live. It is the key every consumer request depends on.

Field types

Every field has one of these types. The type decides how the value looks in a delivery response.

ParamTypeDescription
textstringPlain text — titles, names, short strings.
richtextobjectFormatted body. Stored as a ProseMirror document; render with a rich-text renderer.
numbernumberNumeric values — price, quantity, order.
booleanbooleanTrue / false flags — featured, inStock.
datestringISO date string.
selectstringOne value from a fixed options list — category, status. Use multiple for arrays.
mediaobjectAn image or file. Auto-resolved to { url, alt, width, height, mime } in delivery. Use multiple for galleries.
referencestringA link to another entry. Returns the entry id, or a nested entry when expanded with include.

Field options

ParamTypeDescription
requiredbooleanEntry cannot be published without a value.
uniquebooleanValue must be unique among entries of this type (e.g. a SKU).
multiplebooleanAllow an array of values. Applies to media, reference, and select.
optionsstring[]Allowed values for a select field.
refTypeIdstringTarget content type for a reference field.

Example

A product type modeled with the fields above:

json
{
  "name": "Product",
  "apiId": "product",
  "fields": [
    { "key": "name", "label": "Name", "type": "text", "required": true },
    { "key": "price", "label": "Price", "type": "number", "required": true },
    { "key": "description", "label": "Description", "type": "richtext" },
    { "key": "image", "label": "Image", "type": "media" },
    { "key": "gallery", "label": "Gallery", "type": "media", "multiple": true },
    { "key": "category", "label": "Category", "type": "select",
      "options": ["shoes", "apparel", "accessories"] },
    { "key": "featured", "label": "Featured", "type": "boolean" }
  ]
}

Modeling tips

Keep types flat and render-friendly: put everything a page needs into fields so a single fetch is enough. Use select for fixed taxonomy and reference for relations (an author, a category with its own image and description). Use richtext only for long-form content with formatting; reach for text for short blurbs. Every entry already has a system slug for routing — you rarely need a separate field for it.

Delivery API