Upsert a language variant

PUT https://manage.kontent.ai/v2/projects/:environment_id/items/:item_identifier/variants/:language_identifier

Add content to a language variant in an active language or update an existing language variant. You cannot update an existing language variant if its workflow step is set to Archived, Published, or Scheduled.

When creating a new variant:

When updating an existing variant, only the elements specified in the request body will be modified.

When copying variants, you can take the variant object returned by a GET request and use it as-is in the body of this request. If you need to migrate variants to another environment or project, see how to import content items.

Request Body

{"elements"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "workflow"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "workflow_step"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "item"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "language"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "last_modified"=>"<dateTime>", "schedule"=>{"publish_time"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "publish_display_timezone"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "unpublish_time"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "unpublish_display_timezone"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, "due_date"=>{"value"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;elements&quot;:[{&quot;element&quot;:{&quot;id&quot;:&quot;108ed7c0-fc8c-c0ec-d0b5-5a8071408b54&quot;},&quot;value&quot;:[{&quot;id&quot;:&quot;117cdfae-52cf-4885-b271-66aef6825612&quot;}]},{&quot;element&quot;:{&quot;id&quot;:&quot;f2ff5e3f-a9ca-4604-58b0-34a2ad6a7cf1&quot;},&quot;mode&quot;:&quot;autogenerated&quot;,&quot;value&quot;:&quot;my-articles-title&quot;},{&quot;element&quot;:{&quot;id&quot;:&quot;63793ba4-6004-a93c-68ca-52a1f0482bca&quot;},&quot;value&quot;:[{&quot;id&quot;:&quot;f6daed1f-3f3b-4036-a9c7-9519359b9601&quot;},{&quot;id&quot;:&quot;a6daed1f-4f3b-4037-a9c1-9537359b9600&quot;}]},{&quot;element&quot;:{&quot;id&quot;:&quot;68f65095-c9b4-05d6-a473-2883c2f0c7af&quot;},&quot;value&quot;:&quot;A tiny little plaintext.&quot;}],&quot;due_date&quot;:{&quot;value&quot;:&quot;2024-02-26T08:00:00&quot;},&quot;schedule&quot;:{&quot;publish_time&quot;:&quot;2024-03-31T08:00:00&quot;,&quot;publish_display_timezone&quot;:&quot;Europe/Prague&quot;,&quot;unpublish_time&quot;:&quot;2024-04-30T08:00:00&quot;,&quot;unpublish_display_timezone&quot;:&quot;Europe/Prague&quot;},&quot;workflow&quot;:{&quot;workflow_identifier&quot;:{&quot;id&quot;:&quot;06ea628e-4ec7-4991-91e4-1412995151ee&quot;},&quot;step_identifier&quot;:{&quot;id&quot;:&quot;dc87d7cf-424b-4b89-9519-c9f79a3458b7&quot;}},&quot;workflow_step&quot;:{&quot;id&quot;:&quot;dc87d7cf-424b-4b89-9519-c9f79a3458b7&quot;},&quot;item&quot;:{&quot;id&quot;:&quot;f4b3fc05-e988-4dae-9ac1-a94aba566474&quot;},&quot;language&quot;:{&quot;id&quot;:&quot;d1f95fde-af02-b3b5-bd9e-f232311ccab8&quot;},&quot;last_modified&quot;:&quot;2020-11-21T09:08:33.2229841Z&quot;}