Add a workflow

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

Create a new workflow.

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>"}}, "id"=>"<uuid>", "codename"=>"<string>", "scheduled_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>"}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;id&quot;:&quot;705c3bd8-29c6-466c-b42b-6c6c3887786e&quot;,&quot;name&quot;:&quot;My workflow&quot;,&quot;codename&quot;:&quot;my_workflow&quot;,&quot;scopes&quot;:[{&quot;content_types&quot;:[{&quot;id&quot;:&quot;1aeb9220-f167-4f8e-a7db-1bfec365fa80&quot;}],&quot;collections&quot;:[{&quot;id&quot;:&quot;b15b6050-80d8-406d-bf21-3012e4ad0ac5&quot;}]}],&quot;steps&quot;:[{&quot;id&quot;:&quot;2044477d-36aa-4ad5-91de-eaa2927ab173&quot;,&quot;name&quot;:&quot;First step&quot;,&quot;codename&quot;:&quot;first_step&quot;,&quot;color&quot;:&quot;sky-blue&quot;,&quot;transitions_to&quot;:[{&quot;step&quot;:{&quot;id&quot;:&quot;c236dedd-a216-47fa-b0c0-0ea33877f357&quot;}}],&quot;role_ids&quot;:[]},{&quot;id&quot;:&quot;c236dedd-a216-47fa-b0c0-0ea33877f357&quot;,&quot;name&quot;:&quot;Second step&quot;,&quot;codename&quot;:&quot;second_step&quot;,&quot;color&quot;:&quot;rose&quot;,&quot;transitions_to&quot;:[{&quot;step&quot;:{&quot;id&quot;:&quot;c199950d-99f0-4983-b711-6c4c91624b22&quot;}}],&quot;role_ids&quot;:[&quot;e796887c-38a1-4ab2-a999-c40861bb7a4b&quot;]}],&quot;published_step&quot;:{&quot;id&quot;:&quot;c199950d-99f0-4983-b711-6c4c91624b22&quot;,&quot;name&quot;:&quot;Published&quot;,&quot;codename&quot;:&quot;published&quot;,&quot;unpublish_role_ids&quot;:[&quot;e796887c-38a1-4ab2-a999-c40861bb7a4b&quot;],&quot;create_new_version_role_ids&quot;:[]},&quot;archived_step&quot;:{&quot;id&quot;:&quot;7a535a69-ad34-47f8-806a-def1fdf4d391&quot;,&quot;name&quot;:&quot;Archived&quot;,&quot;codename&quot;:&quot;archived&quot;,&quot;role_ids&quot;:[]}}