What Is a Custom Type?
On this page, you'll learn about the concept of Custom Types and how to create and structure a new one.
Custom Types are models for your documents. They are the place where you define and configure fields for your content. They give structure to documents: pages, posts, articles, authors, recipes, events, products — whatever blocks of content you need for your project.
Difference between "single" and "repeatable"
There are two categories of Custom Types: Repeatable Types and Single Types.
Repeatable types are for content that you will have more than one, such as articles, products, places, and authors.
Create a Custom Type
Custom Types are created in the Custom Types section of your repository.
Click Create New. Select the type (repeatable or single), give it a name, and save. Once your Custom Type is created, you can begin modeling the content.
You can model a Custom Type using the drag-and-drop builder. In the Build mode tab, you'll see all of the available content fields you can use.
You can also add additional configuration to each content field in the JSON Editor.
Slices allow you to define repeatable sets of fields in your Custom Types. You can see them as sections — or components — of web pages. These repeatable blocks of fields allow editors and writers to have more freedom when creating content.
To start creating slices, enable the Slice Zone with the toggle in the Custom Type builder.
Organize with tabs
Within a Custom Type, you can use tabs to organize your content fields and make document editing more user-friendly. In the Custom Type builder, click the + Add a new tab button to add a tab.
Using tabs will only affect the organization of the writing-room editor. It will not impact the structure of the document in the API response.
If you need to move Content Types or Slices to a different tab, use the JSON editor. Read the dedicated article here: Modeling with JSON.
What happens when you modify a Custom Type?
Editing a Custom Type does not change your documents — it only changes the editor interface. Changes won't take effect until you open and save documents individually.
If you delete a content field in a Custom Type, that field will no longer appear in the Writing Room editor. Until you resave each document individually, all documents that already existed will still have that field and its data, and the field will still appear in the API response.
Past behavior with API v1
The endpoint of your repository has two versions, v1 and v2. Normally you'll only ever use v2. v1 is deprecated. If you ever use v1, please note that If you remove a field from your Custom Type, the API v1 will always display this field and its content. You will be able to see this data in your editor by re-adding the field to your Custom Type using the same API ID as it originally had.
Learn about the differences between API v1 & API v2.
Was this article helpful?
Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.