Create calendar event
Creates a new calendar event
Function CreateCalendarEvent(Val URL, Val EventDescription, Val Token = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
EventDescription | --fields | Structure Of KeyAndValue | ✔ | Event description. See GetCalendarEventsStructure |
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.event.add
1C:Enterprise/OneScript code example
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
CalendarID = "1322";
Tomorrow = OPI_Tools.GetCurrentDate() + 86400;
Hour = 3600;
EventStucture = New Structure;
EventStucture.Insert("type" , "user");
EventStucture.Insert("ownerId" , 1);
EventStucture.Insert("from" , XMLString(Tomorrow));
EventStucture.Insert("to" , XMLString(Tomorrow + Hour));
EventStucture.Insert("section" , CalendarID);
EventStucture.Insert("name" , "New event");
EventStucture.Insert("skip_time" , "N");
EventStucture.Insert("timezone_from", "Europe/Minsk");
EventStucture.Insert("timezone_to" , "Europe/Minsk");
EventStucture.Insert("description" , "Event description");
EventStucture.Insert("color" , "%23000000>");
EventStucture.Insert("text_color" , "%23FFFFFF");
EventStucture.Insert("accessibility", "quest");
EventStucture.Insert("importance" , "normal");
EventStucture.Insert("private_event", "Y");
RepeatabilityStructure = New Structure;
RepeatabilityStructure.Insert("FREQ" , "DAILY");
RepeatabilityStructure.Insert("COUNT" , 3);
RepeatabilityStructure.Insert("INTERVAL", 10);
DaysArray = New Array;
DaysArray.Add("SA");
DaysArray.Add("MO");
RepeatabilityStructure.Insert("BYDAY", DaysArray);
RepeatabilityStructure.Insert("UNTIL", XMLString(Tomorrow + Hour * 24 * 10));
EventStucture.Insert("rrule" , RepeatabilityStructure);
EventStucture.Insert("is_meeting", "Y");
EventStucture.Insert("location" , "Office");
RemindersArray = New Array;
ReminderStructure = New Structure;
ReminderStructure.Insert("type" , "day");
ReminderStructure.Insert("count", 1);
RemindersArray.Add(ReminderStructure);
EventStucture.Insert("remind" , RemindersArray);
EventStucture.Insert("attendees", StrSplit("1,10", ","));
EventStucture.Insert("host" , 1);
MeetingStructure = New Structure;
MeetingStructure.Insert("notify" , "Y");
MeetingStructure.Insert("reinvite" , "Y");
MeetingStructure.Insert("allow_invite", "N");
MeetingStructure.Insert("hide_guests" , "N");
EventStucture.Insert("meeting", MeetingStructure);
Result = OPI_Bitrix24.CreateCalendarEvent(URL, EventStucture);
URL = "b24-ar17wx.bitrix24.by";
Token = "75d8c668006e9f06006b12e400000001000...";
CalendarID = "1324";
EventStucture.Insert("section", CalendarID);
Result = OPI_Bitrix24.CreateCalendarEvent(URL, EventStucture, Token);
- Bash
- CMD/Bat
oint bitrix24 CreateCalendarEvent \
--url ""b24-ar17wx.bitrix24.by"" \
--fields ""/tmp/jhaqjeqm.24k.json"" \
--token "***"
oint bitrix24 CreateCalendarEvent ^
--url ""b24-ar17wx.bitrix24.by"" ^
--fields ""/tmp/jhaqjeqm.24k.json"" ^
--token "***"
Result
{
"result": 2472,
"time": {
"start": 1757977116.84178,
"finish": 1757977117.01358,
"duration": 0.171799898147583,
"processing": 0.146694898605347,
"date_start": "2025-09-15T22:58:36+00:00",
"date_finish": "2025-09-15T22:58:37+00:00",
"operating_reset_at": 1757977716,
"operating": 0.14667797088623
}
}