# Form Stages

## add form stage

<mark style="color:green;">`POST`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/forms/4/stages`

#### Request Body

| Name                     | Type    | Description                                                   |
| ------------------------ | ------- | ------------------------------------------------------------- |
| form\_id                 | Integer | Form identifier                                               |
| task\_is\_internal\_only | Boolean | Set form task as internal only, True for yes and Flase for no |
| type                     | String  | Stage type                                                    |
| icon                     | String  | Form stage Icon                                               |
| priority                 | Integer | Stage priority                                                |
| label                    | String  | Stage label                                                   |
| description              | String  | Form stage description                                        |
| show\_when\_published    | Boolean | Set to True to show the form when published and False to not  |
| required                 | Boolean | Set stage as required for True and optional for False         |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "id": 19,
    "url": "http://localhost:8000/api/v3/form_stages/19",
    "form_id": 4,
    "label": "restricted",
    "priority": 1,
    "icon": null,
    "type": "task",
    "required": false,
    "show_when_published": false,
    "description": null,
    "task_is_internal_only": false,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}
```

{% endtab %}
{% endtabs %}

## edit form stage

<mark style="color:orange;">`PUT`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/forms/4/stages/6`

#### Request Body

| Name                     | Type    | Description                                                   |
| ------------------------ | ------- | ------------------------------------------------------------- |
| form\_id                 | Integer | Form identifier                                               |
| task\_is\_internal\_only | Boolean | Set form task as internal only, True for yes and Flase for no |
| type                     | String  | Stage type                                                    |
| icon                     | String  | Form stage Icon                                               |
| priority                 | Integer | Stage priority                                                |
| label                    | String  | Stage label                                                   |
| description              | String  | Form stage description                                        |
| show\_when\_published    | Boolean | Set to True to show the form when published and False to not  |
| required                 | Boolean | Set stage as required for True and optional for False         |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "id": 19,
    "url": "http://localhost:8000/api/v3/form_stages/19",
    "form_id": 4,
    "label": "restricted",
    "priority": 1,
    "icon": null,
    "type": "task",
    "required": false,
    "show_when_published": false,
    "description": null,
    "task_is_internal_only": false,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}
```

{% endtab %}
{% endtabs %}

{% openapi src="<https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json>" path="/api/v3/forms/4/stages/6" method="get" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}

{% openapi src="<https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json>" path="/api/v3/forms/2/stages/4" method="delete" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}
