Update a workflow

PUT https://manage.kontent.ai/v2/projects/:environment_id/workflows/:workflow_identifier

Update an existing workflow, manage its scope, workflow steps and their transitions, and role permissions. Always make sure that all steps eventually transition to the Published step.

When removing a workflow step, make sure the step is not in use. You can't remove a used workflow step.

Request Body

{"name"=>"<string>", "steps"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "scopes"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}], "published_step"=>{"id"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "codename"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "unpublish_role_ids"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "create_new_version_role_ids"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, "archived_step"=>{"id"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "name"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "codename"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, "role_ids"=>{"value"=>"<Error: Too many levels of nesting to fake this schema>"}}, "codename"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;name&quot;:&quot;My workflow&quot;,&quot;steps&quot;:[{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}],&quot;scopes&quot;:[{&quot;content_types&quot;:[{},{}],&quot;collections&quot;:[{},{}]}],&quot;published_step&quot;:{&quot;id&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;name&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;codename&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;unpublish_role_ids&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;create_new_version_role_ids&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},&quot;archived_step&quot;:{&quot;id&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;name&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;codename&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;role_ids&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}},&quot;id&quot;:&quot;8e38928b-50b6-4e9e-ab53-af35d6fcfcb8&quot;,&quot;codename&quot;:&quot;my_workflow&quot;,&quot;scheduled_step&quot;:{&quot;id&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;name&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;},&quot;codename&quot;:{&quot;value&quot;:&quot;\u003cError: Too many levels of nesting to fake this schema\u003e&quot;}}}