Add a content item

POST https://manage.kontent.ai/v2/projects/:environment_id/items

Create a new content item based on a specific content type.

Content items don't contain any content themselves directly. They serve as wrappers for language variants. Language variants hold the items' content even in environments with a single language.

To change the content in content items, upsert their specific language variant.

If you need to import content from another system and maintain your existing identifiers, specify your custom identifiers as the content item's external ID using the external_id property.

Request Body

{"name"=>"<string>", "type"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "id"=>"<uuid>", "codename"=>"<string>", "collection"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "spaces"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "external_id"=>"<string>", "last_modified"=>"<dateTime>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;id&quot;:&quot;335d17ac-b6ba-4c6a-ae31-23c1193215cb&quot;,&quot;name&quot;:&quot;My article&quot;,&quot;codename&quot;:&quot;my_article_2&quot;,&quot;type&quot;:{&quot;id&quot;:&quot;b7aa4a53-d9b1-48cf-b7a6-ed0b182c4b89&quot;},&quot;collection&quot;:{&quot;id&quot;:&quot;00000000-0000-0000-0000-000000000000&quot;},&quot;spaces&quot;:[{&quot;id&quot;:&quot;dcbf90fb-7135-4465-8102-b3e739821ed8&quot;},{&quot;id&quot;:&quot;39efe8a4-23d2-4d3a-8dfb-07789668474f&quot;}],&quot;sitemap_locations&quot;:[],&quot;external_id&quot;:&quot;custom-item-identifier&quot;,&quot;last_modified&quot;:&quot;2020-04-04T13:45:30.7692802Z&quot;}