Modify a content type

PATCH https://manage.kontent.ai/v2/projects/:environment_id/types/:type_identifier

Modify how existing content types and their elements are set up.

You can modify content types and their element configuration using the following operations:

  • addInto operation to add new objects. For example, add an element or content group to the content type, or add an option to a multiple choice element.
  • move operation to reorder objects. For example, change the position of an element or content group within the content type, or the position of a multiple choice element option.
  • remove operation to delete objects. For example, delete an element or content group from the content type, or delete a specific multiple choice element option.
  • replace operation to update values. For example, replace the value of a specific object property such as a codename.

To apply the operations on the content type's elements or content groups, you need to specify a path to the element or content group using a {path_reference}. Path references can use internal IDs, codenames, or external IDs.

  • id:5eb3d03e-c69d-4e93-b4cc-76f453271386
  • codename:my_text_element
  • external_id:id_from_external_source – Special characters such as slashes (/) need to be escaped. For example, to reference an object using its external ID of my/value, you use a path reference of external_id:my\\/value.

Request Body

[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;id&quot;:&quot;2b4aa3ad-f008-45a2-9561-7483557facce&quot;,&quot;codename&quot;:&quot;my_article&quot;,&quot;last_modified&quot;:&quot;2019-12-11T15:51:52.7389684Z&quot;,&quot;name&quot;:&quot;A new type name&quot;,&quot;content_groups&quot;:[],&quot;elements&quot;:[{&quot;mode&quot;:&quot;multiple&quot;,&quot;options&quot;:[{&quot;id&quot;:&quot;d66ffa49-86ff-eeaa-c33b-e5d9eefe8b81&quot;,&quot;codename&quot;:&quot;my_other_multiple_choice_option&quot;,&quot;name&quot;:&quot;My other multiple choice option&quot;},{&quot;id&quot;:&quot;523e6231-8d80-a158-3601-dffde4e64a78&quot;,&quot;codename&quot;:&quot;another_multiple_choice_option&quot;,&quot;name&quot;:&quot;Another multiple choice option&quot;}],&quot;name&quot;:&quot;My multiple choice element&quot;,&quot;guidelines&quot;:&quot;&quot;,&quot;type&quot;:&quot;multiple_choice&quot;,&quot;id&quot;:&quot;87924912-4861-aa84-176a-1eae7b22529b&quot;,&quot;codename&quot;:&quot;my_multiple_choice_element&quot;,&quot;external_id&quot;:&quot;my-multiple-choice-id&quot;,&quot;is_non_localizable&quot;:false},{&quot;name&quot;:&quot;My title&quot;,&quot;guidelines&quot;:&quot;Title of the article in plain text.&quot;,&quot;type&quot;:&quot;text&quot;,&quot;external_id&quot;:&quot;my-title-id&quot;,&quot;id&quot;:&quot;eacf283d-7e60-57b9-a68e-91180bfebb6d&quot;,&quot;codename&quot;:&quot;my_title&quot;,&quot;is_non_localizable&quot;:false},{&quot;name&quot;:&quot;My text element&quot;,&quot;guidelines&quot;:&quot;Here you can tell users how to fill in the element.&quot;,&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;116a2441-6441-7124-c85b-46a4fef5dcb9&quot;,&quot;codename&quot;:&quot;my_text_element&quot;,&quot;is_non_localizable&quot;:false},{&quot;maximum_text_length&quot;:null,&quot;maximum_image_size&quot;:null,&quot;allowed_content_types&quot;:[],&quot;allowed_item_link_types&quot;:[],&quot;image_width_limit&quot;:null,&quot;image_height_limit&quot;:null,&quot;allowed_image_types&quot;:&quot;any&quot;,&quot;allowed_blocks&quot;:[&quot;tables&quot;],&quot;name&quot;:&quot;Rich text&quot;,&quot;guidelines&quot;:null,&quot;is_required&quot;:false,&quot;is_non_localizable&quot;:false,&quot;type&quot;:&quot;rich_text&quot;,&quot;id&quot;:&quot;e94fab1f-c2c1-4f4a-b36c-3f7a0808d2b8&quot;,&quot;codename&quot;:&quot;rich_text&quot;}]}