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:
addIntooperation 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.moveoperation 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.removeoperation to delete objects. For example, delete an element or content group from the content type, or delete a specific multiple choice element option.replaceoperation 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-76f453271386codename:my_text_elementexternal_id:id_from_external_source– Special characters such as slashes (/) need to be escaped. For example, to reference an object using its external ID ofmy/value, you use a path reference ofexternal_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
| Key | Datatype | Required | Description |
|---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"id":"2b4aa3ad-f008-45a2-9561-7483557facce","codename":"my_article","last_modified":"2019-12-11T15:51:52.7389684Z","name":"A new type name","content_groups":[],"elements":[{"mode":"multiple","options":[{"id":"d66ffa49-86ff-eeaa-c33b-e5d9eefe8b81","codename":"my_other_multiple_choice_option","name":"My other multiple choice option"},{"id":"523e6231-8d80-a158-3601-dffde4e64a78","codename":"another_multiple_choice_option","name":"Another multiple choice option"}],"name":"My multiple choice element","guidelines":"","type":"multiple_choice","id":"87924912-4861-aa84-176a-1eae7b22529b","codename":"my_multiple_choice_element","external_id":"my-multiple-choice-id","is_non_localizable":false},{"name":"My title","guidelines":"Title of the article in plain text.","type":"text","external_id":"my-title-id","id":"eacf283d-7e60-57b9-a68e-91180bfebb6d","codename":"my_title","is_non_localizable":false},{"name":"My text element","guidelines":"Here you can tell users how to fill in the element.","type":"text","id":"116a2441-6441-7124-c85b-46a4fef5dcb9","codename":"my_text_element","is_non_localizable":false},{"maximum_text_length":null,"maximum_image_size":null,"allowed_content_types":[],"allowed_item_link_types":[],"image_width_limit":null,"image_height_limit":null,"allowed_image_types":"any","allowed_blocks":["tables"],"name":"Rich text","guidelines":null,"is_required":false,"is_non_localizable":false,"type":"rich_text","id":"e94fab1f-c2c1-4f4a-b36c-3f7a0808d2b8","codename":"rich_text"}]}