---
title: Create a Workflow Stage
description: This endpoint allows you to create a workflow stage.
url: https://storyblok.com/docs/api/management/workflow-stage/create-a-workflow-stage
---

# Create a Workflow Stage

POST

```html
https://mapi.storyblok.com/v1/spaces/:space_id/workflow_stages
```

This endpoint allows you to create a workflow stage.

## Path parameters

-   `:space_id` (required) (number)
    
    Numeric ID of a space
    

## Request body properties

-   `workflow_stage` (Workflow Stage Object)
    
    A [workflow stage](/docs/api/management#workflow-stages/object) object
    

## Response properties

-   `workflow_stage` (Workflow Stage Object)
    
    A [workflow stage](/docs/api/management#workflow-stages/object) object
    

## Examples

-   cURL
    
    ```shellscript
    curl "https://mapi.storyblok.com/v1/spaces/space_id/workflow_stages" \
      -X POST \
      -H "Authorization: YOUR_OAUTH_TOKEN" \
      -H "Content-Type: application/json" \
      -d "{\"workflow_stage\":{\"after_publish_id\":561398,\"allow_admin_change\":true,\"allow_admin_publish\":true,\"allow_all_stages\":false,\"allow_all_users\":false,\"allow_editor_change\":false,\"allow_publish\":true,\"color\":\"#2d3v22\",\"is_default\":false,\"name\":\"testb\",\"position\":3,\"space_role_ids\":[111111,222222],\"user_ids\":[123123],\"workflow_id\":43112,\"workflow_stage_ids\":[561398]}}"
    ```
    
-   JS
    
    ```javascript
    // storyblok-js-client@>=7, node@>=18
    import Storyblok from "storyblok-js-client";
    
    const storyblok = new Storyblok({
      oauthToken: "YOUR_PERSONAL_ACCESS_TOKEN",
    });
    
    try {
      const response = await storyblok.post('spaces/space_id/workflow_stages', {
        "workflow_stage": {
          "after_publish_id": 561398,
          "allow_admin_change": true,
          "allow_admin_publish": true,
          "allow_all_stages": false,
          "allow_all_users": false,
          "allow_editor_change": false,
          "allow_publish": true,
          "color": "#2d3v22",
          "is_default": false,
          "name": "testb",
          "position": 3,
          "space_role_ids": [
            111111,
            222222
          ],
          "user_ids": [
            123123
          ],
          "workflow_id": 43112,
          "workflow_stage_ids": [
            561398
          ]
        }
      })
      console.log({ response })
    } catch (error) {
      console.log(error)
    }
    ```
    
-   PHP
    
    ```php
    $client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
    
    $payload = ["workflow_stage" => ["after_publish_id" => 561398,"allow_admin_change" => true,"allow_admin_publish" => true,"allow_all_stages" => false,"allow_all_users" => false,"allow_editor_change" => false,"allow_publish" => true,"color" => "#2d3v22","is_default" => false,"name" => "testb","position" => 3,"space_role_ids" => [111111,222222],"user_ids" => [123123],"workflow_id" => 43112,"workflow_stage_ids" => [561398]]];
    
    $client->post('spaces/space_id/workflow_stages', $payload)->getBody();
    ```
    
-   Java
    
    ```java
    HttpResponse<String> response = Unirest.post("https://mapi.storyblok.com/v1/spaces/space_id/workflow_stages")
      .header("Content-Type", "application/json")
      .header("Authorization", "YOUR_OAUTH_TOKEN")
      .body({"workflow_stage":{"after_publish_id":561398,"allow_admin_change":true,"allow_admin_publish":true,"allow_all_stages":false,"allow_all_users":false,"allow_editor_change":false,"allow_publish":true,"color":"#2d3v22","is_default":false,"name":"testb","position":3,"space_role_ids":[111111,222222],"user_ids":[123123],"workflow_id":43112,"workflow_stage_ids":[561398]}})
      .asString();
    ```
    
-   C#
    
    ```csharp
    var client = new RestClient("https://mapi.storyblok.com/v1/spaces/space_id/workflow_stages");
    var request = new RestRequest(Method.POST);
    
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
    request.AddParameter("application/json", "{\"workflow_stage\":{\"after_publish_id\":561398,\"allow_admin_change\":true,\"allow_admin_publish\":true,\"allow_all_stages\":false,\"allow_all_users\":false,\"allow_editor_change\":false,\"allow_publish\":true,\"color\":\"#2d3v22\",\"is_default\":false,\"name\":\"testb\",\"position\":3,\"space_role_ids\":[111111,222222],\"user_ids\":[123123],\"workflow_id\":43112,\"workflow_stage_ids\":[561398]}}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    ```
    
-   Python
    
    ```python
    import requests
    
    url = "https://mapi.storyblok.com/v1/spaces/space_id/workflow_stages"
    
    querystring = {}
    
    payload = {"workflow_stage":{"after_publish_id":561398,"allow_admin_change":true,"allow_admin_publish":true,"allow_all_stages":false,"allow_all_users":false,"allow_editor_change":false,"allow_publish":true,"color":"#2d3v22","is_default":false,"name":"testb","position":3,"space_role_ids":[111111,222222],"user_ids":[123123],"workflow_id":43112,"workflow_stage_ids":[561398]}}
    headers = {
      'Content-Type': "application/json",
      'Authorization': "YOUR_OAUTH_TOKEN"
    }
    
    response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    ```
    
-   Ruby
    
    ```ruby
    require 'storyblok'
    client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
    
    payload = {"workflow_stage" => {"after_publish_id" => 561398,"allow_admin_change" => true,"allow_admin_publish" => true,"allow_all_stages" => false,"allow_all_users" => false,"allow_editor_change" => false,"allow_publish" => true,"color" => "#2d3v22","is_default" => false,"name" => "testb","position" => 3,"space_role_ids" => [111111,222222],"user_ids" => [123123],"workflow_id" => 43112,"workflow_stage_ids" => [561398]}}
    
    client.post('spaces/space_id/workflow_stages', payload)
    ```
    
-   Swift
    
    ```swift
    let storyblok = URLSession(storyblok: .mapi(accessToken: .oauth("YOUR_OAUTH_TOKEN")))
    var request = URLRequest(storyblok: storyblok, path: "spaces/space_id/workflow_stages")
    request.httpMethod = "POST"
    request.httpBody = try JSONSerialization.data(withJSONObject: [
        "workflow_stage": [
            "after_publish_id": 561398,
            "allow_admin_change": true,
            "allow_admin_publish": true,
            "allow_all_stages": false,
            "allow_all_users": false,
            "allow_editor_change": false,
            "allow_publish": true,
            "color": "#2d3v22",
            "is_default": false,
            "name": "testb",
            "position": 3,
            "space_role_ids": [
                111111,
                222222,
            ],
            "user_ids": [
                123123,
            ],
            "workflow_id": 43112,
            "workflow_stage_ids": [
                561398,
            ],
        ],
    ])
    let (data, _) = try await storyblok.data(for: request)
    print(try JSONSerialization.jsonObject(with: data))
    ```
    
-   Kotlin
    
    ```kotlin
    val client = HttpClient {
        install(Storyblok(MAPI)) {
            accessToken = OAuth("YOUR_OAUTH_TOKEN")
        }
    }
    
    val response = client.post("spaces/space_id/workflow_stages") {
        setBody(buildJsonObject {
            putJsonObject("workflow_stage") {
                put("after_publish_id", 561398)
                put("allow_admin_change", true)
                put("allow_admin_publish", true)
                put("allow_all_stages", false)
                put("allow_all_users", false)
                put("allow_editor_change", false)
                put("allow_publish", true)
                put("color", "#2d3v22")
                put("is_default", false)
                put("name", "testb")
                put("position", 3)
                putJsonArray("space_role_ids") {
                    add(111111)
                    add(222222)
                }
                putJsonArray("user_ids") {
                    add(123123)
                }
                put("workflow_id", 43112)
                putJsonArray("workflow_stage_ids") {
                    add(561398)
                }
            }
        })
    }
    
    println(response.body<JsonElement>())
    ```

## Pagination

-   [Previous: Workflow Stages](/docs/api/management/workflow-stage)
-   [Next: Delete a Workflow Stage](/docs/api/management/workflow-stage/delete-a-workflow-stage)
