# Create Calendar

POST https://services.leadconnectorhq.com/calendars/

Create calendar in a location.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `calendars.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/calendars/": {
      "post": {
        "summary": "Create Calendar",
        "operationId": "createCalendar",
        "description": "Create calendar in a location.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarCreateDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarByIdSuccessfulResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "calendars.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "CalendarCreateDTO": {
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean",
            "description": "Should the created calendar be active or draft",
            "default": true,
            "example": true
          },
          "notifications": {
            "description": "🚨 Deprecated! Please use 'Calendar Notifications APIs' instead.",
            "deprecated": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Calendar Notification",
                  "example": "email",
                  "enum": [
                    "email"
                  ],
                  "default": "email"
                },
                "shouldSendToContact": {
                  "type": "boolean",
                  "description": "Send notification to contact",
                  "example": false
                },
                "shouldSendToGuest": {
                  "type": "boolean",
                  "description": "Send notification to guest",
                  "example": false
                },
                "shouldSendToUser": {
                  "type": "boolean",
                  "description": "Send notification to user",
                  "example": false
                },
                "shouldSendToSelectedUsers": {
                  "type": "boolean",
                  "description": "Send notification to selected users",
                  "example": false
                },
                "selectedUsers": {
                  "type": "string",
                  "description": "Comma separated emails",
                  "example": "user1@testemail.com,user2@testemail.com"
                }
              },
              "required": [
                "shouldSendToContact",
                "shouldSendToGuest",
                "shouldSendToUser",
                "shouldSendToSelectedUsers",
                "selectedUsers"
              ],
              "title": "CalendarNotification"
            }
          },
          "locationId": {
            "type": "string",
            "example": "ocQHyuzHvysMo5N5VsXc",
            "description": "Location ID"
          },
          "groupId": {
            "type": "string",
            "description": "Group Id",
            "example": "BqTwX8QFwXzpegMve9EQ"
          },
          "teamMembers": {
            "description": "Team members are required for calendars of type: Round Robin, Collective, Class, Service. Personal calendar must have exactly one team member.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "userId": {
                  "type": "string",
                  "example": "ocQHyuzHvysMo5N5VsXc",
                  "description": "User ID of the team member"
                },
                "priority": {
                  "type": "number",
                  "default": 0.5,
                  "enum": [
                    0,
                    0.5,
                    1
                  ],
                  "description": "Priority of the team member for round robin",
                  "example": 0.5
                },
                "meetingLocationType": {
                  "type": "string",
                  "description": "🚨 Deprecated! Use `locationConfigurations.kind` instead.",
                  "deprecated": true,
                  "example": "custom",
                  "default": "custom",
                  "readOnly": true,
                  "enum": [
                    "custom",
                    "zoom",
                    "gmeet",
                    "phone",
                    "address",
                    "teams",
                    "booker"
                  ]
                },
                "meetingLocation": {
                  "type": "string",
                  "description": "🚨 Deprecated! Use `locationConfigurations.location` instead.",
                  "deprecated": true,
                  "readOnly": true
                },
                "isPrimary": {
                  "type": "boolean",
                  "description": "Marks a user as primary. This property is required in case of collective booking calendars. Only one user can be primary.",
                  "example": true
                },
                "locationConfigurations": {
                  "description": "Meeting location configuration for event calendar.\n- *Multiple locations are allowed only when one team member is selected.*\n- *For **Class booking** and **Collective** calendars, only one location configuration is allowed for each team member.*",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "description": "Type of meeting location. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type",
                        "example": "custom",
                        "enum": [
                          "custom",
                          "zoom_conference",
                          "google_conference",
                          "inbound_call",
                          "outbound_call",
                          "physical",
                          "booker",
                          "ms_teams_conference"
                        ]
                      },
                      "location": {
                        "type": "string",
                        "description": "Address for meeting location. Not applicable on \"zoom_conference\", \"google_conference\" and \"ms_teams_conference\" kind",
                        "examples": [
                          "+14455550132",
                          "http://meet.google.com/your-meeting-location"
                        ],
                        "example": "https://meet.google.com/abc-def"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "title": "LocationConfiguration"
                  },
                  "example": [
                    {
                      "kind": "custom",
                      "location": "https://meet.google.com/abc-def"
                    }
                  ]
                }
              },
              "required": [
                "userId"
              ],
              "title": "TeamMember"
            },
            "example": [
              {
                "userId": "ocQHyuzHvysMo5N5VsXc",
                "priority": 0.5,
                "isPrimary": true
              }
            ]
          },
          "eventType": {
            "type": "string",
            "enum": [
              "RoundRobin_OptimizeForAvailability",
              "RoundRobin_OptimizeForEqualDistribution"
            ],
            "default": "RoundRobin_OptimizeForAvailability",
            "description": "Event type for round robin distribution",
            "example": "RoundRobin_OptimizeForAvailability"
          },
          "name": {
            "type": "string",
            "example": "test calendar",
            "description": "Calendar name"
          },
          "description": {
            "type": "string",
            "example": "this is used for testing",
            "description": "Calendar description"
          },
          "slug": {
            "type": "string",
            "example": "test1",
            "description": "Calendar slug for URL"
          },
          "widgetSlug": {
            "type": "string",
            "example": "test1",
            "description": "Widget slug"
          },
          "calendarType": {
            "type": "string",
            "enum": [
              "round_robin",
              "event",
              "class_booking",
              "collective",
              "service_booking",
              "personal"
            ],
            "description": "Calendar type",
            "example": "round_robin"
          },
          "widgetType": {
            "type": "string",
            "description": "Calendar widget type. Choose \"default\" for \"neo\" and \"classic\" for \"classic\" layout.",
            "example": "classic",
            "enum": [
              "default",
              "classic"
            ],
            "default": "classic"
          },
          "eventTitle": {
            "type": "string",
            "default": "{{contact.name}}",
            "description": "Title for calendar events",
            "example": "{{contact.name}}"
          },
          "eventColor": {
            "type": "string",
            "default": "#039be5",
            "description": "Color for calendar events in hex format",
            "example": "#039BE5"
          },
          "meetingLocation": {
            "type": "string",
            "description": "🚨 Deprecated! Use `locationConfigurations.location` or `teamMembers[].locationConfigurations.location` instead.",
            "deprecated": true,
            "readOnly": true
          },
          "locationConfigurations": {
            "description": "Meeting location configuration for event calendar",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "description": "Type of meeting location. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type",
                  "example": "custom",
                  "enum": [
                    "custom",
                    "zoom_conference",
                    "google_conference",
                    "inbound_call",
                    "outbound_call",
                    "physical",
                    "booker",
                    "ms_teams_conference"
                  ]
                },
                "location": {
                  "type": "string",
                  "description": "Address for meeting location. Not applicable on \"zoom_conference\", \"google_conference\" and \"ms_teams_conference\" kind",
                  "examples": [
                    "+14455550132",
                    "http://meet.google.com/your-meeting-location"
                  ],
                  "example": "https://meet.google.com/abc-def"
                }
              },
              "required": [
                "kind"
              ],
              "title": "LocationConfiguration"
            },
            "example": [
              {
                "kind": "custom",
                "location": "https://meet.google.com/abc-def"
              }
            ]
          },
          "slotDuration": {
            "type": "number",
            "description": "This controls the duration of the meeting",
            "default": 30,
            "example": 30
          },
          "slotDurationUnit": {
            "type": "string",
            "description": "Unit for slot duration.",
            "enum": [
              "mins",
              "hours"
            ],
            "example": "mins"
          },
          "durationOptions": {
            "description": "Multiple duration options for the calendar. Bookers can select their preferred meeting length. Max 3 options. Exactly one must be marked as default.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "duration": {
                  "type": "number",
                  "description": "Duration value in minutes",
                  "example": 30
                },
                "durationUnit": {
                  "type": "string",
                  "description": "Unit for the duration",
                  "enum": [
                    "mins",
                    "hours"
                  ],
                  "example": "mins"
                },
                "isDefault": {
                  "type": "boolean",
                  "description": "Whether this is the default (pre-selected) duration",
                  "example": true
                },
                "order": {
                  "type": "number",
                  "description": "Display order of the duration pill (1-based)",
                  "example": 1
                }
              },
              "required": [
                "duration",
                "durationUnit",
                "isDefault",
                "order"
              ],
              "title": "DurationOptionDto"
            },
            "example": [
              {
                "duration": 15,
                "durationUnit": "mins",
                "isDefault": false,
                "order": 1
              },
              {
                "duration": 30,
                "durationUnit": "mins",
                "isDefault": true,
                "order": 2
              },
              {
                "duration": 60,
                "durationUnit": "mins",
                "isDefault": false,
                "order": 3
              }
            ]
          },
          "slotInterval": {
            "type": "number",
            "description": "Slot interval reflects the amount of time the between booking slots that will be shown in the calendar.",
            "default": 30,
            "example": 30
          },
          "slotIntervalUnit": {
            "type": "string",
            "description": "Unit for slot interval.",
            "enum": [
              "mins",
              "hours"
            ],
            "example": "mins"
          },
          "slotBuffer": {
            "type": "number",
            "description": "Slot-Buffer is additional time that can be added after an appointment, allowing for extra time to wrap up",
            "example": 15
          },
          "slotBufferUnit": {
            "type": "string",
            "description": "Unit for slot buffer.",
            "enum": [
              "mins",
              "hours"
            ],
            "example": "mins"
          },
          "preBuffer": {
            "type": "number",
            "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready",
            "example": 10
          },
          "preBufferUnit": {
            "type": "string",
            "description": "Unit for pre-buffer.",
            "enum": [
              "mins",
              "hours"
            ],
            "example": "mins"
          },
          "appoinmentPerSlot": {
            "type": "number",
            "default": 1,
            "description": "Maximum bookings per slot (per user). Maximum seats per slot in case of Class Booking Calendar.",
            "example": 1
          },
          "appoinmentPerDay": {
            "type": "number",
            "description": "Number of appointments that can be booked for a given day",
            "example": 8
          },
          "allowBookingAfter": {
            "type": "number",
            "description": "Minimum scheduling notice for events",
            "example": 4
          },
          "allowBookingAfterUnit": {
            "type": "string",
            "description": "Unit for minimum scheduling notice",
            "enum": [
              "hours",
              "days",
              "weeks",
              "months",
              "mins"
            ],
            "example": "days"
          },
          "allowBookingFor": {
            "type": "number",
            "description": "Minimum number of days/weeks/months for which to allow booking events",
            "example": 30
          },
          "allowBookingForUnit": {
            "type": "string",
            "description": "Unit for controlling the duration for which booking would be allowed for",
            "enum": [
              "days",
              "weeks",
              "months"
            ],
            "example": "days"
          },
          "countAvailableDaysOnly": {
            "type": "boolean",
            "description": "When true, only days with configured availability count toward the date range booking window",
            "default": false,
            "example": false
          },
          "openHours": {
            "description": "While we will support this property for backward compatibility, it is recommended to use 'Availability' APIs instead.",
            "deprecated": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "daysOfTheWeek": {
                  "type": "array",
                  "items": {
                    "type": "number",
                    "maximum": 6,
                    "minimum": 0
                  },
                  "description": "Days of the week (0=Sun, 6=Sat)",
                  "example": [
                    1,
                    2,
                    3,
                    4,
                    5
                  ]
                },
                "hours": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "openHour": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 23,
                        "description": "Opening hour (0-23)",
                        "example": 8
                      },
                      "openMinute": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 60,
                        "description": "Opening minute (0-59)",
                        "example": 0
                      },
                      "closeHour": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 23,
                        "description": "Closing hour (0-23)",
                        "example": 17
                      },
                      "closeMinute": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 60,
                        "description": "Closing minute (0-59)",
                        "example": 0
                      }
                    },
                    "required": [
                      "openHour",
                      "openMinute",
                      "closeHour",
                      "closeMinute"
                    ],
                    "title": "Hour"
                  },
                  "description": "Open hours for the specified days",
                  "example": [
                    {
                      "openHour": 8,
                      "openMinute": 0,
                      "closeHour": 17,
                      "closeMinute": 0
                    }
                  ]
                }
              },
              "required": [
                "daysOfTheWeek",
                "hours"
              ],
              "title": "OpenHour"
            },
            "example": [
              {
                "daysOfTheWeek": [
                  1,
                  2,
                  3,
                  4,
                  5
                ],
                "hours": [
                  {
                    "openHour": 8,
                    "openMinute": 0,
                    "closeHour": 17,
                    "closeMinute": 0
                  }
                ]
              }
            ]
          },
          "enableRecurring": {
            "type": "boolean",
            "description": "Enable recurring appointments for the calendars. Please note that only one member should be added in the calendar to enable this",
            "default": false,
            "example": false
          },
          "recurring": {
            "description": "Recurring appointment configuration",
            "example": {
              "freq": "WEEKLY",
              "count": 4,
              "bookingOption": "skip",
              "bookingOverlapDefaultStatus": "confirmed"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "freq": {
                    "type": "string",
                    "enum": [
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY"
                    ],
                    "description": "Frequency of recurrence",
                    "example": "WEEKLY"
                  },
                  "count": {
                    "type": "number",
                    "description": "Number of recurrences",
                    "maximum": 24,
                    "example": 4
                  },
                  "bookingOption": {
                    "type": "string",
                    "description": "This setting contols what to do incase a recurring slot is unavailable",
                    "enum": [
                      "skip",
                      "continue",
                      "book_next"
                    ],
                    "example": "skip"
                  },
                  "bookingOverlapDefaultStatus": {
                    "type": "string",
                    "description": "This setting contols what to do incase a recurring slot is unavailable",
                    "enum": [
                      "confirmed",
                      "new"
                    ],
                    "example": "confirmed"
                  }
                },
                "title": "Recurring"
              }
            ]
          },
          "formId": {
            "type": "string",
            "description": "Form ID to be used for booking",
            "example": "YlWd2wuCAZQzh2cH1fVZ"
          },
          "stickyContact": {
            "type": "boolean",
            "description": "Enable sticky contact assignment",
            "example": true
          },
          "isLivePaymentMode": {
            "type": "boolean",
            "description": "Whether payment mode is live",
            "example": false
          },
          "autoConfirm": {
            "type": "boolean",
            "default": true,
            "description": "Auto-confirm appointments",
            "example": true
          },
          "shouldSendAlertEmailsToAssignedMember": {
            "type": "boolean",
            "description": "Send alert emails to assigned team member",
            "example": false
          },
          "alertEmail": {
            "type": "string",
            "description": "Alert email address",
            "example": "alerts@example.com"
          },
          "googleInvitationEmails": {
            "type": "boolean",
            "default": false,
            "description": "Send Google invitation emails",
            "example": true
          },
          "allowReschedule": {
            "type": "boolean",
            "default": true,
            "description": "Allow rescheduling of appointments",
            "example": true
          },
          "allowCancellation": {
            "type": "boolean",
            "default": true,
            "description": "Allow cancellation of appointments",
            "example": true
          },
          "shouldAssignContactToTeamMember": {
            "type": "boolean",
            "description": "Assign contact to team member on booking",
            "example": true
          },
          "shouldSkipAssigningContactForExisting": {
            "type": "boolean",
            "description": "Skip assigning contact if contact already exists",
            "example": false
          },
          "notes": {
            "type": "string",
            "description": "Notes for the calendar",
            "example": "Please arrive 10 minutes early."
          },
          "pixelId": {
            "type": "string",
            "description": "Facebook Pixel ID for tracking",
            "example": "1234567890"
          },
          "formSubmitType": {
            "type": "string",
            "default": "ThankYouMessage",
            "enum": [
              "RedirectURL",
              "ThankYouMessage"
            ],
            "description": "Action after form submission",
            "example": "ThankYouMessage"
          },
          "formSubmitRedirectURL": {
            "type": "string",
            "description": "Redirect URL after form submission",
            "example": "https://example.com/thank-you"
          },
          "formSubmitThanksMessage": {
            "type": "string",
            "description": "Thank you message displayed after form submission",
            "example": "Thank you for booking!"
          },
          "availabilityType": {
            "type": "number",
            "enum": [
              0,
              1
            ],
            "description": "While we will support this property for backward compatibility, it is not required anymore.",
            "deprecated": true,
            "example": 0
          },
          "availabilities": {
            "description": "While we will support this property for backward compatibility, it is recommended to use 'Availability' APIs instead.",
            "deprecated": true,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "description": "Formulate the date string in the format of `<YYYY-MM-DD in local timezone>T00:00:00.000Z`.",
                  "example": "2023-09-24T00:00:00.000Z"
                },
                "hours": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "openHour": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 23,
                        "description": "Opening hour (0-23)",
                        "example": 8
                      },
                      "openMinute": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 60,
                        "description": "Opening minute (0-59)",
                        "example": 0
                      },
                      "closeHour": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 23,
                        "description": "Closing hour (0-23)",
                        "example": 17
                      },
                      "closeMinute": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 60,
                        "description": "Closing minute (0-59)",
                        "example": 0
                      }
                    },
                    "required": [
                      "openHour",
                      "openMinute",
                      "closeHour",
                      "closeMinute"
                    ],
                    "title": "Hour"
                  },
                  "description": "Available hours for the date",
                  "example": [
                    {
                      "openHour": 8,
                      "openMinute": 0,
                      "closeHour": 17,
                      "closeMinute": 0
                    }
                  ]
                },
                "deleted": {
                  "type": "boolean",
                  "default": false,
                  "description": "Whether this availability is deleted",
                  "example": false
                }
              },
              "required": [
                "date",
                "hours"
              ],
              "title": "Availability"
            },
            "example": [
              {
                "date": "2023-09-24T00:00:00.000Z",
                "hours": [
                  {
                    "openHour": 8,
                    "openMinute": 0,
                    "closeHour": 17,
                    "closeMinute": 0
                  }
                ],
                "deleted": false
              }
            ]
          },
          "guestType": {
            "type": "string",
            "enum": [
              "count_only",
              "collect_detail"
            ],
            "description": "Type of guest allowed",
            "example": "count_only"
          },
          "consentLabel": {
            "type": "string",
            "description": "Consent label text",
            "example": "I confirm that I want to receive content from this company using any contact information I provide."
          },
          "calendarCoverImage": {
            "type": "string",
            "example": "https://path-to-image.com",
            "description": "Calendar cover image URL"
          },
          "lookBusyConfig": {
            "description": "Look Busy Configuration",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Apply Look Busy",
                    "example": true,
                    "default": false
                  },
                  "lookBusyPercentage": {
                    "type": "number",
                    "description": "Percentage of slots that will be hidden",
                    "example": 50
                  },
                  "LookBusyPercentage": {
                    "type": "number",
                    "description": "Percentage of slots that will be hidden (deprecated, use lookBusyPercentage)",
                    "example": 50,
                    "deprecated": true
                  }
                },
                "required": [
                  "enabled",
                  "lookBusyPercentage"
                ],
                "title": "LookBusyConfiguration"
              }
            ],
            "example": {
              "enabled": true,
              "lookBusyPercentage": 50
            }
          },
          "appointmentPerSlot": {
            "type": "number",
            "default": 1,
            "description": "Maximum bookings per slot (per user). Maximum seats per slot in case of Class Booking Calendar.",
            "example": 1
          },
          "appointmentPerDay": {
            "type": "number",
            "description": "Number of appointments that can be booked for a given day",
            "example": 8
          }
        },
        "required": [
          "locationId",
          "name"
        ],
        "title": "CalendarCreateDTO"
      },
      "CalendarByIdSuccessfulResponseDTO": {
        "type": "object",
        "properties": {
          "calendar": {
            "description": "Calendar details",
            "example": {
              "id": "0TkCdp9PfvLeWKYRRvIz",
              "name": "test calendar",
              "locationId": "ocQHyuzHvysMo5N5VsXc"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "isActive": {
                    "type": "boolean",
                    "description": "Should the created calendar be active or draft",
                    "default": true,
                    "example": true
                  },
                  "notifications": {
                    "description": "🚨 Deprecated! Please use 'Calendar Notifications APIs' instead.",
                    "deprecated": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Calendar Notification",
                          "example": "email",
                          "enum": [
                            "email"
                          ],
                          "default": "email"
                        },
                        "shouldSendToContact": {
                          "type": "boolean",
                          "description": "Send notification to contact",
                          "example": false
                        },
                        "shouldSendToGuest": {
                          "type": "boolean",
                          "description": "Send notification to guest",
                          "example": false
                        },
                        "shouldSendToUser": {
                          "type": "boolean",
                          "description": "Send notification to user",
                          "example": false
                        },
                        "shouldSendToSelectedUsers": {
                          "type": "boolean",
                          "description": "Send notification to selected users",
                          "example": false
                        },
                        "selectedUsers": {
                          "type": "string",
                          "description": "Comma separated emails",
                          "example": "user1@testemail.com,user2@testemail.com"
                        }
                      },
                      "required": [
                        "shouldSendToContact",
                        "shouldSendToGuest",
                        "shouldSendToUser",
                        "shouldSendToSelectedUsers",
                        "selectedUsers"
                      ],
                      "title": "CalendarNotification"
                    }
                  },
                  "locationId": {
                    "type": "string",
                    "example": "ocQHyuzHvysMo5N5VsXc",
                    "description": "Location ID"
                  },
                  "groupId": {
                    "type": "string",
                    "description": "Group Id",
                    "example": "BqTwX8QFwXzpegMve9EQ"
                  },
                  "teamMembers": {
                    "description": "Team members are for calendars of type: Round Robin, Collective, Class, Service. Personal calendar must have exactly one team member.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string",
                          "example": "ocQHyuzHvysMo5N5VsXc",
                          "description": "User ID of the team member"
                        },
                        "priority": {
                          "type": "number",
                          "default": 0.5,
                          "enum": [
                            0,
                            0.5,
                            1
                          ],
                          "description": "Priority of the team member for round robin",
                          "example": 0.5
                        },
                        "meetingLocationType": {
                          "type": "string",
                          "description": "🚨 Deprecated! Use `locationConfigurations.kind` instead.",
                          "deprecated": true,
                          "example": "custom",
                          "default": "custom",
                          "readOnly": true,
                          "enum": [
                            "custom",
                            "zoom",
                            "gmeet",
                            "phone",
                            "address",
                            "teams",
                            "booker"
                          ]
                        },
                        "meetingLocation": {
                          "type": "string",
                          "description": "🚨 Deprecated! Use `locationConfigurations.location` instead.",
                          "deprecated": true,
                          "readOnly": true
                        },
                        "isPrimary": {
                          "type": "boolean",
                          "description": "Marks a user as primary. This property is required in case of collective booking calendars. Only one user can be primary.",
                          "example": true
                        },
                        "locationConfigurations": {
                          "description": "Meeting location configurations",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Type of meeting location. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type",
                                "example": "custom",
                                "enum": [
                                  "custom",
                                  "zoom_conference",
                                  "google_conference",
                                  "inbound_call",
                                  "outbound_call",
                                  "physical",
                                  "booker",
                                  "ms_teams_conference"
                                ]
                              },
                              "location": {
                                "type": "string",
                                "description": "Address for meeting location. Not applicable on \"zoom_conference\", \"google_conference\" and \"ms_teams_conference\" kind",
                                "examples": [
                                  "+14455550132",
                                  "http://meet.google.com/your-meeting-location"
                                ],
                                "example": "https://meet.google.com/abc-def"
                              },
                              "meetingId": {
                                "type": "string",
                                "description": "Unique ID used to select a specific meeting location",
                                "example": "my_conference_id"
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "title": "LocationConfigurationResponse"
                          },
                          "example": [
                            {
                              "kind": "custom",
                              "location": "https://meet.google.com/abc-def"
                            }
                          ]
                        }
                      },
                      "required": [
                        "userId"
                      ],
                      "title": "TeamMemberResponse"
                    },
                    "example": [
                      {
                        "userId": "ocQHyuzHvysMo5N5VsXc",
                        "priority": 0.5,
                        "isPrimary": true
                      }
                    ]
                  },
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "RoundRobin_OptimizeForAvailability",
                      "RoundRobin_OptimizeForEqualDistribution"
                    ],
                    "default": "RoundRobin_OptimizeForAvailability",
                    "description": "Event type for round robin distribution",
                    "example": "RoundRobin_OptimizeForAvailability"
                  },
                  "name": {
                    "type": "string",
                    "example": "test calendar",
                    "description": "Calendar name"
                  },
                  "description": {
                    "type": "string",
                    "example": "this is used for testing",
                    "description": "Calendar description"
                  },
                  "slug": {
                    "type": "string",
                    "example": "test1",
                    "description": "Calendar slug for URL"
                  },
                  "widgetSlug": {
                    "type": "string",
                    "example": "test1",
                    "description": "Widget slug"
                  },
                  "calendarType": {
                    "type": "string",
                    "enum": [
                      "round_robin",
                      "event",
                      "class_booking",
                      "collective",
                      "service_booking",
                      "personal"
                    ],
                    "description": "Calendar type",
                    "example": "round_robin"
                  },
                  "widgetType": {
                    "type": "string",
                    "description": "Calendar widget type. Choose \"default\" for \"neo\" and \"classic\" for \"classic\" layout.",
                    "example": "classic",
                    "enum": [
                      "default",
                      "classic"
                    ],
                    "default": "classic"
                  },
                  "eventTitle": {
                    "type": "string",
                    "default": "{{contact.name}}",
                    "description": "Title for calendar events",
                    "example": "{{contact.name}}"
                  },
                  "eventColor": {
                    "type": "string",
                    "default": "#039be5",
                    "description": "Color for calendar events in hex format",
                    "example": "#039BE5"
                  },
                  "meetingLocation": {
                    "type": "string",
                    "description": "🚨 Deprecated! Use `locationConfigurations.location` or `teamMembers[].locationConfigurations.location` instead.",
                    "deprecated": true,
                    "readOnly": true
                  },
                  "locationConfigurations": {
                    "description": "Meeting location configuration for event calendar",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "description": "Type of meeting location. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type",
                          "example": "custom",
                          "enum": [
                            "custom",
                            "zoom_conference",
                            "google_conference",
                            "inbound_call",
                            "outbound_call",
                            "physical",
                            "booker",
                            "ms_teams_conference"
                          ]
                        },
                        "location": {
                          "type": "string",
                          "description": "Address for meeting location. Not applicable on \"zoom_conference\", \"google_conference\" and \"ms_teams_conference\" kind",
                          "examples": [
                            "+14455550132",
                            "http://meet.google.com/your-meeting-location"
                          ],
                          "example": "https://meet.google.com/abc-def"
                        },
                        "meetingId": {
                          "type": "string",
                          "description": "Unique ID used to select a specific meeting location",
                          "example": "my_conference_id"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "title": "LocationConfigurationResponse"
                    },
                    "example": [
                      {
                        "kind": "custom",
                        "location": "https://meet.google.com/abc-def"
                      }
                    ]
                  },
                  "slotDuration": {
                    "type": "number",
                    "description": "This controls the duration of the meeting",
                    "default": 30,
                    "example": 30
                  },
                  "slotDurationUnit": {
                    "type": "string",
                    "description": "Unit for slot duration.",
                    "enum": [
                      "mins",
                      "hours"
                    ],
                    "example": "mins"
                  },
                  "durationOptions": {
                    "description": "Multiple duration options for the calendar. Bookers can select their preferred meeting length. Max 3 options. Exactly one must be marked as default.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "duration": {
                          "type": "number",
                          "description": "Duration value in minutes",
                          "example": 30
                        },
                        "durationUnit": {
                          "type": "string",
                          "description": "Unit for the duration",
                          "enum": [
                            "mins",
                            "hours"
                          ],
                          "example": "mins"
                        },
                        "isDefault": {
                          "type": "boolean",
                          "description": "Whether this is the default (pre-selected) duration",
                          "example": true
                        },
                        "order": {
                          "type": "number",
                          "description": "Display order of the duration pill (1-based)",
                          "example": 1
                        }
                      },
                      "required": [
                        "duration",
                        "durationUnit",
                        "isDefault",
                        "order"
                      ],
                      "title": "DurationOptionDto"
                    },
                    "example": [
                      {
                        "duration": 15,
                        "durationUnit": "mins",
                        "isDefault": false,
                        "order": 1
                      },
                      {
                        "duration": 30,
                        "durationUnit": "mins",
                        "isDefault": true,
                        "order": 2
                      },
                      {
                        "duration": 60,
                        "durationUnit": "mins",
                        "isDefault": false,
                        "order": 3
                      }
                    ]
                  },
                  "slotInterval": {
                    "type": "number",
                    "description": "Slot interval reflects the amount of time the between booking slots that will be shown in the calendar.",
                    "default": 30,
                    "example": 30
                  },
                  "slotIntervalUnit": {
                    "type": "string",
                    "description": "Unit for slot interval.",
                    "enum": [
                      "mins",
                      "hours"
                    ],
                    "example": "mins"
                  },
                  "slotBuffer": {
                    "type": "number",
                    "description": "Slot-Buffer is additional time that can be added after an appointment, allowing for extra time to wrap up",
                    "example": 15
                  },
                  "slotBufferUnit": {
                    "type": "string",
                    "description": "Unit for slot buffer.",
                    "enum": [
                      "mins",
                      "hours"
                    ],
                    "example": "mins"
                  },
                  "preBuffer": {
                    "type": "number",
                    "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready",
                    "example": 10
                  },
                  "preBufferUnit": {
                    "type": "string",
                    "description": "Unit for pre-buffer.",
                    "enum": [
                      "mins",
                      "hours"
                    ],
                    "example": "mins"
                  },
                  "appoinmentPerSlot": {
                    "type": "number",
                    "default": 1,
                    "description": "Maximum bookings per slot (per user). Maximum seats per slot in case of Class Booking Calendar.",
                    "example": 1
                  },
                  "appoinmentPerDay": {
                    "type": "number",
                    "description": "Number of appointments that can be booked for a given day",
                    "example": 8
                  },
                  "allowBookingAfter": {
                    "type": "number",
                    "description": "Minimum scheduling notice for events",
                    "example": 4
                  },
                  "allowBookingAfterUnit": {
                    "type": "string",
                    "description": "Unit for minimum scheduling notice",
                    "enum": [
                      "hours",
                      "days",
                      "weeks",
                      "months",
                      "mins"
                    ],
                    "example": "days"
                  },
                  "allowBookingFor": {
                    "type": "number",
                    "description": "Minimum number of days/weeks/months for which to allow booking events",
                    "example": 30
                  },
                  "allowBookingForUnit": {
                    "type": "string",
                    "description": "Unit for controlling the duration for which booking would be allowed for",
                    "enum": [
                      "days",
                      "weeks",
                      "months"
                    ],
                    "example": "days"
                  },
                  "countAvailableDaysOnly": {
                    "type": "boolean",
                    "description": "When true, only days with configured availability count toward the date range booking window",
                    "default": false,
                    "example": false
                  },
                  "openHours": {
                    "description": "While we will support this property for backward compatibility, it is recommended to use 'Availability' APIs instead.",
                    "deprecated": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "daysOfTheWeek": {
                          "type": "array",
                          "items": {
                            "type": "number",
                            "maximum": 6,
                            "minimum": 0
                          },
                          "description": "Days of the week (0=Sun, 6=Sat)",
                          "example": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ]
                        },
                        "hours": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "openHour": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 23,
                                "description": "Opening hour (0-23)",
                                "example": 8
                              },
                              "openMinute": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 60,
                                "description": "Opening minute (0-59)",
                                "example": 0
                              },
                              "closeHour": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 23,
                                "description": "Closing hour (0-23)",
                                "example": 17
                              },
                              "closeMinute": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 60,
                                "description": "Closing minute (0-59)",
                                "example": 0
                              }
                            },
                            "required": [
                              "openHour",
                              "openMinute",
                              "closeHour",
                              "closeMinute"
                            ],
                            "title": "Hour"
                          },
                          "description": "Open hours for the specified days",
                          "example": [
                            {
                              "openHour": 8,
                              "openMinute": 0,
                              "closeHour": 17,
                              "closeMinute": 0
                            }
                          ]
                        }
                      },
                      "required": [
                        "daysOfTheWeek",
                        "hours"
                      ],
                      "title": "OpenHour"
                    },
                    "example": [
                      {
                        "daysOfTheWeek": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "hours": [
                          {
                            "openHour": 8,
                            "openMinute": 0,
                            "closeHour": 17,
                            "closeMinute": 0
                          }
                        ]
                      }
                    ]
                  },
                  "enableRecurring": {
                    "type": "boolean",
                    "description": "Enable recurring appointments for the calendars. Please note that only one member should be added in the calendar to enable this",
                    "default": false,
                    "example": false
                  },
                  "recurring": {
                    "description": "Recurring appointment configuration",
                    "example": {
                      "freq": "WEEKLY",
                      "count": 4,
                      "bookingOption": "skip",
                      "bookingOverlapDefaultStatus": "confirmed"
                    },
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "freq": {
                            "type": "string",
                            "enum": [
                              "DAILY",
                              "WEEKLY",
                              "MONTHLY"
                            ],
                            "description": "Frequency of recurrence",
                            "example": "WEEKLY"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of recurrences",
                            "maximum": 24,
                            "example": 4
                          },
                          "bookingOption": {
                            "type": "string",
                            "description": "This setting contols what to do incase a recurring slot is unavailable",
                            "enum": [
                              "skip",
                              "continue",
                              "book_next"
                            ],
                            "example": "skip"
                          },
                          "bookingOverlapDefaultStatus": {
                            "type": "string",
                            "description": "This setting contols what to do incase a recurring slot is unavailable",
                            "enum": [
                              "confirmed",
                              "new"
                            ],
                            "example": "confirmed"
                          }
                        },
                        "title": "Recurring"
                      }
                    ]
                  },
                  "formId": {
                    "type": "string",
                    "description": "Form ID to be used for booking",
                    "example": "YlWd2wuCAZQzh2cH1fVZ"
                  },
                  "stickyContact": {
                    "type": "boolean",
                    "description": "Enable sticky contact assignment",
                    "example": true
                  },
                  "isLivePaymentMode": {
                    "type": "boolean",
                    "description": "Whether payment mode is live",
                    "example": false
                  },
                  "autoConfirm": {
                    "type": "boolean",
                    "default": true,
                    "description": "Auto-confirm appointments",
                    "example": true
                  },
                  "shouldSendAlertEmailsToAssignedMember": {
                    "type": "boolean",
                    "description": "Send alert emails to assigned team member",
                    "example": false
                  },
                  "alertEmail": {
                    "type": "string",
                    "description": "Alert email address",
                    "example": "alerts@example.com"
                  },
                  "googleInvitationEmails": {
                    "type": "boolean",
                    "default": false,
                    "description": "Send Google invitation emails",
                    "example": true
                  },
                  "allowReschedule": {
                    "type": "boolean",
                    "default": true,
                    "description": "Allow rescheduling of appointments",
                    "example": true
                  },
                  "allowCancellation": {
                    "type": "boolean",
                    "default": true,
                    "description": "Allow cancellation of appointments",
                    "example": true
                  },
                  "shouldAssignContactToTeamMember": {
                    "type": "boolean",
                    "description": "Assign contact to team member on booking",
                    "example": true
                  },
                  "shouldSkipAssigningContactForExisting": {
                    "type": "boolean",
                    "description": "Skip assigning contact if contact already exists",
                    "example": false
                  },
                  "notes": {
                    "type": "string",
                    "description": "Notes for the calendar",
                    "example": "Please arrive 10 minutes early."
                  },
                  "pixelId": {
                    "type": "string",
                    "description": "Facebook Pixel ID for tracking",
                    "example": "1234567890"
                  },
                  "formSubmitType": {
                    "type": "string",
                    "default": "ThankYouMessage",
                    "enum": [
                      "RedirectURL",
                      "ThankYouMessage"
                    ],
                    "description": "Action after form submission",
                    "example": "ThankYouMessage"
                  },
                  "formSubmitRedirectURL": {
                    "type": "string",
                    "description": "Redirect URL after form submission",
                    "example": "https://example.com/thank-you"
                  },
                  "formSubmitThanksMessage": {
                    "type": "string",
                    "description": "Thank you message displayed after form submission",
                    "example": "Thank you for booking!"
                  },
                  "availabilityType": {
                    "type": "number",
                    "enum": [
                      0,
                      1
                    ],
                    "description": "While we will support this property for backward compatibility, it is not required anymore.",
                    "deprecated": true,
                    "example": 0
                  },
                  "availabilities": {
                    "description": "While we will support this property for backward compatibility, it is recommended to use 'Availability' APIs instead.",
                    "deprecated": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "description": "Formulate the date string in the format of `<YYYY-MM-DD in local timezone>T00:00:00.000Z`.",
                          "example": "2023-09-24T00:00:00.000Z"
                        },
                        "hours": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "openHour": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 23,
                                "description": "Opening hour (0-23)",
                                "example": 8
                              },
                              "openMinute": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 60,
                                "description": "Opening minute (0-59)",
                                "example": 0
                              },
                              "closeHour": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 23,
                                "description": "Closing hour (0-23)",
                                "example": 17
                              },
                              "closeMinute": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 60,
                                "description": "Closing minute (0-59)",
                                "example": 0
                              }
                            },
                            "required": [
                              "openHour",
                              "openMinute",
                              "closeHour",
                              "closeMinute"
                            ],
                            "title": "Hour"
                          },
                          "description": "Available hours for the date",
                          "example": [
                            {
                              "openHour": 8,
                              "openMinute": 0,
                              "closeHour": 17,
                              "closeMinute": 0
                            }
                          ]
                        },
                        "deleted": {
                          "type": "boolean",
                          "default": false,
                          "description": "Whether this availability is deleted",
                          "example": false
                        }
                      },
                      "required": [
                        "date",
                        "hours"
                      ],
                      "title": "Availability"
                    },
                    "example": [
                      {
                        "date": "2023-09-24T00:00:00.000Z",
                        "hours": [
                          {
                            "openHour": 8,
                            "openMinute": 0,
                            "closeHour": 17,
                            "closeMinute": 0
                          }
                        ],
                        "deleted": false
                      }
                    ]
                  },
                  "guestType": {
                    "type": "string",
                    "enum": [
                      "count_only",
                      "collect_detail"
                    ],
                    "description": "Type of guest allowed",
                    "example": "count_only"
                  },
                  "consentLabel": {
                    "type": "string",
                    "description": "Consent label text",
                    "example": "I confirm that I want to receive content from this company using any contact information I provide."
                  },
                  "calendarCoverImage": {
                    "type": "string",
                    "example": "https://path-to-image.com",
                    "description": "Calendar cover image URL"
                  },
                  "lookBusyConfig": {
                    "description": "Look Busy Configuration",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "description": "Apply Look Busy",
                            "example": true,
                            "default": false
                          },
                          "lookBusyPercentage": {
                            "type": "number",
                            "description": "Percentage of slots that will be hidden",
                            "example": 50
                          },
                          "LookBusyPercentage": {
                            "type": "number",
                            "description": "Percentage of slots that will be hidden (deprecated, use lookBusyPercentage)",
                            "example": 50,
                            "deprecated": true
                          }
                        },
                        "required": [
                          "enabled",
                          "lookBusyPercentage"
                        ],
                        "title": "LookBusyConfiguration"
                      }
                    ],
                    "example": {
                      "enabled": true,
                      "lookBusyPercentage": 50
                    }
                  },
                  "id": {
                    "type": "string",
                    "example": "0TkCdp9PfvLeWKYRRvIz",
                    "description": "Calendar ID"
                  },
                  "appointmentPerSlot": {
                    "type": "number",
                    "default": 1,
                    "description": "Maximum bookings per slot (per user). Maximum seats per slot in case of Class Booking Calendar.",
                    "example": 1
                  },
                  "appointmentPerDay": {
                    "type": "number",
                    "description": "Number of appointments that can be booked for a given day",
                    "example": 8
                  }
                },
                "required": [
                  "locationId",
                  "name",
                  "id"
                ],
                "title": "CalendarDTO"
              }
            ]
          }
        },
        "required": [
          "calendar"
        ],
        "title": "CalendarByIdSuccessfulResponseDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/calendars/' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "isActive": true,
  "notifications": [
    {
      "type": "email",
      "shouldSendToContact": false,
      "shouldSendToGuest": false,
      "shouldSendToUser": false,
      "shouldSendToSelectedUsers": false,
      "selectedUsers": "user1@testemail.com,user2@testemail.com"
    }
  ],
  "locationId": "ocQHyuzHvysMo5N5VsXc",
  "groupId": "BqTwX8QFwXzpegMve9EQ",
  "teamMembers": [
    {
      "userId": "ocQHyuzHvysMo5N5VsXc",
      "priority": 0.5,
      "isPrimary": true
    }
  ],
  "eventType": "RoundRobin_OptimizeForAvailability",
  "name": "test calendar",
  "description": "this is used for testing",
  "slug": "test1",
  "widgetSlug": "test1",
  "calendarType": "round_robin",
  "widgetType": "classic",
  "eventTitle": "{{contact.name}}",
  "eventColor": "#039BE5",
  "locationConfigurations": [
    {
      "kind": "custom",
      "location": "https://meet.google.com/abc-def"
    }
  ],
  "slotDuration": 30,
  "slotDurationUnit": "mins",
  "durationOptions": [
    {
      "duration": 15,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 1
    },
    {
      "duration": 30,
      "durationUnit": "mins",
      "isDefault": true,
      "order": 2
    },
    {
      "duration": 60,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 3
    }
  ],
  "slotInterval": 30,
  "slotIntervalUnit": "mins",
  "slotBuffer": 15,
  "slotBufferUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "appoinmentPerSlot": 1,
  "appoinmentPerDay": 8,
  "allowBookingAfter": 4,
  "allowBookingAfterUnit": "days",
  "allowBookingFor": 30,
  "allowBookingForUnit": "days",
  "countAvailableDaysOnly": false,
  "openHours": [
    {
      "daysOfTheWeek": [
        1,
        2,
        3,
        4,
        5
      ],
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ]
    }
  ],
  "enableRecurring": false,
  "recurring": {
    "freq": "WEEKLY",
    "count": 4,
    "bookingOption": "skip",
    "bookingOverlapDefaultStatus": "confirmed"
  },
  "formId": "YlWd2wuCAZQzh2cH1fVZ",
  "stickyContact": true,
  "isLivePaymentMode": false,
  "autoConfirm": true,
  "shouldSendAlertEmailsToAssignedMember": false,
  "alertEmail": "alerts@example.com",
  "googleInvitationEmails": true,
  "allowReschedule": true,
  "allowCancellation": true,
  "shouldAssignContactToTeamMember": true,
  "shouldSkipAssigningContactForExisting": false,
  "notes": "Please arrive 10 minutes early.",
  "pixelId": "1234567890",
  "formSubmitType": "ThankYouMessage",
  "formSubmitRedirectURL": "https://example.com/thank-you",
  "formSubmitThanksMessage": "Thank you for booking!",
  "availabilityType": 0,
  "availabilities": [
    {
      "date": "2023-09-24T00:00:00.000Z",
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ],
      "deleted": false
    }
  ],
  "guestType": "count_only",
  "consentLabel": "I confirm that I want to receive content from this company using any contact information I provide.",
  "calendarCoverImage": "https://path-to-image.com",
  "lookBusyConfig": {
    "enabled": true,
    "lookBusyPercentage": 50
  },
  "appointmentPerSlot": 1,
  "appointmentPerDay": 8
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "isActive": true,
      "notifications": [
        {
          "type": "email",
          "shouldSendToContact": false,
          "shouldSendToGuest": false,
          "shouldSendToUser": false,
          "shouldSendToSelectedUsers": false,
          "selectedUsers": "user1@testemail.com,user2@testemail.com"
        }
      ],
      "locationId": "ocQHyuzHvysMo5N5VsXc",
      "groupId": "BqTwX8QFwXzpegMve9EQ",
      "teamMembers": [
        {
          "userId": "ocQHyuzHvysMo5N5VsXc",
          "priority": 0.5,
          "isPrimary": true
        }
      ],
      "eventType": "RoundRobin_OptimizeForAvailability",
      "name": "test calendar",
      "description": "this is used for testing",
      "slug": "test1",
      "widgetSlug": "test1",
      "calendarType": "round_robin",
      "widgetType": "classic",
      "eventTitle": "{{contact.name}}",
      "eventColor": "#039BE5",
      "locationConfigurations": [
        {
          "kind": "custom",
          "location": "https://meet.google.com/abc-def"
        }
      ],
      "slotDuration": 30,
      "slotDurationUnit": "mins",
      "durationOptions": [
        {
          "duration": 15,
          "durationUnit": "mins",
          "isDefault": false,
          "order": 1
        },
        {
          "duration": 30,
          "durationUnit": "mins",
          "isDefault": true,
          "order": 2
        },
        {
          "duration": 60,
          "durationUnit": "mins",
          "isDefault": false,
          "order": 3
        }
      ],
      "slotInterval": 30,
      "slotIntervalUnit": "mins",
      "slotBuffer": 15,
      "slotBufferUnit": "mins",
      "preBuffer": 10,
      "preBufferUnit": "mins",
      "appoinmentPerSlot": 1,
      "appoinmentPerDay": 8,
      "allowBookingAfter": 4,
      "allowBookingAfterUnit": "days",
      "allowBookingFor": 30,
      "allowBookingForUnit": "days",
      "countAvailableDaysOnly": false,
      "openHours": [
        {
          "daysOfTheWeek": [
            1,
            2,
            3,
            4,
            5
          ],
          "hours": [
            {
              "openHour": 8,
              "openMinute": 0,
              "closeHour": 17,
              "closeMinute": 0
            }
          ]
        }
      ],
      "enableRecurring": false,
      "recurring": {
        "freq": "WEEKLY",
        "count": 4,
        "bookingOption": "skip",
        "bookingOverlapDefaultStatus": "confirmed"
      },
      "formId": "YlWd2wuCAZQzh2cH1fVZ",
      "stickyContact": true,
      "isLivePaymentMode": false,
      "autoConfirm": true,
      "shouldSendAlertEmailsToAssignedMember": false,
      "alertEmail": "alerts@example.com",
      "googleInvitationEmails": true,
      "allowReschedule": true,
      "allowCancellation": true,
      "shouldAssignContactToTeamMember": true,
      "shouldSkipAssigningContactForExisting": false,
      "notes": "Please arrive 10 minutes early.",
      "pixelId": "1234567890",
      "formSubmitType": "ThankYouMessage",
      "formSubmitRedirectURL": "https://example.com/thank-you",
      "formSubmitThanksMessage": "Thank you for booking!",
      "availabilityType": 0,
      "availabilities": [
        {
          "date": "2023-09-24T00:00:00.000Z",
          "hours": [
            {
              "openHour": 8,
              "openMinute": 0,
              "closeHour": 17,
              "closeMinute": 0
            }
          ],
          "deleted": false
        }
      ],
      "guestType": "count_only",
      "consentLabel": "I confirm that I want to receive content from this company using any contact information I provide.",
      "calendarCoverImage": "https://path-to-image.com",
      "lookBusyConfig": {
        "enabled": true,
        "lookBusyPercentage": 50
      },
      "appointmentPerSlot": 1,
      "appointmentPerDay": 8
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/calendars/', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/calendars/"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "isActive": true,
    "notifications": [
        {
            "type": "email",
            "shouldSendToContact": false,
            "shouldSendToGuest": false,
            "shouldSendToUser": false,
            "shouldSendToSelectedUsers": false,
            "selectedUsers": "user1@testemail.com,user2@testemail.com"
        }
    ],
    "locationId": "ocQHyuzHvysMo5N5VsXc",
    "groupId": "BqTwX8QFwXzpegMve9EQ",
    "teamMembers": [
        {
            "userId": "ocQHyuzHvysMo5N5VsXc",
            "priority": 0.5,
            "isPrimary": true
        }
    ],
    "eventType": "RoundRobin_OptimizeForAvailability",
    "name": "test calendar",
    "description": "this is used for testing",
    "slug": "test1",
    "widgetSlug": "test1",
    "calendarType": "round_robin",
    "widgetType": "classic",
    "eventTitle": "{{contact.name}}",
    "eventColor": "#039BE5",
    "locationConfigurations": [
        {
            "kind": "custom",
            "location": "https://meet.google.com/abc-def"
        }
    ],
    "slotDuration": 30,
    "slotDurationUnit": "mins",
    "durationOptions": [
        {
            "duration": 15,
            "durationUnit": "mins",
            "isDefault": false,
            "order": 1
        },
        {
            "duration": 30,
            "durationUnit": "mins",
            "isDefault": true,
            "order": 2
        },
        {
            "duration": 60,
            "durationUnit": "mins",
            "isDefault": false,
            "order": 3
        }
    ],
    "slotInterval": 30,
    "slotIntervalUnit": "mins",
    "slotBuffer": 15,
    "slotBufferUnit": "mins",
    "preBuffer": 10,
    "preBufferUnit": "mins",
    "appoinmentPerSlot": 1,
    "appoinmentPerDay": 8,
    "allowBookingAfter": 4,
    "allowBookingAfterUnit": "days",
    "allowBookingFor": 30,
    "allowBookingForUnit": "days",
    "countAvailableDaysOnly": false,
    "openHours": [
        {
            "daysOfTheWeek": [
                1,
                2,
                3,
                4,
                5
            ],
            "hours": [
                {
                    "openHour": 8,
                    "openMinute": 0,
                    "closeHour": 17,
                    "closeMinute": 0
                }
            ]
        }
    ],
    "enableRecurring": false,
    "recurring": {
        "freq": "WEEKLY",
        "count": 4,
        "bookingOption": "skip",
        "bookingOverlapDefaultStatus": "confirmed"
    },
    "formId": "YlWd2wuCAZQzh2cH1fVZ",
    "stickyContact": true,
    "isLivePaymentMode": false,
    "autoConfirm": true,
    "shouldSendAlertEmailsToAssignedMember": false,
    "alertEmail": "alerts@example.com",
    "googleInvitationEmails": true,
    "allowReschedule": true,
    "allowCancellation": true,
    "shouldAssignContactToTeamMember": true,
    "shouldSkipAssigningContactForExisting": false,
    "notes": "Please arrive 10 minutes early.",
    "pixelId": "1234567890",
    "formSubmitType": "ThankYouMessage",
    "formSubmitRedirectURL": "https://example.com/thank-you",
    "formSubmitThanksMessage": "Thank you for booking!",
    "availabilityType": 0,
    "availabilities": [
        {
            "date": "2023-09-24T00:00:00.000Z",
            "hours": [
                {
                    "openHour": 8,
                    "openMinute": 0,
                    "closeHour": 17,
                    "closeMinute": 0
                }
            ],
            "deleted": false
        }
    ],
    "guestType": "count_only",
    "consentLabel": "I confirm that I want to receive content from this company using any contact information I provide.",
    "calendarCoverImage": "https://path-to-image.com",
    "lookBusyConfig": {
        "enabled": true,
        "lookBusyPercentage": 50
    },
    "appointmentPerSlot": 1,
    "appointmentPerDay": 8
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/calendars/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "isActive": true,
  "notifications": [
    {
      "type": "email",
      "shouldSendToContact": false,
      "shouldSendToGuest": false,
      "shouldSendToUser": false,
      "shouldSendToSelectedUsers": false,
      "selectedUsers": "user1@testemail.com,user2@testemail.com"
    }
  ],
  "locationId": "ocQHyuzHvysMo5N5VsXc",
  "groupId": "BqTwX8QFwXzpegMve9EQ",
  "teamMembers": [
    {
      "userId": "ocQHyuzHvysMo5N5VsXc",
      "priority": 0.5,
      "isPrimary": true
    }
  ],
  "eventType": "RoundRobin_OptimizeForAvailability",
  "name": "test calendar",
  "description": "this is used for testing",
  "slug": "test1",
  "widgetSlug": "test1",
  "calendarType": "round_robin",
  "widgetType": "classic",
  "eventTitle": "{{contact.name}}",
  "eventColor": "#039BE5",
  "locationConfigurations": [
    {
      "kind": "custom",
      "location": "https://meet.google.com/abc-def"
    }
  ],
  "slotDuration": 30,
  "slotDurationUnit": "mins",
  "durationOptions": [
    {
      "duration": 15,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 1
    },
    {
      "duration": 30,
      "durationUnit": "mins",
      "isDefault": true,
      "order": 2
    },
    {
      "duration": 60,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 3
    }
  ],
  "slotInterval": 30,
  "slotIntervalUnit": "mins",
  "slotBuffer": 15,
  "slotBufferUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "appoinmentPerSlot": 1,
  "appoinmentPerDay": 8,
  "allowBookingAfter": 4,
  "allowBookingAfterUnit": "days",
  "allowBookingFor": 30,
  "allowBookingForUnit": "days",
  "countAvailableDaysOnly": false,
  "openHours": [
    {
      "daysOfTheWeek": [
        1,
        2,
        3,
        4,
        5
      ],
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ]
    }
  ],
  "enableRecurring": false,
  "recurring": {
    "freq": "WEEKLY",
    "count": 4,
    "bookingOption": "skip",
    "bookingOverlapDefaultStatus": "confirmed"
  },
  "formId": "YlWd2wuCAZQzh2cH1fVZ",
  "stickyContact": true,
  "isLivePaymentMode": false,
  "autoConfirm": true,
  "shouldSendAlertEmailsToAssignedMember": false,
  "alertEmail": "alerts@example.com",
  "googleInvitationEmails": true,
  "allowReschedule": true,
  "allowCancellation": true,
  "shouldAssignContactToTeamMember": true,
  "shouldSkipAssigningContactForExisting": false,
  "notes": "Please arrive 10 minutes early.",
  "pixelId": "1234567890",
  "formSubmitType": "ThankYouMessage",
  "formSubmitRedirectURL": "https://example.com/thank-you",
  "formSubmitThanksMessage": "Thank you for booking!",
  "availabilityType": 0,
  "availabilities": [
    {
      "date": "2023-09-24T00:00:00.000Z",
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ],
      "deleted": false
    }
  ],
  "guestType": "count_only",
  "consentLabel": "I confirm that I want to receive content from this company using any contact information I provide.",
  "calendarCoverImage": "https://path-to-image.com",
  "lookBusyConfig": {
    "enabled": true,
    "lookBusyPercentage": 50
  },
  "appointmentPerSlot": 1,
  "appointmentPerDay": 8
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/calendars/")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"isActive\":true,\"notifications\":[{\"type\":\"email\",\"shouldSendToContact\":false,\"shouldSendToGuest\":false,\"shouldSendToUser\":false,\"shouldSendToSelectedUsers\":false,\"selectedUsers\":\"user1@testemail.com,user2@testemail.com\"}],\"locationId\":\"ocQHyuzHvysMo5N5VsXc\",\"groupId\":\"BqTwX8QFwXzpegMve9EQ\",\"teamMembers\":[{\"userId\":\"ocQHyuzHvysMo5N5VsXc\",\"priority\":0.5,\"isPrimary\":true}],\"eventType\":\"RoundRobin_OptimizeForAvailability\",\"name\":\"test calendar\",\"description\":\"this is used for testing\",\"slug\":\"test1\",\"widgetSlug\":\"test1\",\"calendarType\":\"round_robin\",\"widgetType\":\"classic\",\"eventTitle\":\"{{contact.name}}\",\"eventColor\":\"#039BE5\",\"locationConfigurations\":[{\"kind\":\"custom\",\"location\":\"https://meet.google.com/abc-def\"}],\"slotDuration\":30,\"slotDurationUnit\":\"mins\",\"durationOptions\":[{\"duration\":15,\"durationUnit\":\"mins\",\"isDefault\":false,\"order\":1},{\"duration\":30,\"durationUnit\":\"mins\",\"isDefault\":true,\"order\":2},{\"duration\":60,\"durationUnit\":\"mins\",\"isDefault\":false,\"order\":3}],\"slotInterval\":30,\"slotIntervalUnit\":\"mins\",\"slotBuffer\":15,\"slotBufferUnit\":\"mins\",\"preBuffer\":10,\"preBufferUnit\":\"mins\",\"appoinmentPerSlot\":1,\"appoinmentPerDay\":8,\"allowBookingAfter\":4,\"allowBookingAfterUnit\":\"days\",\"allowBookingFor\":30,\"allowBookingForUnit\":\"days\",\"countAvailableDaysOnly\":false,\"openHours\":[{\"daysOfTheWeek\":[1,2,3,4,5],\"hours\":[{\"openHour\":8,\"openMinute\":0,\"closeHour\":17,\"closeMinute\":0}]}],\"enableRecurring\":false,\"recurring\":{\"freq\":\"WEEKLY\",\"count\":4,\"bookingOption\":\"skip\",\"bookingOverlapDefaultStatus\":\"confirmed\"},\"formId\":\"YlWd2wuCAZQzh2cH1fVZ\",\"stickyContact\":true,\"isLivePaymentMode\":false,\"autoConfirm\":true,\"shouldSendAlertEmailsToAssignedMember\":false,\"alertEmail\":\"alerts@example.com\",\"googleInvitationEmails\":true,\"allowReschedule\":true,\"allowCancellation\":true,\"shouldAssignContactToTeamMember\":true,\"shouldSkipAssigningContactForExisting\":false,\"notes\":\"Please arrive 10 minutes early.\",\"pixelId\":\"1234567890\",\"formSubmitType\":\"ThankYouMessage\",\"formSubmitRedirectURL\":\"https://example.com/thank-you\",\"formSubmitThanksMessage\":\"Thank you for booking!\",\"availabilityType\":0,\"availabilities\":[{\"date\":\"2023-09-24T00:00:00.000Z\",\"hours\":[{\"openHour\":8,\"openMinute\":0,\"closeHour\":17,\"closeMinute\":0}],\"deleted\":false}],\"guestType\":\"count_only\",\"consentLabel\":\"I confirm that I want to receive content from this company using any contact information I provide.\",\"calendarCoverImage\":\"https://path-to-image.com\",\"lookBusyConfig\":{\"enabled\":true,\"lookBusyPercentage\":50},\"appointmentPerSlot\":1,\"appointmentPerDay\":8}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/calendars/"
  payload := strings.NewReader(`{
  "isActive": true,
  "notifications": [
    {
      "type": "email",
      "shouldSendToContact": false,
      "shouldSendToGuest": false,
      "shouldSendToUser": false,
      "shouldSendToSelectedUsers": false,
      "selectedUsers": "user1@testemail.com,user2@testemail.com"
    }
  ],
  "locationId": "ocQHyuzHvysMo5N5VsXc",
  "groupId": "BqTwX8QFwXzpegMve9EQ",
  "teamMembers": [
    {
      "userId": "ocQHyuzHvysMo5N5VsXc",
      "priority": 0.5,
      "isPrimary": true
    }
  ],
  "eventType": "RoundRobin_OptimizeForAvailability",
  "name": "test calendar",
  "description": "this is used for testing",
  "slug": "test1",
  "widgetSlug": "test1",
  "calendarType": "round_robin",
  "widgetType": "classic",
  "eventTitle": "{{contact.name}}",
  "eventColor": "#039BE5",
  "locationConfigurations": [
    {
      "kind": "custom",
      "location": "https://meet.google.com/abc-def"
    }
  ],
  "slotDuration": 30,
  "slotDurationUnit": "mins",
  "durationOptions": [
    {
      "duration": 15,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 1
    },
    {
      "duration": 30,
      "durationUnit": "mins",
      "isDefault": true,
      "order": 2
    },
    {
      "duration": 60,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 3
    }
  ],
  "slotInterval": 30,
  "slotIntervalUnit": "mins",
  "slotBuffer": 15,
  "slotBufferUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "appoinmentPerSlot": 1,
  "appoinmentPerDay": 8,
  "allowBookingAfter": 4,
  "allowBookingAfterUnit": "days",
  "allowBookingFor": 30,
  "allowBookingForUnit": "days",
  "countAvailableDaysOnly": false,
  "openHours": [
    {
      "daysOfTheWeek": [
        1,
        2,
        3,
        4,
        5
      ],
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ]
    }
  ],
  "enableRecurring": false,
  "recurring": {
    "freq": "WEEKLY",
    "count": 4,
    "bookingOption": "skip",
    "bookingOverlapDefaultStatus": "confirmed"
  },
  "formId": "YlWd2wuCAZQzh2cH1fVZ",
  "stickyContact": true,
  "isLivePaymentMode": false,
  "autoConfirm": true,
  "shouldSendAlertEmailsToAssignedMember": false,
  "alertEmail": "alerts@example.com",
  "googleInvitationEmails": true,
  "allowReschedule": true,
  "allowCancellation": true,
  "shouldAssignContactToTeamMember": true,
  "shouldSkipAssigningContactForExisting": false,
  "notes": "Please arrive 10 minutes early.",
  "pixelId": "1234567890",
  "formSubmitType": "ThankYouMessage",
  "formSubmitRedirectURL": "https://example.com/thank-you",
  "formSubmitThanksMessage": "Thank you for booking!",
  "availabilityType": 0,
  "availabilities": [
    {
      "date": "2023-09-24T00:00:00.000Z",
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ],
      "deleted": false
    }
  ],
  "guestType": "count_only",
  "consentLabel": "I confirm that I want to receive content from this company using any contact information I provide.",
  "calendarCoverImage": "https://path-to-image.com",
  "lookBusyConfig": {
    "enabled": true,
    "lookBusyPercentage": 50
  },
  "appointmentPerSlot": 1,
  "appointmentPerDay": 8
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/calendars/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "isActive": true,
  "notifications": [
    {
      "type": "email",
      "shouldSendToContact": false,
      "shouldSendToGuest": false,
      "shouldSendToUser": false,
      "shouldSendToSelectedUsers": false,
      "selectedUsers": "user1@testemail.com,user2@testemail.com"
    }
  ],
  "locationId": "ocQHyuzHvysMo5N5VsXc",
  "groupId": "BqTwX8QFwXzpegMve9EQ",
  "teamMembers": [
    {
      "userId": "ocQHyuzHvysMo5N5VsXc",
      "priority": 0.5,
      "isPrimary": true
    }
  ],
  "eventType": "RoundRobin_OptimizeForAvailability",
  "name": "test calendar",
  "description": "this is used for testing",
  "slug": "test1",
  "widgetSlug": "test1",
  "calendarType": "round_robin",
  "widgetType": "classic",
  "eventTitle": "{{contact.name}}",
  "eventColor": "#039BE5",
  "locationConfigurations": [
    {
      "kind": "custom",
      "location": "https://meet.google.com/abc-def"
    }
  ],
  "slotDuration": 30,
  "slotDurationUnit": "mins",
  "durationOptions": [
    {
      "duration": 15,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 1
    },
    {
      "duration": 30,
      "durationUnit": "mins",
      "isDefault": true,
      "order": 2
    },
    {
      "duration": 60,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 3
    }
  ],
  "slotInterval": 30,
  "slotIntervalUnit": "mins",
  "slotBuffer": 15,
  "slotBufferUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "appoinmentPerSlot": 1,
  "appoinmentPerDay": 8,
  "allowBookingAfter": 4,
  "allowBookingAfterUnit": "days",
  "allowBookingFor": 30,
  "allowBookingForUnit": "days",
  "countAvailableDaysOnly": false,
  "openHours": [
    {
      "daysOfTheWeek": [
        1,
        2,
        3,
        4,
        5
      ],
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ]
    }
  ],
  "enableRecurring": false,
  "recurring": {
    "freq": "WEEKLY",
    "count": 4,
    "bookingOption": "skip",
    "bookingOverlapDefaultStatus": "confirmed"
  },
  "formId": "YlWd2wuCAZQzh2cH1fVZ",
  "stickyContact": true,
  "isLivePaymentMode": false,
  "autoConfirm": true,
  "shouldSendAlertEmailsToAssignedMember": false,
  "alertEmail": "alerts@example.com",
  "googleInvitationEmails": true,
  "allowReschedule": true,
  "allowCancellation": true,
  "shouldAssignContactToTeamMember": true,
  "shouldSkipAssigningContactForExisting": false,
  "notes": "Please arrive 10 minutes early.",
  "pixelId": "1234567890",
  "formSubmitType": "ThankYouMessage",
  "formSubmitRedirectURL": "https://example.com/thank-you",
  "formSubmitThanksMessage": "Thank you for booking!",
  "availabilityType": 0,
  "availabilities": [
    {
      "date": "2023-09-24T00:00:00.000Z",
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ],
      "deleted": false
    }
  ],
  "guestType": "count_only",
  "consentLabel": "I confirm that I want to receive content from this company using any contact information I provide.",
  "calendarCoverImage": "https://path-to-image.com",
  "lookBusyConfig": {
    "enabled": true,
    "lookBusyPercentage": 50
  },
  "appointmentPerSlot": 1,
  "appointmentPerDay": 8
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "isActive": true,
  "notifications": [
    {
      "type": "email",
      "shouldSendToContact": false,
      "shouldSendToGuest": false,
      "shouldSendToUser": false,
      "shouldSendToSelectedUsers": false,
      "selectedUsers": "user1@testemail.com,user2@testemail.com"
    }
  ],
  "locationId": "ocQHyuzHvysMo5N5VsXc",
  "groupId": "BqTwX8QFwXzpegMve9EQ",
  "teamMembers": [
    {
      "userId": "ocQHyuzHvysMo5N5VsXc",
      "priority": 0.5,
      "isPrimary": true
    }
  ],
  "eventType": "RoundRobin_OptimizeForAvailability",
  "name": "test calendar",
  "description": "this is used for testing",
  "slug": "test1",
  "widgetSlug": "test1",
  "calendarType": "round_robin",
  "widgetType": "classic",
  "eventTitle": "{{contact.name}}",
  "eventColor": "#039BE5",
  "locationConfigurations": [
    {
      "kind": "custom",
      "location": "https://meet.google.com/abc-def"
    }
  ],
  "slotDuration": 30,
  "slotDurationUnit": "mins",
  "durationOptions": [
    {
      "duration": 15,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 1
    },
    {
      "duration": 30,
      "durationUnit": "mins",
      "isDefault": true,
      "order": 2
    },
    {
      "duration": 60,
      "durationUnit": "mins",
      "isDefault": false,
      "order": 3
    }
  ],
  "slotInterval": 30,
  "slotIntervalUnit": "mins",
  "slotBuffer": 15,
  "slotBufferUnit": "mins",
  "preBuffer": 10,
  "preBufferUnit": "mins",
  "appoinmentPerSlot": 1,
  "appoinmentPerDay": 8,
  "allowBookingAfter": 4,
  "allowBookingAfterUnit": "days",
  "allowBookingFor": 30,
  "allowBookingForUnit": "days",
  "countAvailableDaysOnly": false,
  "openHours": [
    {
      "daysOfTheWeek": [
        1,
        2,
        3,
        4,
        5
      ],
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ]
    }
  ],
  "enableRecurring": false,
  "recurring": {
    "freq": "WEEKLY",
    "count": 4,
    "bookingOption": "skip",
    "bookingOverlapDefaultStatus": "confirmed"
  },
  "formId": "YlWd2wuCAZQzh2cH1fVZ",
  "stickyContact": true,
  "isLivePaymentMode": false,
  "autoConfirm": true,
  "shouldSendAlertEmailsToAssignedMember": false,
  "alertEmail": "alerts@example.com",
  "googleInvitationEmails": true,
  "allowReschedule": true,
  "allowCancellation": true,
  "shouldAssignContactToTeamMember": true,
  "shouldSkipAssigningContactForExisting": false,
  "notes": "Please arrive 10 minutes early.",
  "pixelId": "1234567890",
  "formSubmitType": "ThankYouMessage",
  "formSubmitRedirectURL": "https://example.com/thank-you",
  "formSubmitThanksMessage": "Thank you for booking!",
  "availabilityType": 0,
  "availabilities": [
    {
      "date": "2023-09-24T00:00:00.000Z",
      "hours": [
        {
          "openHour": 8,
          "openMinute": 0,
          "closeHour": 17,
          "closeMinute": 0
        }
      ],
      "deleted": false
    }
  ],
  "guestType": "count_only",
  "consentLabel": "I confirm that I want to receive content from this company using any contact information I provide.",
  "calendarCoverImage": "https://path-to-image.com",
  "lookBusyConfig": {
    "enabled": true,
    "lookBusyPercentage": 50
  },
  "appointmentPerSlot": 1,
  "appointmentPerDay": 8
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/calendars/' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
