Skip to main content

Add kanban stage

Add new stage of kanban or My Plan

Function AddKanbanStage(Val URL, Val Name, Val Color = "FFD800", Val PrevStageID = 0, Val EntityID = 0, Val AsAdmin = False, Val Token = "") Export

ParameterCLI optionTypeDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
Name--titleStringNew stage name
Color--colorStringHEX of new stage color
PrevStageID--prevstageString, NumberID of the stage after which a new stage should be inserted (at the beginning by default.)
EntityID--entityidString, NumberID of kanban owner (group or user)
AsAdmin--adminBooleanAllows you to add stages without checking permissions (for administrators)
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: task.stages.add


Code example
    Name  = "New stage";
Color = "0026FF";

URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";

Result = OPI_Bitrix24.AddKanbanStage(URL, Name, Color, 6);

PrevStageID = Result["result"];

Name = "New stage 2";
Color = "0026FF";

URL = "b24-ar17wx.bitrix24.by";
Token = "b529cb66006e9f06006b12e400000001000...";

Result = OPI_Bitrix24.AddKanbanStage(URL, Name, Color, PrevStageID, , True, Token);
CLI command example
    
oint bitrix24 AddKanbanStage --url "b24-ar17wx.bitrix24.by" --title %title% --color "0026FF" --prevstage "Result[result]" --entityid %entityid% --admin %admin% --token "fe3fa966006e9f06006b12e400000001000..."

Result
{
"result": 132,
"time": {
"start": 1720600360.58899,
"finish": 1720600360.679,
"duration": 0.0900149345397949,
"processing": 0.0587739944458008,
"date_start": "2024-07-10T08:32:40+00:00",
"date_finish": "2024-07-10T08:32:40+00:00",
"operating_reset_at": 1720600960,
"operating": 0
}
}