Create calendar
Creates a new calendar
Function CreateCalendar(Val URL, Val FieldsStructure, Val Token = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
FieldsStructure | --fields | Structure Of KeyAndValue | ✔ | Calendar fields structure (see GetCalendarStructure) |
Token | --token | String | ✖ | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
tip
Method at API documentation: calendar.section.add
1C:Enterprise/OneScript code example
UserID = 1;
CalendarsStructure = New Structure;
CalendarsStructure.Insert("type" , "user");
CalendarsStructure.Insert("ownerId" , UserID);
CalendarsStructure.Insert("name" , "new calendar");
CalendarsStructure.Insert("description", "My new calendar");
CalendarsStructure.Insert("color" , "#FFFFFF");
CalendarsStructure.Insert("text_color" , "#000000");
ExportStructure = New Structure;
ExportStructure.Insert("ALLOW", "True");
ExportStructure.Insert("SET" , "all");
CalendarsStructure.Insert("export", ExportStructure);
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
Result = OPI_Bitrix24.CreateCalendar(URL, CalendarsStructure);
CalendarsStructure.Insert("name" , "Another calendar");
CalendarsStructure.Insert("description", "My other new calendar");
URL = "b24-ar17wx.bitrix24.by";
Token = "75d8c668006e9f06006b12e400000001000...";
Result = OPI_Bitrix24.CreateCalendar(URL, CalendarsStructure, Token);
- Bash
- CMD/Bat
oint bitrix24 CreateCalendar \
--url ""b24-ar17wx.bitrix24.by"" \
--fields ""/tmp/ppwprhtw.wqu.json"" \
--token "***"
oint bitrix24 CreateCalendar ^
--url ""b24-ar17wx.bitrix24.by"" ^
--fields ""/tmp/ppwprhtw.wqu.json"" ^
--token "***"
Result
{
"result": 1364,
"time": {
"start": 1757977102.28303,
"finish": 1757977102.32224,
"duration": 0.0392129421234131,
"processing": 0.0164370536804199,
"date_start": "2025-09-15T22:58:22+00:00",
"date_finish": "2025-09-15T22:58:22+00:00",
"operating_reset_at": 1757977702,
"operating": 0
}
}