Get Started
Usage API
More information

POST api/2.0/calendar This function requires authentication

Description

Creates a new calendar with the parameters (name, description, color, etc.) specified in the request.

Parameters
Name Description Type Example
name
sent in body
Calendar name string some text
description
sent in body
Calendar description string some text
textColor
sent in body
Event text color string some text
backgroundColor
sent in body
Event background color string some text
timeZone
sent in body
Calendar time zone string some text
alertType
sent in body
Event alert type, in case alert type is set by default Never, FiveMinutes, FifteenMinutes, HalfHour, Hour, TwoHours, Day, Default Never
sharingOptions
sent in body
Calendar sharing options with other users list of sharing options
iCalUrl
sent in body
iCal URL string some text
isTodo
sent in body
Defines if the to-dos are shown in the calendar number 1234
Example
POST api/2.0/calendar
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "name": "some text",
  "description": "some text",
  "textColor": "some text",
  "backgroundColor": "some text",
  "timeZone": "some text",
  "alertType": "never",
  "sharingOptions": [
    {}
  ],
  "iCalUrl": "some text",
  "isTodo": 1234
}
Returns

Created calendar

Example Response

application/json

{
  "status": 0,
  "response": {
    "objectId": "1",
    "isTodo": false,
    "description": "Calendar Description",
    "textColor": "#ffffff",
    "title": "Calendar Name",
    "backgroundColor": "#000000",
    "isHidden": false,
    "isShared": true,
    "permissions": {
      "Data": {
        "actions": [
          {
            "id": "read",
            "name": "Read only",
            "defaultAction": true,
            "defaultStyle": "read"
          }
        ],
        "items": [
          {
            "id": "2fdfe577-3c26-4736-9df9-b5a683bb8520",
            "name": "Everyone",
            "isGroup": true,
            "canEdit": true,
            "selectedAction": {
              "id": "read",
              "name": "Read only",
              "defaultAction": true,
              "defaultStyle": "read"
            }
          }
        ]
      }
    },
    "isSubscription": false,
    "isEditable": true,
    "owner": {
      "objectId": "2fdfe577-3c26-4736-9df9-b5a683bb8520",
      "name": "Valery Zykov"
    },
    "events": [
      {
        "objectId": "1",
        "sourceId": "calendarID",
        "title": "Event Name",
        "description": "Event Description",
        "start": "2020-12-01T06:36:10.8645482Z",
        "end": "2020-12-01T06:36:10.8645482Z",
        "allDay": false,
        "repeatRule": "",
        "isShared": true,
        "permissions": {
          "Data": {
            "actions": [
              {
                "id": "read",
                "name": "Read only",
                "defaultAction": true,
                "defaultStyle": "read"
              }
            ],
            "items": [
              {
                "id": "2fdfe577-3c26-4736-9df9-b5a683bb8520",
                "name": "Everyone",
                "isGroup": true,
                "canEdit": true,
                "selectedAction": {
                  "id": "read",
                  "name": "Read only",
                  "defaultAction": true,
                  "defaultStyle": "read"
                }
              }
            ]
          }
        },
        "isEditable": false,
        "alert": {
          "Type": -1
        },
        "owner": {
          "objectId": "2fdfe577-3c26-4736-9df9-b5a683bb8520",
          "name": "Valery Zykov"
        },
        "canUnsubscribe": true,
        "uniqueId": "1234wda",
        "status": 0,
        "TenantId": "1",
        "Todo": true
      }
    ],
    "todos": [
      {
        "objectId": "1",
        "sourceId": "calendarID",
        "title": "Todo Name",
        "description": "Todo Description",
        "start": "2020-12-01T06:36:10.8645482Z",
        "completed": "2020-12-01T06:36:10.8645482Z",
        "owner": {
          "objectId": "2fdfe577-3c26-4736-9df9-b5a683bb8520",
          "name": "Valery Zykov"
        },
        "uniqueId": "123wda",
        "TenantId": 1
      }
    ],
    "defaultAlert": {
      "Type": -1
    },
    "timeZone": {
      "name": "UTC",
      "id": "UTC",
      "offset": 0
    },
    "canEditTimeZone": false,
    "canAlertModify": true,
    "isiCalStream": false,
    "iCalUrl": "",
    "IsAcceptedSubscription": false
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <objectId>1</objectId>
    <isTodo>False</isTodo>
    <description>Calendar Description</description>
    <textColor>#ffffff</textColor>
    <title>Calendar Name</title>
    <backgroundColor>#000000</backgroundColor>
    <isHidden>False</isHidden>
    <isShared>True</isShared>
    <permissions>
      <Data>
        <actions>
          <id>read</id>
          <name>Read only</name>
          <defaultAction>True</defaultAction>
          <defaultStyle>read</defaultStyle>
        </actions>
        <items>
          <id>2fdfe577-3c26-4736-9df9-b5a683bb8520</id>
          <name>Everyone</name>
          <isGroup>True</isGroup>
          <canEdit>True</canEdit>
          <selectedAction>
            <id>read</id>
            <name>Read only</name>
            <defaultAction>True</defaultAction>
            <defaultStyle>read</defaultStyle>
          </selectedAction>
        </items>
      </Data>
    </permissions>
    <isSubscription>False</isSubscription>
    <isEditable>True</isEditable>
    <owner>
      <objectId>2fdfe577-3c26-4736-9df9-b5a683bb8520</objectId>
      <name>Valery Zykov</name>
    </owner>
    <events>
      <objectId>1</objectId>
      <sourceId>calendarID</sourceId>
      <title>Event Name</title>
      <description>Event Description</description>
      <start>2020-12-01T06:36:10.8645482Z</start>
      <end>2020-12-01T06:36:10.8645482Z</end>
      <allDay>False</allDay>
      <repeatRule />
      <isShared>True</isShared>
      <permissions>
        <Data>
          <actions>
            <id>read</id>
            <name>Read only</name>
            <defaultAction>True</defaultAction>
            <defaultStyle>read</defaultStyle>
          </actions>
          <items>
            <id>2fdfe577-3c26-4736-9df9-b5a683bb8520</id>
            <name>Everyone</name>
            <isGroup>True</isGroup>
            <canEdit>True</canEdit>
            <selectedAction>
              <id>read</id>
              <name>Read only</name>
              <defaultAction>True</defaultAction>
              <defaultStyle>read</defaultStyle>
            </selectedAction>
          </items>
        </Data>
      </permissions>
      <isEditable>False</isEditable>
      <alert>
        <Type>-1</Type>
      </alert>
      <owner>
        <objectId>2fdfe577-3c26-4736-9df9-b5a683bb8520</objectId>
        <name>Valery Zykov</name>
      </owner>
      <canUnsubscribe>True</canUnsubscribe>
      <uniqueId>1234wda</uniqueId>
      <status>0</status>
      <TenantId>1</TenantId>
      <Todo>True</Todo>
    </events>
    <todos>
      <objectId>1</objectId>
      <sourceId>calendarID</sourceId>
      <title>Todo Name</title>
      <description>Todo Description</description>
      <start>2020-12-01T06:36:10.8645482Z</start>
      <completed>2020-12-01T06:36:10.8645482Z</completed>
      <owner>
        <objectId>2fdfe577-3c26-4736-9df9-b5a683bb8520</objectId>
        <name>Valery Zykov</name>
      </owner>
      <uniqueId>123wda</uniqueId>
      <TenantId>1</TenantId>
    </todos>
    <defaultAlert>
      <Type>-1</Type>
    </defaultAlert>
    <timeZone>
      <name>UTC</name>
      <id>UTC</id>
      <offset>0</offset>
    </timeZone>
    <canEditTimeZone>False</canEditTimeZone>
    <canAlertModify>True</canAlertModify>
    <isiCalStream>False</isiCalStream>
    <iCalUrl />
    <IsAcceptedSubscription>False</IsAcceptedSubscription>
  </response>
</result>