create
8 min
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
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: [email protected]" \
-H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \
-d '{
"action": "create",
"group_id": 100909072,
"doc": {
"status_name": "cancellation_risk",
"color": "#800000",
"is_excluded": 0
}
}Response
{
"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
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: [email protected]" \
-H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \
-d '{
"action": "create",
"group_id": 100909072,
"doc": {
"status_name": "cancelled",
"color": "#800000",
"is_excluded": 1
}
}Response
{
"msg": "Status created successfully.",
"msg_type": "info",
"status_id": 76868,
"success": true
}