---
title: create
slug: docs/HKYV-create
docTags: 
createdAt: 2021-08-04T18:23:39.000Z
---

This call creates a status. The arguments that would be included in the doc are described below:

# Basic parameters

| Name       | Type    | Required | Description                                                         |
| ---------- | ------- | -------- | ------------------------------------------------------------------- |
| `action`   | string  | true     | `create`                                                            |
| `group_id` | integer | true     | This designates which project the action should be applied towards. |
| `doc`      | array   | false    | See doc parameters below.                                           |

Doc Parameters



| Name          | Type    | Required | Description                                                                                  |
| ------------- | ------- | -------- | -------------------------------------------------------------------------------------------- |
| `status_name` | string  | true     | The name of the status.                                                                      |
| `color`       | string  | true     | The color as a hex value, as in #800000.                                                     |
| `is_excluded` | numeric | true     | Whether or not the status should mark the user as excluded. 0 is active and 1 is excluding.  |



# Examples

## Create a new active status

This is an example which would create a new status.

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/statuses/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "create",
    "group_id": 100909072,
    "doc": {
        "status_name": "cancellation_risk",
        "color": "#800000",
        "is_excluded": 0
    }
}
```

```python
import requests
import json
status_endpoint = https://www.regpack.com/reg/api2/statuses/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "create",
    "group_id": 100909072,
    "doc": {
        "status_name": "cancellation_risk",
        "color": "#800000",
        "is_excluded": 0
    }
}
create_active_status_json = json.dumps(payload)
create_active_status_response = requests.post(url=users_endpoint, 
                                              data=create_active_status_json, 
                                              headers=headers, 
                                              timeout=10)
```
:::

### Response

```json
{
    "msg": "Status created successfully.",
    "msg_type": "info",
    "status_id": 76867,
    "success": true
}
```

## Create a new excluding status

This is an example which would create a new status.

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/statuses/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "create",
    "group_id": 100909072,
    "doc": {
        "status_name": "cancelled",
        "color": "#800000",
        "is_excluded": 1
    }
}
```

```python
import requests
import json
status_endpoint = https://www.regpack.com/reg/api2/statuses/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "create",
    "group_id": 100909072,
    "doc": {
        "status_name": "cancelled",
        "color": "#800000",
        "is_excluded": 1
    }
}
create_excluding_status_json = json.dumps(payload)
create_excluding_status_response = requests.post(url=users_endpoint, 
                                                 data=create_excluding_status_json, 
                                                 headers=headers, 
                                                 timeout=10)
```
:::

### Response

```json
{
    "msg": "Status created successfully.",
    "msg_type": "info",
    "status_id": 76868,
    "success": true
}
```






