> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Calendar Events

> Get Calendar Events



## OpenAPI

````yaml /api-reference/calendars/openapi.json get /calendars/events
openapi: 3.0.0
info:
  title: Calendars API
  description: Documentation for Calendars API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Calendars
    description: Documentation for Calendars API
  - name: Calendar Groups
    description: Documentation for Calendars API
  - name: Calendar Events
    description: Documentation for Calendars API
  - name: Appointment Notes
    description: Documentation for Calendars API
  - name: Calendar Resources - Rooms and Equipment
    description: Documentation for Calendars API
  - name: Calendar Notifications
    description: Documentation for Calendars API
  - name: Availability
    description: Documentation for Calendars API
paths:
  /calendars/events:
    get:
      tags:
        - Calendar Events
      summary: Get Calendar Events
      description: Get Calendar Events
      operationId: get-calendar-events
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
        - name: locationId
          required: true
          in: query
          description: Location Id
          schema:
            example: 0007BWpSzSwfiuSl0tR2
            type: string
        - name: userId
          required: false
          in: query
          description: >-
            User Id - Owner of an appointment. Either of userId, groupId or
            calendarId is required
          schema:
            example: CVokAlI8fgw4WYWoCtQz
            type: string
        - name: calendarId
          required: false
          in: query
          description: Either of calendarId, userId or groupId is required
          schema:
            example: BqTwX8QFwXzpegMve9EQ
            type: string
        - name: groupId
          required: false
          in: query
          description: Either of groupId, calendarId or userId is required
          schema:
            type: string
            example: ocQHyuzHvysMo5N5VsXc
        - name: startTime
          required: true
          in: query
          description: Start Time (in millis)
          schema:
            example: '1680373800000'
            type: string
        - name: endTime
          required: true
          in: query
          description: End Time (in millis)
          schema:
            example: '1680978599999'
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCalendarEventsSuccessfulResponseDTO'
        '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/events.readonly
components:
  schemas:
    GetCalendarEventsSuccessfulResponseDTO:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/CalendarEventDTO'
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    CalendarEventDTO:
      type: object
      properties:
        id:
          type: string
          description: Event Id or Instance id for a recurring event
          example: ocQHyuzHvysMo5N5VsXc
        address:
          type: string
          description: Calendar Event address
          example: https://meet.google.com/yqp-gogr-wve
        title:
          type: string
          description: Calendar Event title
          example: Appointment with HoopAI Platform Dev team
        calendarId:
          type: string
          description: Calendar ID
          example: BqTwX8QFwXzpegMve9EQ
        locationId:
          type: string
          description: Location ID
          example: 0007BWpSzSwfiuSl0tR2
        contactId:
          type: string
          description: Contact ID
          example: 9NkT25Vor1v4aQatFsv2
        groupId:
          type: string
          description: Group ID
          example: 9NkT25Vor1v4aQatFsv2
        appointmentStatus:
          type: string
          description: Appointment Status
          example: confirmed
        assignedUserId:
          type: string
          description: AssignedUser - the primary owner of an appointment
          example: YlWd2wuCAZQzh2cH1fVZ
        users:
          description: Users - the secondary owners of an appointment.
          example:
            - YlWd2wuCAZQzh2cH1fVZ
            - 9NkT25Vor1v4aQatFsv2
          type: array
          items:
            type: string
        notes:
          type: string
          description: Notes
          example: Some dummy note
        description:
          type: string
          description: Description
          example: Some dummy description
        isRecurring:
          type: boolean
          description: true if the event is recurring otherwise false
          example: 'true'
        rrule:
          type: string
          description: >-
            RRULE as per the iCalendar (RFC 5545) specification for recurring
            events. DTSTART is not required, instance ids are calculated on the
            basis of startTime of the event.
          example: RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5
        startTime:
          type: object
          description: Start Time
          example: '2023-09-25T16:00:00+05:30'
        endTime:
          type: object
          description: End Time
          example: '2023-09-25T16:00:00+05:30'
        dateAdded:
          type: object
          description: Date Added
          example: '2023-09-25T16:00:00+05:30'
        dateUpdated:
          type: object
          description: Date Updated
          example: '2023-09-25T16:00:00+05:30'
        assignedResources:
          description: Ids of associated resources rooms and/or equipments
          type: array
          items:
            type: string
        createdBy:
          $ref: '#/components/schemas/CreatedOrUpdatedBy'
        masterEventId:
          type: string
          description: Master event id for a recurring instance
          example: ocWd2wuBGAQzh2cH1fSZ
      required:
        - id
        - title
        - calendarId
        - locationId
        - contactId
        - groupId
        - appointmentStatus
        - assignedUserId
        - users
        - startTime
        - endTime
        - dateAdded
        - dateUpdated
    CreatedOrUpdatedBy:
      type: object
      properties:
        userId:
          type: string
          description: The ID of the user who created or updated the appointment
        source:
          type: string
          description: The source of the appointment
      required:
        - source
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use the Access Token generated with user type as Sub-Account (OR)
        Private Integration Token of Sub-Account.
      type: http

````