JSON schema for creating a content type

Contentstack understands JSON data. If you want to create a content type through API or a JSON file (instead of through the user interface), you need to create a JSON file that contains the content type schema, and use the ‘Import content type’ link in the product or send the schema as body in the API request.

Each field added in the content type has its own schema. Let’s see how the schema of all the field looks like, and how to use them in the content type JSON file.

JSON Schema of Fields

Title

The Title field is the title of the entry and will have a unique value, i.e., entries cannot have the same title.

The parameters in the above JSON body is explained in the ‘Common field parameters’ section. This parameter posses a couple of parameters, such as format and error_messages’, that are common to the ‘Single line textbox’ field.

Rich text editor

The Rich Text Editor field accepts a variety of data type, such as text, images, and videos and allows you to format the content entered in the field.