> ## 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.

# Create appointment

> Create appointment



## OpenAPI

````yaml /api-reference/calendars/openapi.json post /calendars/events/appointments
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/appointments:
    post:
      tags:
        - Calendar Events
      summary: Create appointment
      description: Create appointment
      operationId: create-appointment
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppointmentCreateSchema'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppointmentSchemaResponse'
        '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.write
components:
  schemas:
    AppointmentCreateSchema:
      type: object
      properties:
        title:
          type: string
          description: Title
          example: Test Event
        meetingLocationType:
          type: string
          description: >-
            Meeting location type. 

            - If `address` is provided in the request body, the
            `meetingLocationType` defaults to **custom**.
          example: custom
          enum:
            - custom
            - zoom
            - gmeet
            - phone
            - address
            - ms_teams
            - google
        meetingLocationId:
          type: string
          description: >-
            The unique identifier for the meeting location.

            - This value can be found in `calendar.locationConfigurations`or
            `calendar.teamMembers[].locationConfigurations`
          example: custom_0
          default: default
        overrideLocationConfig:
          type: boolean
          description: |
            Flag to override location config
            - **false** - If only `meetingLocationId` is provided
            - **true** - If only `meetingLocationType` is provided
          example: true
        appointmentStatus:
          type: string
          example: confirmed
          enum:
            - new
            - confirmed
            - cancelled
            - showed
            - noshow
            - invalid
        assignedUserId:
          type: string
          description: Assigned User Id
          example: 0007BWpSzSwfiuSl0tR2
        description:
          type: string
          description: Appointment Description
          example: Booking a call to discuss the project
        address:
          type: string
          description: Appointment Address
          example: Zoom
        ignoreDateRange:
          type: boolean
          description: >-
            If set to true, the minimum scheduling notice and date range would
            be ignored
          example: false
        toNotify:
          type: boolean
          description: If set to false, the automations will not run
          example: false
        ignoreFreeSlotValidation:
          type: boolean
          description: >-
            If true the time slot validation would be avoided for any
            appointment creation (even the ignoreDateRange)
          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. The rrule only be applied if
            ignoreFreeSlotValidation is true.
          example: RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5
        calendarId:
          type: string
          description: Calendar Id
          example: CVokAlI8fgw4WYWoCtQz
        locationId:
          type: string
          description: Location Id
          example: C2QujeCh8ZnC7al2InWR
        contactId:
          type: string
          description: Contact Id
          example: 0007BWpSzSwfiuSl0tR2
        startTime:
          type: string
          description: Start Time
          example: '2021-06-23T03:30:00+05:30'
        endTime:
          type: string
          description: End Time
          example: '2021-06-23T04:30:00+05:30'
      required:
        - calendarId
        - locationId
        - contactId
        - startTime
    AppointmentSchemaResponse:
      type: object
      properties:
        calendarId:
          type: string
          description: Calendar Id
          example: CVokAlI8fgw4WYWoCtQz
        locationId:
          type: string
          description: Location Id
          example: C2QujeCh8ZnC7al2InWR
        contactId:
          type: string
          description: Contact Id
          example: 0007BWpSzSwfiuSl0tR2
        startTime:
          type: string
          description: Start Time
          example: '2021-06-23T03:30:00+05:30'
        endTime:
          type: string
          description: End Time
          example: '2021-06-23T04:30:00+05:30'
        title:
          type: string
          description: Title
          example: Test Event
        meetingLocationType:
          type: string
          description: Meeting Location Type
          example: custom
          default: default
        appointmentStatus:
          type: string
          example: confirmed
          enum:
            - new
            - confirmed
            - cancelled
            - showed
            - noshow
            - invalid
            - active
            - completed
        assignedUserId:
          type: string
          description: Assigned User Id
          example: 0007BWpSzSwfiuSl0tR2
        address:
          type: string
          description: Appointment Address
          example: Zoom
        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
          example: RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5
        id:
          type: string
          description: Id
          example: 0TkCdp9PfvLeWKYRRvIz
      required:
        - calendarId
        - locationId
        - contactId
        - id
    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
  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

````