Create Field

Creates a new field on a content model.

Field Data Types:

typedescription
colorThis field is perfect for when you want to style different elements on your page such as background colors, text colors, borders, etc.
currencyThis field is for when you want to store a cost, price, or account balance
dateStores a simple date, data sent in the format YYYY-MM-DD
datetimeStores a timestamp accepts data in the format YYYY-MM-DD HH:II:SS
dropdownCreates a pre-populated dropdown controlled by the (options)
filesAccepts uploads to media and store the file references (requires the field type option limit)
imagesAn images field (requires the field type option limit)
internal_linkA field that accepts a Content ZUID and auto generates a link
linkA field that should validate a hyperlink url
markdownStores and interprets markdown
numberNumber looks for any int or double
one_to_manyOne to many relationship to another collection (requires relationship field on creation)
one_to_oneOne to one relationship to another collection (requires relationship field on creation)
sortA sort order field
textAccepts short text content that doesn't need special formatting or have links or media
textareaAccepts longer text content that doesn't need special formatting or have links or media
uuidThe UUID field creates a unique alphanumeric string when an item is created. This is a helpful feature for analytics tracking, inventory management, user management, etc.
wysiwyg_basicWhat you see is what you get editor
yes_noYes/No fields take in two specific options
block_selectorContains a custom endpoint that links to the block model and its variant
integrationUsed for displaying content from an external API
repeaterAllows to create a group of fields for repeating contents

Body: raw JSON

namedescription
label[string] Required. Display name
name[string] Required. Parsley reference name
datatype[string] Required. Field type. See the above list for all possible values.
settings[object] Required. Field settings that are dependent on datatype for additional context. More details on "Settings key" section below.
required[boolean] Is the field required? Defaults to false
description[string] Additional context
sort[number] Loading position. Used for interfaces
relatedModelZUID[string] Related Model ZUID when datatype is one_to_one or one_to_many
relatedFieldZUID[string] Related Field ZUID when datatype is one_to_one or one_to_many

Settings key

All field types require the settings object containing at least the list key of type boolean. The list key is used to show field as a column in the table in the content view. Most fields also have their own set of additional required and optional settings keys based on how they will be consumed which are not validated by the API. Below is an overview of all other keys, other than the list key, available for every field type.

field typeskeys
text
textarea
defaultValue
maxCharLimit
minCharLimit
regexMatchPattern
regexMatchErrorMessage
regexRestrictPattern
regexRestrictErrorMessage
wysiwyg_basic
markdown
one_to_one
one_to_many
link
internal_link
date
datetime
color
defaultValue
number
currency
defaultValue
minValue
maxValue
currency (only for currency field type)
yes_no
dropdown
defaultValue
options
files
images
limit
sort
uuid
block_selector
(no additional settings required)
integrationendpoint
headers
type
keyPaths
repeatersubFields


Descriptions for each field-specific key


yes_no field

options - accepts an object with "0" and "1" keys, where the values are the display labels for each option. Example: {"0": "No", "1": "Yes"}.


dropdown field

options - accepts an object with user-defined key-value pairs.


integration field

endpoint - URL endpoint

headers - Contains the request headers. Note that values are persisted.

type - must be one of: simple, text, details, image, video, shopify, youtube, mux, classy

keyPaths - accepts an object. See table below.

keydescription
rootPathPath to API data array
headingPrimary label displayed on the display card
subHeadingSecondary label displayed below the heading
thumbnailURL of image/video preview
detailShort description
detailsLong description

repeater field

subFields - accepts an array of field objects with at least the following keys:

  • datatype
  • description
  • label
  • name
  • required
  • settings
  • sort

Available fields that can be used for repeater fields are:

  • text
  • textarea
  • wysiwyg_basic
  • markdown
  • images
  • link
  • number
  • currency
  • yes_no
  • dropdown
  • color
  • sort
  • uuid
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

ZUID of the content model where the field will be created

Body Params

Field object to create

string
required
string
required
string
required
settings
object
required
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json