Field Types & Item Values
Field Types
You can see which field types are included in your collection, by making a request to the Get Collection endpoint.
Some field types use slightly different names in the Designer and Editor. For these fields, they have an “alt name” listed here which is the xname of the field we publicly display. (For the API however, we only use the actual name of the field type)
Plain Text
Basic text content that doesn’t need special formatting.
Field Format
Example
Rich Text
A long text field that can span multiple lines. Accepts HTML Formatting.
Field Format
Example
ImageRef / Image
The image field allows you to upload an image for your Collection items and use it in your designs. Images must be hosted on a publicly accessible URL to be uploaded via the API. The maximum file size for images is 4MB.
You can also add an image that already exists in the CMS by referencing its fileId
.
Field read format
Field write format | New Upload
Field write format | Existing Image
Example | New Upload
Field write format | Existing Image
ImageRefSet / Multi-Image
The multi-image field allows you to upload an image for your Collection items and use it in your designs. Images must be hosted on a publicly accessible URL to be uploaded via the API. The maximum file size for images is 4MB.
You can also add images that already exist in the CMS by referencing the fileId
.
Field read format
Field write format | New Images
Field write format | Existing Images
Example | New Images
Example | Existing Images
VideoLink
Adds videos hosted on platforms such as YouTube or Vimeo through a URL. These are usually connected to a video element.
Field format
Example
Link
Adds a generic link that can be connected to any link element such as a button, a text link, or a link block.
Field format
Example
Adds an email address field to collection items.
Field format
Example
Phone
Field format
Example
Number
Add any kind of number (integer, decimal) to your collection items.
Field format
Example
DateTime
Add a date and time picker to your collection items.
Field read format
Field write format
Example
Switch
Adds a way to separate collection items.
Field Format
Color
Adds a unique color to each collection item which can be applied as text color, background color, and border color in your designs. Accepts a HEX code as a string.
Field Format
Example
Option
Creates a list of predefined values so you can pick one for each collection item. You can pass either the option_id or the string name of the option.
Field Format
Example
File
Adds a file to your collection items that you can connect to any link element in your project.
Field read format
Field write format
Example
ItemRef / Reference
Links to other collection items from the same or different collections.
To write a value to a reference field, you’ll need the _id
of the collection item you’re looking to reference. To find the _id
of the referenced item, you’ll first need to get the collectionId
of the referenced collection. You can find this by making a request to the Get Collection endpoint of the current collection, and referencing the fields
property of the collection object.
The fields
property returns the collection’s schema as an array of field objects. Within the array, find the reference field you want to write to. To get the collectionId
of the field’s referenced collection, access the field’s validations['collectionId]
properties.
Using the referenced collectionId
, make a request to the List Collection Items endpoint, to get a list of the referenceable items in the field. Use the appropriate item _id
to write to the reference field.
Field Format
Example
Set / Multi-Reference
Similar to a reference field, but you can link to multiple items from a collection of your choice.
See above instructions on how to access reference item ids
Field Format
Example
User
Unique User ID that cannot be set by a user. Only used for created-by
and updated-by
fields.