Documentation

calendar.event.add

Description

Adds new event.

Returned value

Returns new event ID.

Parameters

Parameter Description
type* Calendar type:
  • user;
  • group.
ownerId* Calendar owner ID.
from* Selection start date.
to* Selection end date.
from_ts May be set instead of from.
to_ts May be set instead of to.
section* Section ID.
name* Event name.
skip_time [Y|N] Date value does not include time.
timezone_from Timezone for event start date and time. Default value - current user timezone.
timezone_to Timezone for event end date and time. Default value - current user timezone.
description Event description.
color Event background color.
text_color Event text color.
accessibility User's availability during event:
  • occupied (busy);
  • away (absent);
  • undecided (quest);
  • free (free).
importance Event priority:
  • high (high);
  • normal (normal);
  • low (low).
private_event [Y|N] Private event mark.
rrule Event recurrence.
is_meeting [Y|N] Meeting with attendees mark.
location Location.
remind Event reminder:
  • type - time reminder (min, hour, day);
  • count - numeric value of duration.
attendees List of event attendees (if is_meeting == "Y").
host Event host (owner).
meeting Parmeter array that includes the following:
  • text - invitation text;
  • open - public meeting mark;
  • notify - flag to notify when attendees confirm or decline an invitation;
  • reinvite - flag to request that users re-confirm attendance (when editing the event).
* - Required parameters

Example

BX24.callMethod("calendar.event.add",
   {
     type: 'user',
     ownerId: '2',
     name: 'New Event Name',
     description: 'Description for event',
     from: '2016-06-14',
     to: '2016-06-14',
     skipTime: 'Y',
     section: 5,
     color: '#9cbe1c',
     text_color: '#283033',
     accessibility: 'absent',
     importance: 'normal',
     is_meeting: 'Y',
     private_event: 'N',
     remind: [{type: 'min', count: 20}],
     location: 'London',
     attendees: [1, 2, 3],
     host: 2,
     meeting: {
      text: 'inviting text',
      open: true,
      notify: true,
      reinvite: false
     }
   });


© «Bitrix24», 2001-2024