POST

Folders.SubStatus.Add

Add an internal sub-status under an internal folder status. This is the short alias of Folders.InternalSubStatus.Add. It creates an all_status row with type internal_sub_status and parent status id. It is a settings action only and does not run customer automation.

Permissions

  • User must be logged in with a valid bearer token.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

  • Runs the Folders.SubStatus.Add function and returns JSON.

Push Service

Pushes event folders.internalsubstatus.add.created to users who should see this change.

Automation

No automation is run for this function.

Special Instructions

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.
  • Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.

Required Parameters

NameTypeSampleExplanation
parent_status_id
post
int124Parent internal status id. Aliases: parent_id, patent_status_id, data_patent_id.
name
post
stringDocument MissingSub-status name. Aliases: sub_status_name, internal_sub_staus_name, name_en, name_he.

Optional Parameters

NameTypeSampleWhat it gives
color
post
color string#9b51e0Hex color for the sub-status. Aliases: sub_status_color_name, internal_sub_staus_color.
status_order
post
int1Sort order. Alias: index_id.

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Folders.SubStatus.Add",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "parent_status_id": "124",
        "name": "Document Missing",
        "color": "#9b51e0"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Folders.SubStatus.Add",
    "url_domain": "https:\/\/{domain}\/app\/Folders.SubStatus.Add"
}

Endpoint

POST /app/Folders.SubStatus.Add
POST https://{user}.bull36.com/app/Folders.SubStatus.Add
POST https://{domain}/app/Folders.SubStatus.Add

Sample Output

{
    "success": 1,
    "message": "Folders.InternalSubStatus.Add created",
    "id": "125",
    "status_id": "125",
    "automation_event": null,
    "socket_event": "folders.internalsubstatus.add.created"
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('parent_status_id', '124');
body.set('name', 'Document Missing');
body.set('color', '#9b51e0');

const res = await fetch('/app/Folders.SubStatus.Add', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}` },
  body
});
const data = await res.json();
console.log(data);

Error Example

{
    "success": 0,
    "message": "Missing required parameter: parent_status_id, name"
}