---
openapi: 3.0.1
info:
  title: Comeen Workplace API V2
  version: v2
  description: |
    This is the new Comeen API.

    A significant effort is being made to provide a quality documentation, with endpoint and
    schema descriptions.

    ## Experimental endpoints

    Endpoints tagged as `Experimental` are subject to change.

    Whenever a new endpoint is added, it will be temporarily marked as "Experimental" before
    being stabilised. The default delay before stabilisation is 2 months.

    ## Access to endpoints

    The API supports different kind of users:

    ### User

    This is a standard user as identified via <https://my.comeen.io>.

    ### Application

    This is the kind of access a non-Comeen developer is most likely to use, made for
    machine-to-machine communication.

    You can get an Application token using client credentials.

    ### Others

    Other kind of access can be documented but they correspond to internal usage:
    - Admin
    - Subscription Tunnel
    - Kiosk
    - Signage
components:
  securitySchemes:
    comeenOauth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.comeen.io/oauth/authorize
          tokenUrl: https://api.comeen.io/oauth/token
          scopes:
            admins:read: Permission admins:read
            admins:write: Permission admins:write
            api_keys:read: Permission api_keys:read
            api_keys:write: Permission api_keys:write
            settings:read: Permission settings:read
            settings:write: Permission settings:write
            integration_grants:read: Permission integration_grants:read
            integration_grants:write: Permission integration_grants:write
            buildings:read: Permission buildings:read
            buildings:write: Permission buildings:write
            floors:read: Permission floors:read
            floors:write: Permission floors:write
            areas:read: Permission areas:read
            areas:write: Permission areas:write
            users:read: Permission users:read
            users:write: Permission users:write
            usergroups:read: Permission usergroups:read
            usergroups:write: Permission usergroups:write
            usergroupmemberships:read: Permission usergroupmemberships:read
            usergroupmemberships:write: Permission usergroupmemberships:write
            departments:read: Permission departments:read
            departments:write: Permission departments:write
            people:read: Permission people:read
            people:write: Permission people:write
            teams:read: Permission teams:read
            teams:write: Permission teams:write
            companies:read: Permission companies:read
            companies:write: Permission companies:write
            notifications:read: Permission notifications:read
            notifications:write: Permission notifications:write
            notification_settings:read: Permission notification_settings:read
            notification_settings:write: Permission notification_settings:write
            spaces:read: Permission spaces:read
            spaces:write: Permission spaces:write
            space_settings:read: Permission space_settings:read
            space_settings:write: Permission space_settings:write
            calendars:read: Permission calendars:read
            calendars:write: Permission calendars:write
            appointments:read: Permission appointments:read
            appointments:write: Permission appointments:write
            guests:read: Permission guests:read
            guests:write: Permission guests:write
            invitations:read: Permission invitations:read
            invitations:write: Permission invitations:write
            kiosks:read: Permission kiosks:read
            kiosks:write: Permission kiosks:write
            kiosk_themes:read: Permission kiosk_themes:read
            kiosk_themes:write: Permission kiosk_themes:write
            kiosk_profiles:read: Permission kiosk_profiles:read
            kiosk_profiles:write: Permission kiosk_profiles:write
            visits:read: Permission visits:read
            visits:write: Permission visits:write
            visitors:read: Permission visitors:read
            visitors:write: Permission visitors:write
            badges:read: Permission badges:read
            badges:write: Permission badges:write
            visitor_trigger_rules:read: Permission visitor_trigger_rules:read
            visitor_trigger_rules:write: Permission visitor_trigger_rules:write
            workactivities:read: Permission workactivities:read
            workactivities:write: Permission workactivities:write
            presences:read: Permission presences:read
            presences:write: Permission presences:write
            desks:read: Permission desks:read
            desks:write: Permission desks:write
            bookabletypes:read: Permission bookabletypes:read
            bookabletypes:write: Permission bookabletypes:write
            bookables:read: Permission bookables:read
            bookables:write: Permission bookables:write
            seat_release_policies:read: Permission seat_release_policies:read
            seat_release_policies:write: Permission seat_release_policies:write
            presence_rules:read: Permission presence_rules:read
            presence_rules:write: Permission presence_rules:write
            meeting_rooms:read: Permission meeting_rooms:read
            meeting_rooms:write: Permission meeting_rooms:write
            meeting_room_bookings:read: Permission meeting_room_bookings:read
            meeting_room_bookings:write: Permission meeting_room_bookings:write
            room_release_policies:read: Permission room_release_policies:read
            room_release_policies:write: Permission room_release_policies:write
            room_dashboards:read: Permission room_dashboards:read
            room_dashboards:write: Permission room_dashboards:write
            room_dashboard_ip_rules:read: Permission room_dashboard_ip_rules:read
            room_dashboard_ip_rules:write: Permission room_dashboard_ip_rules:write
            announcements:read: Permission announcements:read
            announcements:write: Permission announcements:write
            facilities_services:read: Permission facilities_services:read
            facilities_services:write: Permission facilities_services:write
            bookable_resources:read: Permission bookable_resources:read
            bookable_resources:write: Permission bookable_resources:write
  schemas:
    MeetingRoomAppointmentState:
      type: string
      description: |
        The meeting room appointment's state can be derived from the v1's meeting room
        booking state:
        - `booked` and `canceled` remain unchanged
        - `ongoing` replaces `checked_in`
        - `finished` replaces `checked_out`
        - `released` indicates that the meeting room was released. The actual reason is
          documented in the `MeetingRoomAppointmentRelease` enum.
      enum:
      - booked
      - ongoing
      - finished
      - canceled
      - released
    MeetingRoomAppointmentRelease:
      type: string
      nullable: true
      description: |
        Indicate why the meeting room was released:
        - `manual` means it was released by an explicit user or admin action
        - `automatic` means nobody checked in the meeting room
        - `proactive` means a booking rule was not respected, or the associated recurring
          appointment is released.
      enum:
      - manual
      - automatic
      - proactive
    AppointmentEmbedded:
      type: object
      required:
      - id
      - topic
      - start
      - end
      - organizer
      properties:
        id:
          type: integer
        topic:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        organizer:
          allOf:
          - "$ref": "#/components/schemas/UserProfile"
          nullable: true
    MeetingRoomAppointment:
      type: object
      description: |
        A meeting room appointment is the copy of the event handled by the meeting room
        itself
      required:
      - id
      - topic
      - start
      - end
      - organizer
      - state
      - state_changes
      - workflow
      properties:
        id:
          type: integer
        topic:
          type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        organizer:
          "$ref": "#/components/schemas/NullablePersonOrUserProfile"
        state:
          "$ref": "#/components/schemas/MeetingRoomAppointmentState"
        release:
          "$ref": "#/components/schemas/MeetingRoomAppointmentRelease"
        state_changes:
          type: object
          properties:
            booked_at:
              type: string
              format: date-time
              nullable: true
            ongoing_at:
              type: string
              format: date-time
              nullable: true
            finished_at:
              type: string
              format: date-time
              nullable: true
            canceled_at:
              type: string
              format: date-time
              nullable: true
            released_at:
              type: string
              format: date-time
              nullable: true
        workflow:
          type: object
          properties:
            auto_release:
              type: object
              properties:
                planned_at:
                  type: string
                  format: date-time
                  nullable: true
            meeting_will_start_notification:
              type: object
              properties:
                planned_at:
                  type: string
                  format: date-time
                  nullable: true
                sent_at:
                  type: string
                  format: date-time
                  nullable: true
            meeting_started_notification:
              type: object
              properties:
                planned_at:
                  type: string
                  format: date-time
                  nullable: true
                sent_at:
                  type: string
                  format: date-time
                  nullable: true
            summary_notification:
              type: object
              properties:
                planned_at:
                  type: string
                  format: date-time
                  nullable: true
                sent_at:
                  type: string
                  format: date-time
                  nullable: true
    AreaEmbedded:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: integer
        name:
          type: string
    BookableResourcesBookingActive:
      type: boolean
      description: |
        Indicate whether or not the booking is active.

        An active booking prevents the creation of another booking for the same item
        and period.

        For example, a cancelled booking would be have this property set to `false`.

        This takes precedence over what the `state` attribute might indicate.
    BookableResourcesBookingState:
      type: string
      description: |
        State of the booking

        The exact meaning of the state might be different for different bookable
        resources types.

        Whatever the value, the `active` property takes precedence.
    BookableResourcesUserBookingList:
      type: object
      required:
      - bookings
      properties:
        bookings:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesUserBooking"
    BookableResourcesBookingDetails:
      type: object
      required:
      - id
      - active
      - state
      - start
      - end
      - original_start
      - original_end
      - provider_id
      - item
      - organizer
      - creator
      properties:
        id:
          type: integer
        active:
          "$ref": "#/components/schemas/BookableResourcesBookingActive"
        state:
          "$ref": "#/components/schemas/BookableResourcesBookingState"
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        original_start:
          type: string
          format: date-time
        original_end:
          type: string
          format: date-time
        provider_id:
          type: string
        item:
          "$ref": "#/components/schemas/BookableResourcesStandaloneItemWithoutUser"
        organizer:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/UserProfile"
        creator:
          nullable: true
          allOf:
          - type: object
            required:
            - id
            - type
            properties:
              id:
                type: integer
              type:
                type: string
    BookableResourcesBooking:
      type: object
      required:
      - id
      - active
      - state
      - start
      - end
      - item
      - organizer
      properties:
        id:
          type: integer
        active:
          "$ref": "#/components/schemas/BookableResourcesBookingActive"
        state:
          "$ref": "#/components/schemas/BookableResourcesBookingState"
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        item:
          "$ref": "#/components/schemas/BookableResourcesItemWithoutUser"
        organizer:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/UserProfile"
    BookableResourcesUserBooking:
      type: object
      required:
      - id
      - start
      - end
      - item
      properties:
        id:
          type: integer
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        item:
          "$ref": "#/components/schemas/BookableResourcesStandaloneItemWithoutUser"
    BookableResourcesBookingCreateForm:
      type: object
      required:
      - start
      - end
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        organizer_id:
          type: integer
          description: Id of the user this new booking is for
    BookableResourcesBookingSortBy:
      type: string
      enum:
      - booking_start
      - booking_end
      - organizer_id
      - item_building_name
      - item_floor_name
      - item_area_name
      - item_name
    PaginatedBookableResourcesTypeBookings:
      type: object
      required:
      - bookings
      - sort
      - filter
      - pagination
      properties:
        bookings:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesBooking"
        sort:
          nullable: true
          allOf:
          - type: object
            required:
            - by
            - order
            properties:
              by:
                "$ref": "#/components/schemas/BookableResourcesBookingSortBy"
              order:
                type: string
                enum:
                - asc
                - desc
        filter:
          type: object
          required:
          - start
          - end
          - list_all_bookings
          properties:
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
            list_all_bookings:
              type: boolean
            organizer:
              nullable: true
              allOf:
              - "$ref": "#/components/schemas/UserProfile"
            building:
              nullable: true
              allOf:
              - "$ref": "#/components/schemas/BuildingEmbedded"
            floor:
              nullable: true
              allOf:
              - "$ref": "#/components/schemas/FloorEmbedded"
            area:
              nullable: true
              allOf:
              - "$ref": "#/components/schemas/AreaEmbedded"
        pagination:
          "$ref": "#/components/schemas/Pagination"
    BookableResourcesMarkerDisplayShape:
      type: string
      enum:
      - round
      - square
    BookableResourcesMarkerDisplaySize:
      type: string
      enum:
      - small
      - normal
    BookableResourcesDisplayType:
      type: string
      enum:
      - marker
      - area
    BookableResourcesDisplay:
      oneOf:
      - "$ref": "#/components/schemas/BookableResourcesMarkerDisplay"
      - "$ref": "#/components/schemas/BookableResourcesAreaDisplay"
      discriminator:
        propertyName: type
        mapping:
          marker: "#/components/schemas/BookableResourcesMarkerDisplay"
          area: "#/components/schemas/BookableResourcesAreaDisplay"
    BookableResourcesMarkerDisplay:
      type: object
      required:
      - type
      - shape
      - icon
      - color
      - size
      properties:
        type:
          type: string
          enum:
          - marker
        shape:
          "$ref": "#/components/schemas/BookableResourcesMarkerDisplayShape"
        icon:
          type: string
          nullable: true
        color:
          type: string
          description: RGB color in hex, e.g. FF0099
        size:
          "$ref": "#/components/schemas/BookableResourcesMarkerDisplaySize"
    BookableResourcesAreaDisplay:
      type: object
      required:
      - type
      - icon
      - color
      properties:
        type:
          type: string
          enum:
          - area
        icon:
          type: string
          nullable: true
        color:
          type: string
          description: RGB color in hex, e.g. FF0099
    BookableResourcesImportedItem:
      type: object
      required:
      - state
      - name
      - sync_id
      - bookable
      - building
      - floor
      - area
      - assigned_user
      properties:
        state:
          "$ref": "#/components/schemas/BookableResourcesImportedItemState"
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        building:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
        assigned_user:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/UserProfile"
    BookableResourcesImportedItemState:
      type: string
      enum:
      - added
      - deleted
      - updated
      - unchanged
      - error
      description: |
        State of the item import:
        - added
          When the sync_id does not match an existing item
        - deleted
          When an existing item's sync_id was not found in the import
        - updated
          An item was found with a matching sync_id but the data is different
          when some data is different
        - unchanged
          An item was found with a matching sync_id and the data is up-to-date
        - error
          Error parsing one of the field (e.g. building name does not match an existing building)
    BookableResourcesImportedItemList:
      type: object
      required:
      - import_id
      - items
      properties:
        items:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesImportedItem"
        import_id:
          type: integer
    BookableResourcesImportOutcome:
      allOf:
      - "$ref": "#/components/schemas/BookableResourcesType"
      - "$ref": "#/components/schemas/BookableResourcesItemList"
      - type: object
        required:
        - import
        properties:
          import:
            type: object
            required:
            - success_count
            - failure_count
            properties:
              success_count:
                type: integer
              failure_count:
                type: integer
    BookableResourcesStandaloneItemWithoutUser:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - sync_id
      - bookable
      - position
      - building
      - floor
      - area
      - type
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        position:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BookableResourcesPosition"
        building:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
        type:
          "$ref": "#/components/schemas/BookableResourcesType"
    BookableResourcesItemWithoutUser:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - sync_id
      - bookable
      - position
      - building
      - floor
      - area
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        position:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BookableResourcesPosition"
        building:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
    PaginatedBookableResourcesItemList:
      type: object
      required:
      - items
      - pagination
      properties:
        items:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesItem"
        pagination:
          "$ref": "#/components/schemas/Pagination"
    BookableResourcesItemCreateForm:
      type: object
      required:
      - name
      - sync_id
      properties:
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
          default: false
        building_id:
          type: integer
          nullable: true
        floor_id:
          type: integer
          nullable: true
        area_id:
          type: integer
          nullable: true
        assigned_user_id:
          type: integer
          nullable: true
    BookableResourcesStandaloneItem:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - sync_id
      - bookable
      - position
      - building
      - floor
      - area
      - assigned_user
      - type
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        position:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BookableResourcesPosition"
        building:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
        assigned_user:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/UserProfile"
        type:
          "$ref": "#/components/schemas/BookableResourcesType"
    BookableResourcesItemUpdateForm:
      type: object
      required: []
      minProperties: 1
      properties:
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        building_id:
          type: integer
          nullable: true
        floor_id:
          type: integer
          nullable: true
        area_id:
          type: integer
          nullable: true
        assigned_user_id:
          type: integer
          nullable: true
    BookableResourcesItemListWithOnlyAreaAndPosition:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesItemWithOnlyAreaAndPosition"
    BookableResourcesItemListWithSchedules:
      type: object
      required:
      - items
      - schedule
      properties:
        items:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesItemWithSchedule"
        schedule:
          type: object
          required:
          - start
          - end
          properties:
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
    BookableResourcesItemWithOnlyAreaAndPosition:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - sync_id
      - bookable
      - position
      - area
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        position:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BookableResourcesPosition"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
    BookableResourcesItemList:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesItem"
    BookableResourcesItem:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - sync_id
      - bookable
      - position
      - building
      - floor
      - area
      - assigned_user
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        position:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BookableResourcesPosition"
        building:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
        assigned_user:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/UserProfile"
    BookableResourcesItemWithSchedule:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - sync_id
      - bookable
      - position
      - building
      - floor
      - area
      - schedule
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        sync_id:
          type: string
        bookable:
          type: boolean
        position:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BookableResourcesPosition"
        building:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
        schedule:
          "$ref": "#/components/schemas/BareboneSchedule"
    BookableResourcesInputPosition:
      oneOf:
      - "$ref": "#/components/schemas/BookableResourcesPointPosition"
      - "$ref": "#/components/schemas/BookableResourcesInputShapePosition"
      discriminator:
        propertyName: type
        mapping:
          point: "#/components/schemas/BookableResourcesPointPosition"
          shape: "#/components/schemas/BookableResourcesInputShapePosition"
    Shape:
      type: array
      items:
        "$ref": "#/components/schemas/Point"
      minItems: 3
    Point:
      type: object
      required:
      - x
      - "y"
      properties:
        x:
          type: integer
        "y":
          type: integer
    BookableResourcesPosition:
      oneOf:
      - "$ref": "#/components/schemas/BookableResourcesPointPosition"
      - "$ref": "#/components/schemas/BookableResourcesShapePosition"
      discriminator:
        propertyName: type
        mapping:
          point: "#/components/schemas/BookableResourcesPointPosition"
          shape: "#/components/schemas/BookableResourcesShapePosition"
    BookableResourcesPositionType:
      type: string
      enum:
      - point
      - shape
    BookableResourcesPointPosition:
      allOf:
      - "$ref": "#/components/schemas/Point"
      - type: object
        required:
        - type
        properties:
          type:
            "$ref": "#/components/schemas/BookableResourcesPositionType"
    BookableResourcesShapePosition:
      type: object
      required:
      - type
      - center
      - shape
      properties:
        type:
          "$ref": "#/components/schemas/BookableResourcesPositionType"
        center:
          "$ref": "#/components/schemas/Point"
        shape:
          "$ref": "#/components/schemas/Shape"
    BookableResourcesInputShapePosition:
      type: object
      required:
      - type
      - shape
      description: |
        A shape position the way it is expected as input, i.e. without the center
        property which is computed.
      properties:
        type:
          "$ref": "#/components/schemas/BookableResourcesPositionType"
        shape:
          "$ref": "#/components/schemas/Shape"
    ListedBookableResourcesType:
      allOf:
      - "$ref": "#/components/schemas/BookableResourcesType"
      - type: object
        required:
        - buildings
        - items_count
        properties:
          buildings:
            description: Aggregate of the items' buildings
            type: array
            items:
              "$ref": "#/components/schemas/BuildingEmbedded"
          items_count:
            type: integer
    BookableResourcesTypeList:
      type: object
      required:
      - types
      properties:
        types:
          type: array
          items:
            "$ref": "#/components/schemas/ListedBookableResourcesType"
    BookableResourcesTypeForm:
      type: object
      required:
      - name
      - description
      - bookable
      - booking_length_step_unit
      - booking_length_step
      - display
      properties:
        name:
          type: string
        description:
          type: string
        bookable:
          type: boolean
        booking_length_step_unit:
          "$ref": "#/components/schemas/BookableResourcesLengthStepUnit"
        booking_length_step:
          type: integer
          minimum: 0
        display:
          "$ref": "#/components/schemas/BookableResourcesDisplay"
    BookableResourcesType:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - description
      - bookable
      - booking_length_step_unit
      - booking_length_step
      - display
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        bookable:
          type: boolean
        booking_length_step_unit:
          "$ref": "#/components/schemas/BookableResourcesLengthStepUnit"
        booking_length_step:
          type: integer
          minimum: 0
        display:
          "$ref": "#/components/schemas/BookableResourcesDisplay"
    BookableResourcesAvailableTypeList:
      type: object
      required:
      - types
      - building
      - floor
      properties:
        types:
          type: array
          items:
            "$ref": "#/components/schemas/BookableResourcesType"
        building:
          "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
    BookableResourcesLengthStepUnit:
      type: string
      enum:
      - minutes
      - hours
      - days
      - half-days
    BookableResourcesTypeDetails:
      allOf:
      - "$ref": "#/components/schemas/BookableResourcesType"
      - "$ref": "#/components/schemas/BookableResourcesItemList"
    BuildingEmbedded:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: integer
        name:
          type: string
    DeskBookingsImportItem:
      type: object
      required:
      - desk
      - user
      properties:
        desk:
          type: object
          required:
          - sync_id
          - name
          properties:
            sync_id:
              type: string
            name:
              type: string
        user:
          "$ref": "#/components/schemas/UserEmbedded"
    DeskBookingsImport:
      type: object
      required:
      - id
      - booking_date
      - items
      properties:
        id:
          type: integer
        booking_date:
          type: string
          format: date
        items:
          type: array
          items:
            "$ref": "#/components/schemas/DeskBookingsImportItem"
    DeskBookingsImportErrorMalformed:
      type: object
      description: The file is not a parseable CSV.
      required:
      - error
      properties:
        error:
          type: string
          enum:
          - malformed
    DeskBookingsImportErrorInvalidHeaders:
      type: object
      description: The first row does not match the expected headers.
      required:
      - error
      - expected
      - found
      properties:
        error:
          type: string
          enum:
          - invalid_headers
        expected:
          type: array
          items:
            type: string
        found:
          type: array
          items:
            type: string
    DeskBookingsImportErrorEmptyContent:
      type: object
      description: The file has no data rows after the header.
      required:
      - error
      properties:
        error:
          type: string
          enum:
          - empty_content
    DeskBookingsImportError:
      oneOf:
      - "$ref": "#/components/schemas/DeskBookingsImportErrorMalformed"
      - "$ref": "#/components/schemas/DeskBookingsImportErrorInvalidHeaders"
      - "$ref": "#/components/schemas/DeskBookingsImportErrorEmptyContent"
      - "$ref": "#/components/schemas/DeskBookingsImportErrorInvalidContent"
      discriminator:
        propertyName: error
        mapping:
          malformed: "#/components/schemas/DeskBookingsImportErrorMalformed"
          invalid_headers: "#/components/schemas/DeskBookingsImportErrorInvalidHeaders"
          empty_content: "#/components/schemas/DeskBookingsImportErrorEmptyContent"
          invalid_content: "#/components/schemas/DeskBookingsImportErrorInvalidContent"
    DeskBookingsImportErrorInvalidContent:
      type: object
      description: One or more rows have invalid values. Details are in `line_errors`.
      required:
      - error
      - line_errors
      properties:
        error:
          type: string
          enum:
          - invalid_content
        line_errors:
          type: array
          items:
            "$ref": "#/components/schemas/DeskBookingsImportLineError"
    DeskBookingsImportLineError:
      type: object
      required:
      - col
      - row
      - value
      - error
      properties:
        col:
          type: string
          enum:
          - sync_id
          - email
          description: Column name.
        row:
          type: integer
          description: 1-based row number, counting the header as row 1.
        value:
          type: string
          nullable: true
          description: Value found in the cell.
        error:
          type: string
          enum:
          - missing
          - duplicate
          - not_found_in_building
          - not_found_in_space
          description: "`missing`: the cell is empty. `duplicate`: the value was already
            used in a previous row. `not_found_in_building`: the desk `sync_id` does
            not match any desk in the building. `not_found_in_space`: the user `email`
            does not match any user in the space."
    DeskListWithSchedules:
      type: object
      required:
      - desks
      - schedule
      properties:
        desks:
          type: array
          items:
            "$ref": "#/components/schemas/DeskWithSchedule"
        schedule:
          type: object
          required:
          - start
          - end
          properties:
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
    DeskFeatureEmbedded:
      type: object
      required:
      - key
      - name
      description: 'Desk features are identified by their `key`.

        '
      properties:
        key:
          type: string
        name:
          type: string
    DeskWithSchedule:
      type: object
      required:
      - uuid
      - name
      - sync_id
      - coordinates
      - bookable
      - area
      - equipment
      - schedule
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
        sync_id:
          type: string
          nullable: true
        coordinates:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/Point"
        bookable:
          type: boolean
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
        equipment:
          type: array
          items:
            "$ref": "#/components/schemas/DeskFeatureEmbedded"
        schedule:
          type: array
          items:
            "$ref": "#/components/schemas/EmbeddedPresence"
    BasicFloorList:
      type: object
      required:
      - floors
      properties:
        floors:
          type: array
          items:
            "$ref": "#/components/schemas/BasicFloor"
    FloorEmbedded:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: integer
        name:
          type: string
    BasicFloor:
      type: object
      required:
      - id
      - name
      - number
      - flex_office
      - floorplan_url
      properties:
        id:
          type: integer
        name:
          type: string
        number:
          type: integer
        flex_office:
          type: boolean
        floorplan_url:
          type: string
          format: uri
          nullable: true
    MeetingRoomEmbedded:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: integer
        name:
          type: string
    MinimalistMeetingRoomList:
      type: object
      required:
      - meeting_rooms
      properties:
        meeting_rooms:
          type: array
          items:
            "$ref": "#/components/schemas/MeetingRoomEmbedded"
    Pagination:
      type: object
      required:
      - current
      - per_page
      - pages
      - count
      properties:
        current:
          type: integer
          minimum: 1
        previous:
          type: integer
          minimum: 1
        next:
          type: integer
          minimum: 2
        per_page:
          type: integer
          minimum: 1
        pages:
          type: integer
          minimum: 1
        count:
          type: integer
          minimum: 0
    PersonOrUserProfile:
      anyOf:
      - "$ref": "#/components/schemas/UserProfile"
      - "$ref": "#/components/schemas/PersonEmbedded"
    NullablePersonOrUserProfile:
      anyOf:
      - "$ref": "#/components/schemas/UserProfile"
      - "$ref": "#/components/schemas/PersonEmbedded"
      nullable: true
    PersonEmbedded:
      type: object
      required:
      - id
      - email
      - full_name
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        full_name:
          type: string
    PresenceRulesList:
      type: object
      required:
      - rules
      - pagination
      properties:
        rules:
          type: array
          items:
            "$ref": "#/components/schemas/PresenceRule"
        pagination:
          "$ref": "#/components/schemas/Pagination"
    CreatePresenceRuleForm:
      type: object
      required:
      - minimum_days_per_week
      - maximum_days_per_week
      - maximum_days_per_week_hard_limit
      - application_period
      - locations
      - targets
      properties:
        minimum_days_per_week:
          type: integer
        maximum_days_per_week:
          type: integer
        maximum_days_per_week_hard_limit:
          type: boolean
        application_period:
          "$ref": "#/components/schemas/PresenceRuleApplicationPeriod"
        locations:
          type: object
          properties:
            recommended_location_building_ids:
              type: array
              items:
                type: integer
            recommended_location_floor_ids:
              type: array
              items:
                type: integer
            recommended_location_area_ids:
              type: array
              items:
                type: integer
            blocked_location_building_ids:
              type: array
              items:
                type: integer
            blocked_location_floor_ids:
              type: array
              items:
                type: integer
            blocked_location_area_ids:
              type: array
              items:
                type: integer
            enforced_location_building_ids:
              type: array
              items:
                type: integer
            enforced_location_floor_ids:
              type: array
              items:
                type: integer
            enforced_location_area_ids:
              type: array
              items:
                type: integer
            exclusive_location_building_ids:
              type: array
              items:
                type: integer
            exclusive_location_floor_ids:
              type: array
              items:
                type: integer
            exclusive_location_area_ids:
              type: array
              items:
                type: integer
        targets:
          oneOf:
          - type: object
            required:
            - type
            - group_ids
            properties:
              type:
                type: string
                enum:
                - groups
              group_ids:
                type: array
                items:
                  type: integer
          - type: object
            required:
            - type
            properties:
              type:
                type: string
                enum:
                - everyone
    UpdatePresenceRuleForm:
      type: object
      required: []
      properties:
        minimum_days_per_week:
          type: integer
        maximum_days_per_week:
          type: integer
        maximum_days_per_week_hard_limit:
          type: boolean
        application_period:
          "$ref": "#/components/schemas/PresenceRuleApplicationPeriod"
        locations:
          type: object
          properties:
            recommended_location_building_ids:
              type: array
              items:
                type: integer
            recommended_location_floor_ids:
              type: array
              items:
                type: integer
            recommended_location_area_ids:
              type: array
              items:
                type: integer
            blocked_location_building_ids:
              type: array
              items:
                type: integer
            blocked_location_floor_ids:
              type: array
              items:
                type: integer
            blocked_location_area_ids:
              type: array
              items:
                type: integer
            enforced_location_building_ids:
              type: array
              items:
                type: integer
            enforced_location_floor_ids:
              type: array
              items:
                type: integer
            enforced_location_area_ids:
              type: array
              items:
                type: integer
            exclusive_location_building_ids:
              type: array
              items:
                type: integer
            exclusive_location_floor_ids:
              type: array
              items:
                type: integer
            exclusive_location_area_ids:
              type: array
              items:
                type: integer
        targets:
          oneOf:
          - type: object
            required:
            - type
            - group_ids
            properties:
              type:
                type: string
                enum:
                - groups
              group_ids:
                type: array
                items:
                  type: integer
          - type: object
            required:
            - type
            properties:
              type:
                type: string
                enum:
                - everyone
    PresenceRuleTargetGroups:
      type: object
      required:
      - type
      - groups
      properties:
        type:
          type: string
          enum:
          - groups
        groups:
          type: array
          items:
            "$ref": "#/components/schemas/UserGroupEmbedded"
    PresenceRuleTargetEveryone:
      type: object
      required:
      - type
      properties:
        type:
          type: string
          enum:
          - everyone
    PresenceRuleApplicationPeriod:
      oneOf:
      - "$ref": "#/components/schemas/PresenceRuleApplicationPeriodAllTime"
      - "$ref": "#/components/schemas/PresenceRuleApplicationPeriodRecurring"
      - "$ref": "#/components/schemas/PresenceRuleApplicationPeriodBounded"
      - "$ref": "#/components/schemas/PresenceRuleApplicationPeriodMultipleDates"
      discriminator:
        propertyName: type
        mapping:
          all_time: "#/components/schemas/PresenceRuleApplicationPeriodAllTime"
          recurring: "#/components/schemas/PresenceRuleApplicationPeriodRecurring"
          bounded: "#/components/schemas/PresenceRuleApplicationPeriodBounded"
          multiple_dates: "#/components/schemas/PresenceRuleApplicationPeriodMultipleDates"
    PresenceRuleApplicationPeriodAllTime:
      type: object
      required:
      - type
      - start
      properties:
        type:
          type: string
          enum:
          - all_time
        start:
          type: string
          format: date-time
    PresenceRuleApplicationPeriodRecurring:
      type: object
      required:
      - type
      - start
      - recurrence
      properties:
        type:
          type: string
          enum:
          - recurring
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        recurrence:
          type: string
    PresenceRuleApplicationPeriodBounded:
      type: object
      required:
      - type
      - start
      - end
      properties:
        type:
          type: string
          enum:
          - bounded
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
    PresenceRuleApplicationPeriodMultipleDates:
      type: object
      required:
      - type
      - dates
      properties:
        type:
          type: string
          enum:
          - multiple_dates
        dates:
          type: array
          items:
            type: string
            format: date
    PresenceRule:
      type: object
      required:
      - id
      - minimum_days_per_week
      - maximum_days_per_week
      - maximum_days_per_week_hard_limit
      - application_period
      - locations
      - targets
      properties:
        id:
          type: integer
        minimum_days_per_week:
          type: integer
        maximum_days_per_week:
          type: integer
        maximum_days_per_week_hard_limit:
          type: boolean
        application_period:
          "$ref": "#/components/schemas/PresenceRuleApplicationPeriod"
        locations:
          type: object
          required:
          - recommended_buildings
          - recommended_floors
          - recommended_areas
          - blocked_buildings
          - blocked_floors
          - blocked_areas
          - enforced_buildings
          - enforced_floors
          - enforced_areas
          - exclusive_buildings
          - exclusive_floors
          - exclusive_areas
          properties:
            recommended_buildings:
              type: array
              items:
                "$ref": "#/components/schemas/BuildingEmbedded"
            recommended_floors:
              type: array
              items:
                "$ref": "#/components/schemas/FloorEmbedded"
            recommended_areas:
              type: array
              items:
                "$ref": "#/components/schemas/AreaEmbedded"
            blocked_buildings:
              type: array
              items:
                "$ref": "#/components/schemas/BuildingEmbedded"
            blocked_floors:
              type: array
              items:
                "$ref": "#/components/schemas/FloorEmbedded"
            blocked_areas:
              type: array
              items:
                "$ref": "#/components/schemas/AreaEmbedded"
            enforced_buildings:
              type: array
              items:
                "$ref": "#/components/schemas/BuildingEmbedded"
            enforced_floors:
              type: array
              items:
                "$ref": "#/components/schemas/FloorEmbedded"
            enforced_areas:
              type: array
              items:
                "$ref": "#/components/schemas/AreaEmbedded"
            exclusive_buildings:
              type: array
              items:
                "$ref": "#/components/schemas/BuildingEmbedded"
            exclusive_floors:
              type: array
              items:
                "$ref": "#/components/schemas/FloorEmbedded"
            exclusive_areas:
              type: array
              items:
                "$ref": "#/components/schemas/AreaEmbedded"
        targets:
          description: The groups or space to which this presence rule applies. If
            `everyone` is true, the rule applies to all users in the space, including
            those not in any group, regardless of the contents of `groups`
          oneOf:
          - "$ref": "#/components/schemas/PresenceRuleTargetGroups"
          - "$ref": "#/components/schemas/PresenceRuleTargetEveryone"
          discriminator:
            propertyName: type
            mapping:
              groups: "#/components/schemas/PresenceRuleTargetGroups"
              everyone: "#/components/schemas/PresenceRuleTargetEveryone"
    PresenceState:
      type: string
      enum:
      - booked
      - confirmed
      - ongoing
      - finished
      - canceled
      - autoreleased
    EmbeddedPresence:
      type: object
      required:
      - uuid
      - state
      - start
      - end
      - is_private
      - person
      properties:
        uuid:
          type: string
          format: uuid
        state:
          "$ref": "#/components/schemas/PresenceState"
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        is_private:
          type: boolean
          default: false
        person:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/UserProfile"
    Problem:
      type: object
      required:
      - type
      - severity
      properties:
        type:
          type: string
          format: uri
          description: |
            An URI without locator but with full path starting with "/problems/", for
            example "/problems/grant/readonly".

            This URI should identify the type of the problem, and it should resolve to a
            human readable text document that can give more information about the error, as
            well as provide hints on how to solve this error.
        severity:
          type: string
          enum:
          - error
          - warning
          - info
        category:
          type: string
        title:
          type: string
          description: |
            A human-readable, short description of the issue.

            It should not change from one instance of the issue to another.
        details:
          type: string
          description: 'A human-readable explanation specific to this occurrence of
            the problem.

            '
      additionalProperties: {}
    PaginatedRecurringAppointmentOccurrences:
      type: object
      required:
      - occurrences
      - pagination
      properties:
        occurrences:
          type: array
          items:
            "$ref": "#/components/schemas/MeetingRoomAppointment"
        pagination:
          "$ref": "#/components/schemas/Pagination"
    RecurringAppointmentDetails:
      type: object
      required:
      - id
      - topic
      - start
      - released_at
      - attendees
      - occurrences
      properties:
        id:
          type: integer
        topic:
          type: string
        start:
          type: string
          format: date-time
          nullable: true
        released_at:
          type: string
          format: date-time
          nullable: true
        attendees:
          type: array
          items:
            "$ref": "#/components/schemas/PersonOrUserProfile"
          description: 'Attendees to the first occurrence

            '
        occurrences:
          type: object
          required:
          - release_counter
          - release_counter_limit
          - auto_released_count
          - released_count
          - proactively_released_count
          - canceled_count
          - before
          properties:
            release_counter:
              description: |
                Number of occurrences that have been released or auto-released.

                This number can be reset, but once it reaches the limit, then the whole
                recurring appointment will be released and future occurrences will be
                proactively released.
              type: integer
              minimum: 0
            release_counter_limit:
              description: |
                Once the `release_counter` reaches this number, the recurring appointment
                will get released.

                This can be configured in the meeting rooms release policies.
              type: integer
              minimum: 0
            total_release_counter:
              description: |
                Total number of occurrences that have been released or auto-released.

                This is for information purpose only and cannot be reset.

                TODO: This might be removed because we can just count the occurrences...
              type: integer
              minimum: 0
            auto_released_count:
              description: 'The actual number of occurrences that have been auto released

                '
              type: integer
              minimum: 0
            released_count:
              description: 'The actual number of occurrences that have been manually
                released

                '
              type: integer
              minimum: 0
            proactively_released_count:
              description: 'The actual number of occurrences that have been proactively
                released

                '
              type: integer
              minimum: 0
            canceled_count:
              description: 'The actual number of occurrences that have been canceled

                '
              type: integer
              minimum: 0
            before:
              description: 'Count the number of occurrences that started before the
                indicated time.

                '
              type: object
              required:
              - time
              - count
              properties:
                time:
                  type: string
                  format: date-time
                count:
                  type: integer
                  minimum: 0
    BareboneBooking:
      type: object
      required:
      - start
      - end
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
    BareboneSchedule:
      type: array
      items:
        "$ref": "#/components/schemas/BareboneBooking"
    SpaceSubscription:
      type: object
      required:
      - space
      - user
      properties:
        space:
          "$ref": "#/components/schemas/SpaceEmbedded"
        user:
          "$ref": "#/components/schemas/UserProfile"
    SpaceEmbedded:
      type: object
      required:
      - uuid
      - subdomain
      - name
      properties:
        uuid:
          type: string
          format: uuid
        subdomain:
          type: string
        name:
          type: string
    UserGroupEmbedded:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: integer
        name:
          type: string
    ListedUser:
      type: object
      required:
      - id
      - email
      - first_name
      - last_name
      - full_name
      - phone
      - timezone
      - locale
      - favorite_location
      - avatar
      - roles
      - chat_agent_enabled
      - confirmed_at
      - discarded_at
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        first_name:
          type: string
        last_name:
          type: string
          nullable: true
        full_name:
          type: string
        phone:
          type: string
          nullable: true
        timezone:
          type: string
        locale:
          type: string
        chat_agent_enabled:
          type: boolean
        confirmed_at:
          type: string
          format: date-time
          nullable: true
        discarded_at:
          type: string
          format: date-time
          nullable: true
        avatar:
          type: string
          format: uri
          nullable: true
        favorite_location:
          "$ref": "#/components/schemas/UserFavoriteLocation"
        roles:
          type: object
          required:
          - intrinsic
          - inherited
          properties:
            intrinsic:
              type: array
              items:
                "$ref": "#/components/schemas/Role"
            inherited:
              type: array
              items:
                "$ref": "#/components/schemas/Role"
    UserProfile:
      type: object
      required:
      - id
      - email
      - full_name
      - first_name
      - last_name
      - avatar
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        full_name:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        avatar:
          type: string
          format: uri
          nullable: true
    UserEmbedded:
      type: object
      required:
      - id
      - email
      - full_name
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        full_name:
          type: string
    UserFavoriteLocation:
      type: object
      required:
      - building
      - floor
      - area
      properties:
        building:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/BuildingEmbedded"
        floor:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/FloorEmbedded"
        area:
          nullable: true
          allOf:
          - "$ref": "#/components/schemas/AreaEmbedded"
    Role:
      type: string
      enum:
      - admin
      - analytics_observer
      - announcer
      - building_admin
      - building_reader
      - desk
      - desk_booker
      - host
      - manager
      - meeting_room_admin
      - meeting_room_booker
      - meeting_room_reader
      - owner
      - service_admin
      - space_admin
      - space_owner
      - user
      - user_admin
      - visitor_admin
      - visitor_reader
    PaginatedUserList:
      type: object
      required:
      - users
      - pagination
      properties:
        users:
          type: array
          items:
            "$ref": "#/components/schemas/ListedUser"
        pagination:
          "$ref": "#/components/schemas/Pagination"
    PaginatedUserProfiles:
      type: object
      required:
      - users
      - pagination
      properties:
        users:
          type: array
          items:
            "$ref": "#/components/schemas/UserProfile"
        pagination:
          "$ref": "#/components/schemas/Pagination"
    VisitPreRegistrationForm:
      type: object
      required:
      - guests
      - visit
      properties:
        guests:
          type: array
          items:
            type: object
            required:
            - email
            - first_name
            properties:
              email:
                type: string
                format: email
              first_name:
                type: string
              last_name:
                type: string
              phone:
                type: string
              company:
                type: string
        visit:
          type: object
          required:
          - from
          - to
          properties:
            from:
              type: string
              format: date_time
            to:
              type: string
              format: date_time
            topic:
              type: string
              maxLength: 255
        send_email_instructions:
          type: boolean
    Visit:
      type: object
      required:
      - id
      - start_datetime
      - end_datetime
      - state
      - kiosk_id
      - space_id
      - visitor
      properties:
        id:
          type: integer
        start_datetime:
          type: string
          format: date_time
        end_datetime:
          type: string
          format: date_time
        state:
          type: string
        kiosk_id:
          type: integer
        space_id:
          type: integer
        visitor:
          type: object
          required:
          - email
          - first_name
          properties:
            email:
              type: string
              format: email
            first_name:
              type: string
            last_name:
              type: string
            company:
              type: string
            phone:
              type: string
  parameters:
    PageParam:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
      description: Indicate the page requested in a paginated list
      required: false
    PerPageParam:
      name: per_page
      in: query
      schema:
        type: integer
        minimum: 1
      description: Indicate the requested number of items per page in a paginated
        list
      required: false
    SortOrder:
      name: sort_order
      in: query
      schema:
        type: string
        enum:
        - asc
        - desc
      description: |
        Indicate the sorting order, either asc(ending) or desc(ending)

        Defaults to ascending order
      required: false
tags:
- name: Experimental
  description: Those endpoints are experimental and are subject to breaking changes
paths:
  "/api/v2/spaces/{space_id}/appointments/find_by_guest_email":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    get:
      summary: Find appointment by guest email
      parameters:
      - name: email
        in: query
        required: true
        description: Guest email
        schema:
          type: string
      - name: onlytoday
        in: query
        required: false
        description: Only  search appointments starting today
        schema:
          type: boolean
      - name: timezone
        in: query
        schema:
          type: string
          default: UTC
        required: false
        description: Resolve what "today" means using this time zone
      tags:
      - Appointments
      - Guests
      security:
      - comeenOauth:
        - appointments:read
      description: |
        Find an appointment by guest email and return the associated data.

        If no guest is found with the provided email, a 404 response is provided.

        ### Who can access this endpoint?
        Admin, User, Application
      responses:
        '404':
          description: not found
        '200':
          description: successful
          content:
            application/json:
              example:
                guest:
                  id: 493
                  full_name: Leola Farrell
                  first_name: Leola
                  last_name: Farrell
                  email: guest@example.org
                  avatar:
                appointment:
                  id: 96
                  topic: innovate ubiquitous content
                  start: '2026-06-22T09:29:12.000Z'
                  end: '2026-06-22T10:29:12.000Z'
                  organizer:
                    id: 494
                    full_name: Darnell Lebsack
                    first_name: Darnell
                    last_name: Lebsack
                    email: lebsack_darnell@example.org
                    avatar:
              schema:
                description: The relevant data is present in the `guest` and `appointment`
                  keys.
                type: object
                required:
                - guest
                - appointment
                properties:
                  guest:
                    "$ref": "#/components/schemas/UserProfile"
                  appointment:
                    "$ref": "#/components/schemas/AppointmentEmbedded"
  "/api/v2/spaces/{space_id}/bookable_resources/types/{type_id}/bookings":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: type_id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: List all bookings of a bookable resources type
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        List all bookings of a bookable resources type matching all the filters passed.

        The response is paginated with a default of 50 items per page.

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        The `sort_order` and `sort_by` parameter control the sort order.
        The default sort order is not yet specified.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      parameters:
      - name: start
        in: query
        schema:
          type: string
          format: date-time
        description: |
          Start of the period to get bookings for, in RFC 3339 format.

          Defaults to the beginning of the current UTC day.
        required: false
      - name: end
        in: query
        schema:
          type: string
          format: date-time
        description: |
          End of the period to get bookings for, in RFC 3339 format.

          Defaults to the end of the day identified by `start`.
        required: false
      - name: organizer_id
        in: query
        schema:
          type: integer
          nullable: true
        description: Only list bookings with this organizer_id
        required: false
      - name: item_building_id
        in: query
        schema:
          type: integer
          nullable: true
        description: Only list bookings of items linked to this building id
        required: false
      - name: item_floor_id
        in: query
        schema:
          type: integer
          nullable: true
        description: |
          Only list bookings of items linked to this floor id.

          Requires `item_building_id`.

          Providing a building id that does not match the floor's building is invalid.
        required: false
      - name: item_area_id
        in: query
        schema:
          type: integer
          nullable: true
        description: |
          Only list bookings of items linked to this area id.

          Requires `item_floor_id`.

          Providing a floor id that does not match the area's floor is invalid.
        required: false
      - name: item_name
        in: query
        schema:
          type: integer
          nullable: true
        description: Only list bookings of items with the given value in their name
        required: false
      - name: list_all_bookings
        in: query
        schema:
          type: boolean
        required: false
        description: |
          List all bookings, including inactive ones.

          By default the endpoint only lists active bookings.
      - name: sort_by
        in: query
        schema:
          "$ref": "#/components/schemas/BookableResourcesBookingSortBy"
        description: |
          Sort by the given key

          Use the `sort_order` parameter to configure the sort order.
        required: false
      - "$ref": "#/components/parameters/SortOrder"
      - "$ref": "#/components/parameters/PageParam"
      - "$ref": "#/components/parameters/PerPageParam"
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                bookings: []
                sort:
                filter:
                  start: '2026-06-22T00:00:00Z'
                  end: '2026-06-22T23:59:59Z'
                  list_all_bookings: false
                pagination:
                  current: 1
                  per_page: 50
                  pages: 1
                  count: 0
              schema:
                "$ref": "#/components/schemas/PaginatedBookableResourcesTypeBookings"
  "/api/v2/spaces/{space_id}/bookable_resources/bookings/{id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Booking id
      required: true
    get:
      summary: Get a bookable resources booking details
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        Get the details of a specific booking.

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                id: 4
                active: false
                state: booked
                start: '2026-06-28T12:08:44Z'
                end: '2026-06-28T12:38:44Z'
                original_start: '2026-06-28T12:08:44Z'
                original_end: '2026-06-28T12:38:44Z'
                provider_id: f2b140b6-7bc9-4d29-8f9a-c6fabcc66718
                item:
                  id: 4
                  created_at: '2026-06-22T09:29:13.217Z'
                  updated_at: '2026-06-22T09:29:13.217Z'
                  name: Mayer, Kohler and Upton
                  sync_id: 6fcab1a2-7a0b-4204-94af-83a4d292ca99
                  bookable: true
                  position:
                  building:
                    id: 234
                    name: Eagle Pointe
                  floor:
                  area:
                  type:
                    id: 2
                    created_at: '2026-06-22T09:29:13.182Z'
                    updated_at: '2026-06-22T09:29:13.182Z'
                    name: Kovacek-Reichel
                    description: Quaerat non magnam qui.
                    bookable: true
                    booking_length_step_unit: minutes
                    booking_length_step: 1
                    display:
                      type: marker
                      shape: round
                      icon:
                      color: e3dde3
                      size: small
                organizer:
                creator:
              schema:
                "$ref": "#/components/schemas/BookableResourcesBookingDetails"
  "/api/v2/spaces/{space_id}/users/{user_id}/bookable_resources/bookings":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: user_id
      in: path
      schema:
        type: integer
      description: User id
      required: true
    get:
      summary: List bookable resources bookings for a User
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      parameters:
      - name: start
        in: query
        schema:
          type: string
          format: date-time
        description: |
          Start of the period to get bookings for, in RFC 3339 format.
          Defaults to the beginning of the current day in the user's time zone.
        required: false
      - name: end
        in: query
        schema:
          type: string
          format: date-time
        description: |
          End of the period to get bookings for, in RFC 3339 format.
          Defaults to the end of the current day in the user's time zone.
        required: false
      description: |
        List the bookings made by the provided user.

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                bookings:
                - id: 5
                  start: '2026-06-22T01:00:00Z'
                  end: '2026-06-22T02:00:00Z'
                  item:
                    id: 5
                    created_at: '2026-06-22T09:29:13.316Z'
                    updated_at: '2026-06-22T09:29:13.316Z'
                    name: Erdman Group
                    sync_id: 0a1aa14f-4977-4ee1-9e45-9998cc9706bd
                    bookable: true
                    position:
                    building:
                      id: 235
                      name: Royal Court
                    floor:
                      id: 112
                      name: Food & Beverage
                    area:
                    type:
                      id: 3
                      created_at: '2026-06-22T09:29:13.302Z'
                      updated_at: '2026-06-22T09:29:13.302Z'
                      name: Volkman Inc
                      description: Reprehenderit nisi totam fugiat.
                      bookable: false
                      booking_length_step_unit: minutes
                      booking_length_step: 1
                      display:
                        type: marker
                        shape: round
                        icon: eagerness
                        color: dc5b5b
                        size: small
                - id: 6
                  start: '2026-06-22T01:00:00Z'
                  end: '2026-06-22T02:00:00Z'
                  item:
                    id: 6
                    created_at: '2026-06-22T09:29:13.367Z'
                    updated_at: '2026-06-22T09:29:13.367Z'
                    name: Rau, Mann and Dickinson
                    sync_id: ba69d250-3b7b-4b4e-864c-e5d83ccb2663
                    bookable: true
                    position:
                    building:
                    floor:
                    area:
                    type:
                      id: 4
                      created_at: '2026-06-22T09:29:13.333Z'
                      updated_at: '2026-06-22T09:29:13.333Z'
                      name: Lynch Inc
                      description: Tempora possimus totam at.
                      bookable: false
                      booking_length_step_unit: minutes
                      booking_length_step: 1
                      display:
                        type: area
                        icon:
                        color: c86a6a
                - id: 7
                  start: '2026-06-22T01:00:00Z'
                  end: '2026-06-22T02:00:00Z'
                  item:
                    id: 7
                    created_at: '2026-06-22T09:29:13.402Z'
                    updated_at: '2026-06-22T09:29:13.402Z'
                    name: Brown LLC
                    sync_id: fa8e925f-9370-4c2d-8972-c33eb9300a95
                    bookable: true
                    position:
                      type: shape
                      center:
                        x: 50
                        "y": 50
                      shape:
                      - x: 0
                        "y": 0
                      - x: 0
                        "y": 100
                      - x: 100
                        "y": 100
                      - x: 100
                        "y": 0
                    building:
                      id: 236
                      name: Pine Square
                    floor:
                      id: 113
                      name: Oil & Gas
                    area:
                    type:
                      id: 5
                      created_at: '2026-06-22T09:29:13.380Z'
                      updated_at: '2026-06-22T09:29:13.380Z'
                      name: Bechtelar LLC
                      description: Sint qui voluptatem doloremque.
                      bookable: true
                      booking_length_step_unit: minutes
                      booking_length_step: 1
                      display:
                        type: area
                        icon:
                        color: d42121
              schema:
                "$ref": "#/components/schemas/BookableResourcesUserBookingList"
  "/api/v2/spaces/{space_id}/bookable_resources/bookings/{id}/cancel":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Booking id
      required: true
    post:
      summary: Cancel a bookable resource booking
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      description: |
        Cancel a boooking

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '204':
          description: successful
          content:
            application/json:
              example: ''
  "/api/v2/spaces/{space_id}/bookable_resources/types/{type_id}/import":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: type_id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: Redirect to the last ongoing import
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      description: |
        Redirect to the last ongoing import, if any

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '302':
          description: redirect to import
        '404':
          description: no existing import
    post:
      summary: Import bookable resources items from a CSV
      description: |
        Import items using a CSV file. The file is processed and the import result is
        calculated without being actually persisted.

        The import will need to be accepted to proceed.

        Creating an import erases a previously existing import.

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              example:
                import_id: 2
                items: []
              schema:
                "$ref": "#/components/schemas/BookableResourcesImportedItemList"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: string
              format: binary
        required: true
        description: |
          CSV file, encoded in UTF-8, using a comma separator.
          Columns should correspond to:
          - name
          - sync_id: user-provided ID to re-synchronise an item
          - bookable: TRUE or FALSE
          - building: name or empty
          - floor: name or empty
          - area: name or empty
          - assigned: user email or empty
  "/api/v2/spaces/{space_id}/bookable_resources/imports/example.csv":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    get:
      summary: Provide an example CSV file
      tags:
      - Bookable resources
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        Provide an example CSV file that can be used to import items.

        ### Who can access this endpoint?
        User, Application, Admin, ... everyone
      responses:
        '200':
          description: success
          content:
            text/csv:
              example: |
                name,sync_id,bookable,building,floor,area,assigned user
                Desk 01,desk_01,true,Bordeaux,2,Flex office,
                Desk 02,desk_02,false,Bordeaux,2,Flex office,
                Desk 03,desk_03,false,,,,john@example.org
  "/api/v2/spaces/{space_id}/bookable_resources/imports/{import_id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: import_id
      in: path
      schema:
        type: integer
      description: Bookable resources import id
      required: true
    get:
      summary: Show the changes the import would bring
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      description: |
        Show the changes the import would bring

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: success
          content:
            application/json:
              example:
                import_id: 3
                items:
                - state: error
                  name: Gleason Inc
                  sync_id: '0282c93f-6ac9-4a1a-9581-c1814b66275b'
                  bookable: false
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: unchanged
                  name: Swift, Rau and Stamm
                  sync_id: 454f267a-2bf1-4124-af74-a40a46fc572f
                  bookable: true
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: added
                  name: Heaney Group
                  sync_id: 4fa07b41-3e89-410a-bbfc-37b72b4241c3
                  bookable: true
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: error
                  name: Wolff, Swift and Wiegand
                  sync_id: 60d8257b-2f63-4e92-9fac-66da1cbcc20b
                  bookable: true
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: error
                  name: Hoeger-Leannon
                  sync_id: 6729c3df-772c-44cb-8c99-3bfb1a701b8b
                  bookable: false
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: updated
                  name: Renner, VonRueden and Howell
                  sync_id: 6c2e5f2b-b621-4003-84fd-a4788820a4a0
                  bookable: true
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: deleted
                  name: Green Group
                  sync_id: 9a700b45-e045-4aa5-8b37-2945282480fc
                  bookable: true
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: error
                  name: Casper Inc
                  sync_id: b2ec9b78-e3ca-4b94-a081-d07d2f2167f0
                  bookable: false
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: added
                  name: Spencer, Beahan and Feil
                  sync_id: fb7133dd-bc5f-4255-9f57-c1f9939da5a8
                  bookable: false
                  building:
                  floor:
                  area:
                  assigned_user:
                - state: updated
                  name: Nienow, Cassin and Roberts
                  sync_id: fdbb7e2a-155d-40f5-b6f6-77251d4ef686
                  bookable: true
                  building:
                  floor:
                  area:
                  assigned_user:
              schema:
                "$ref": "#/components/schemas/BookableResourcesImportedItemList"
  "/api/v2/spaces/{space_id}/bookable_resources/imports/{import_id}/accept":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: import_id
      in: path
      schema:
        type: integer
      description: Bookable resources import id
      required: true
    post:
      summary: Accept an import
      description: |
        Accept an import and bring the changes to the type's items.

        The imported item are processed, then the import is deleted.

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      responses:
        '200':
          description: success
          content:
            application/json:
              example:
                id: 12
                created_at: '2026-06-22T09:29:14.707Z'
                updated_at: '2026-06-22T09:29:14.707Z'
                name: Cronin, Rau and Russel
                description: Officiis minima molestiae laboriosam.
                bookable: false
                booking_length_step_unit: minutes
                booking_length_step: 1
                display:
                  type: marker
                  shape: round
                  icon:
                  color: '020227'
                  size: small
                items: []
                import:
                  success_count: 0
                  failure_count: 7
              schema:
                "$ref": "#/components/schemas/BookableResourcesImportOutcome"
  "/api/v2/spaces/{space_id}/bookable_resources/types/{type_id}/items.csv":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: type_id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: List items from a bookable resources type
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      parameters:
      - "$ref": "#/components/parameters/PageParam"
      - "$ref": "#/components/parameters/PerPageParam"
      description: |
        List items from a bookable resources type as a CSV export.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375

        ### Who can access this endpoint?
        User, Application, Admin

        ### How is the data sorted?
        The items are sorted by `created_at`, ascending.


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: success
          headers:
            Pagination-Count:
              description: Total number of items
              schema:
                type: integer
            Pagination-Page:
              description: Current page
              schema:
                type: integer
            Pagination-PerPage:
              description: Number of items per page
              schema:
                type: integer
          content:
            text/csv:
              example: |
                name,sync_id,bookable,building,floor,area,assigned user
                Graham LLC,fea1ae63-1cbf-4788-bf39-97ad23cfb18e,false,Willow Oaks,,,watsica_nevada@example.org
                D'Amore-Harris,fc7f6d65-895f-4997-8306-dcc88077b6b3,false,Autumn Pointe,Travel & Leisure,Retail,cruz.johnston@example.org
                Olson and Sons,6fef0e5c-d289-48a8-a29a-1e73a9913e7f,true,Pine Gardens,Media,Legal,
  "/api/v2/spaces/{space_id}/bookable_resources/types/{type_id}/items":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: type_id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: List items from a bookable resources type
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      parameters:
      - "$ref": "#/components/parameters/PageParam"
      - "$ref": "#/components/parameters/PerPageParam"
      description: |
        List items from a bookable resources type.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375

        ### Who can access this endpoint?
        User, Application, Admin

        ### How is the data sorted?
        The items are sorted by `created_at`, ascending.


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: success
          content:
            application/json:
              example:
                items:
                - id: 13
                  created_at: '2026-06-22T09:29:15.094Z'
                  updated_at: '2026-06-22T09:29:15.094Z'
                  name: Corkery and Sons
                  sync_id: 5d7865c3-c1d9-4ef1-992f-85d0557e8578
                  bookable: true
                  position:
                    type: point
                    x: 50
                    "y": 50
                  building:
                    id: 240
                    name: Park Acres
                  floor:
                  area:
                  assigned_user:
                    id: 519
                    full_name: Gabriele Turner
                    first_name: Gabriele
                    last_name: Turner
                    email: turner.gabriele@example.org
                    avatar:
                - id: 14
                  created_at: '2026-06-22T09:29:15.102Z'
                  updated_at: '2026-06-22T09:29:15.102Z'
                  name: Schulist, Fahey and Grant
                  sync_id: 4f6aaf01-614f-4afd-ba9b-9168f81eeb6a
                  bookable: true
                  position:
                  building:
                    id: 241
                    name: Park Square
                  floor:
                  area:
                  assigned_user:
                - id: 15
                  created_at: '2026-06-22T09:29:15.117Z'
                  updated_at: '2026-06-22T09:29:15.117Z'
                  name: Feeney, Gerlach and Turcotte
                  sync_id: 1e221055-a6e9-4a3c-ad53-fffb2dc915b5
                  bookable: false
                  position:
                    type: point
                    x: 50
                    "y": 50
                  building:
                    id: 242
                    name: Summer Acres
                  floor:
                    id: 116
                    name: Basic Resources
                  area:
                  assigned_user:
                pagination:
                  current: 1
                  per_page: 50
                  pages: 1
                  count: 3
              schema:
                "$ref": "#/components/schemas/PaginatedBookableResourcesItemList"
    post:
      summary: Create a bookable resources item
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      description: |
        Create a bookable resources item.

        ### What is the estimated release date of this endpoint?
        2026-07-22

        ### Who can access this endpoint?
        User, Application, Admin


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '201':
          description: created
          content:
            application/json:
              example:
                id: 16
                created_at: '2026-06-22T09:29:15.369Z'
                updated_at: '2026-06-22T09:29:15.369Z'
                name: Rogahn-Klocko
                sync_id: 6cd403af-7807-4031-abf5-effaf7b7ee2f
                bookable: true
                position:
                building:
                floor:
                area:
                assigned_user:
                  id: 521
                  full_name: Lanny Balistreri
                  first_name: Lanny
                  last_name: Balistreri
                  email: balistreri.lanny@example.org
                  avatar:
                type:
                  id: 15
                  created_at: '2026-06-22T09:29:15.280Z'
                  updated_at: '2026-06-22T09:29:15.280Z'
                  name: Schiller, Waelchi and Hermiston
                  description: Nobis sunt fugiat necessitatibus.
                  bookable: true
                  booking_length_step_unit: minutes
                  booking_length_step: 1
                  display:
                    type: area
                    icon: unhappiness
                    color: d3d303
              schema:
                "$ref": "#/components/schemas/BookableResourcesStandaloneItem"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesItemCreateForm"
        required: true
  "/api/v2/spaces/{space_id}/bookable_resources/items/{id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Bookable resources item id
      required: true
    get:
      summary: Show bookable resources item details
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        Show details about a bookable resources item.

        ### What is the estimated release date of this endpoint?
        2026-07-22

        ### Who can access this endpoint?
        User, Application, Admin


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: success
          content:
            application/json:
              example:
                id: 17
                created_at: '2026-06-22T09:29:15.518Z'
                updated_at: '2026-06-22T09:29:15.518Z'
                name: Beier-Weber
                sync_id: c0b20de5-0f30-47bf-8e90-538eb2557437
                bookable: true
                position:
                  type: shape
                  center:
                    x: 50
                    "y": 50
                  shape:
                  - x: 0
                    "y": 0
                  - x: 0
                    "y": 100
                  - x: 100
                    "y": 100
                  - x: 100
                    "y": 0
                building:
                floor:
                area:
                assigned_user:
                type:
                  id: 16
                  created_at: '2026-06-22T09:29:15.511Z'
                  updated_at: '2026-06-22T09:29:15.511Z'
                  name: Lakin-Heller
                  description: Est adipisci sit labore.
                  bookable: true
                  booking_length_step_unit: minutes
                  booking_length_step: 1
                  display:
                    type: area
                    icon: torment
                    color: '473333'
              schema:
                "$ref": "#/components/schemas/BookableResourcesStandaloneItem"
    put:
      summary: Update the bookable resources item
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      description: |
        Update a bookable resources item.

        ### What is the estimated release date of this endpoint?
        2026-07-22

        ### Who can access this endpoint?
        User, Application, Admin


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '204':
          description: updated
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesItemUpdateForm"
        required: true
    patch:
      summary: Update the bookable resources item
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      description: |
        Update a bookable resources item.

        ### What is the estimated release date of this endpoint?
        2026-07-22

        ### Who can access this endpoint?
        User, Application, Admin


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '204':
          description: updated
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesItemUpdateForm"
        required: true
    delete:
      summary: Delete the bookable resources item
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      description: |
        Delete a bookable resources item and all its bookings.

        ### What is the estimated release date of this endpoint?
        2026-07-22

        ### Who can access this endpoint?
        User, Application, Admin


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '204':
          description: deleted
  "/api/v2/spaces/{space_id}/bookable_resources/items/{id}/book":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Bookable resources item id
      required: true
    post:
      summary: Create a booking
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      parameters: []
      description: |
        Book a specific item.

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '201':
          description: created
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesBookingCreateForm"
        required: true
  "/api/v2/spaces/{space_id}/buildings/{building_id}/floors/{floor_id}/bookable_resources/types/{type_id}/items":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    - name: floor_id
      in: path
      schema:
        type: integer
      description: Floor id
      required: true
    - name: type_id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: List items of a given type associated with a given building and floor
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        List items of a given type associated with a given building and floor.

        Provide a non-paginated list of items located on a floor, with their position if
        the items are already placed.

        ### Who can access this endpoint?
        Admin, Application, User

        ### How is the data sorted?
        The items are sorted by creation date.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                items:
                - id: 23
                  created_at: '2026-06-22T09:29:16.679Z'
                  updated_at: '2026-06-22T09:29:16.679Z'
                  name: Larson Group
                  sync_id: 8aef31a2-a9f7-4f65-9ec9-09aa4b6c0431
                  bookable: false
                  position:
                  area:
                - id: 24
                  created_at: '2026-06-22T09:29:16.707Z'
                  updated_at: '2026-06-22T09:29:16.707Z'
                  name: Beier and Sons
                  sync_id: 49983ebb-2b0f-4f48-bce4-1527c12e7696
                  bookable: true
                  position:
                  area:
                - id: 25
                  created_at: '2026-06-22T09:29:16.712Z'
                  updated_at: '2026-06-22T09:29:16.712Z'
                  name: Vandervort and Sons
                  sync_id: be202f20-d073-4cdf-ae33-bcc2f9022b5c
                  bookable: false
                  position:
                  area:
              schema:
                "$ref": "#/components/schemas/BookableResourcesItemListWithOnlyAreaAndPosition"
  "/api/v2/spaces/{space_id}/buildings/{building_id}/bookable_resources/types/{type_id}/items/schedule":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    - name: type_id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: List items of a given type associated with a given building and provide
        their schedules
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      parameters:
      - name: start
        in: query
        schema:
          type: string
          format: date-string
        required: true
        description: Provide item schedule starting from this moment.
      - name: end
        in: query
        schema:
          type: string
          format: date-string
        required: true
        description: Provide item schedule up-to this moment, excluded.
      description: |
        List items that:
        - have the provided type
        - are linked to the provided building

        The items are listed with their schedule for the provided period `[start, end]`.

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        Not yet specified.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                items: []
                schedule:
                  start: '2026-06-22T00:00:00.000Z'
                  end: '2026-06-22T23:59:59.000Z'
              schema:
                "$ref": "#/components/schemas/BookableResourcesItemListWithSchedules"
  "/api/v2/spaces/{space_id}/buildings/{building_id}/floors/{floor_id}/bookable_resources/types/{type_id}/items/schedule":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    - name: floor_id
      in: path
      schema:
        type: integer
      description: Floor id
      required: true
    - name: type_id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: List items of a given type associated with a given building and floor
        and provide their schedules
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      parameters:
      - name: start
        in: query
        schema:
          type: string
          format: date-string
        description: Provide item schedule starting from this moment.
      - name: end
        in: query
        schema:
          type: string
          format: date-string
        description: Provide item schedule up-to this moment, excluded.
      description: |
        List items that:
        - have the provided type
        - are linked to the provided building
        - are linked to the provided floor

        The items are listed with their schedule for the provided period `[start, end]`.

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        Not yet specified.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                items: []
                schedule:
                  start: '2026-06-22T00:00:00.000Z'
                  end: '2026-06-22T23:59:59.000Z'
              schema:
                "$ref": "#/components/schemas/BookableResourcesItemListWithSchedules"
  "/api/v2/spaces/{space_id}/bookable_resources/items/{item_id}/position":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: item_id
      in: path
      schema:
        type: integer
      description: Bookable resources item id
      required: true
    post:
      summary: Set the position of the item
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      description: |
        Place an item by setting its position.

        For point position, the item's area will also be updated and the change is
        reflected in the response:
        - if no area intersect with the given position, the item's area is reset.
        - if a single area intersect with the given position, then it becomes the item's
          area.
        - if multiple areas intersect with the given position, then the first intersecting
          area, by name, will become the item's area.

        For shape position, the item's area is always reset.

        ### Who can access this endpoint?
        Admin, Application, User

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: position updated
          content:
            application/json:
              example:
                id: 32
                created_at: '2026-06-22T09:29:17.147Z'
                updated_at: '2026-06-22T09:29:17.147Z'
                name: Howe-Wehner
                sync_id: 78e841bb-c9d1-4a8d-b8ec-2f1f68020f2e
                bookable: true
                position:
                  type: shape
                  center:
                    x: 1
                    "y": 1
                  shape:
                  - x: 1
                    "y": 1
                  - x: 1
                    "y": 2
                  - x: 2
                    "y": 2
                area:
              schema:
                "$ref": "#/components/schemas/BookableResourcesItemWithOnlyAreaAndPosition"
        '422':
          description: wrong position type
          content:
            application/json:
              example:
                type: problems/invalid_input
                category: unprocessable_entity
                severity: error
                title: Invalid input
                errors:
                - path: "#/position/type"
                  error: must be shape for item with area display
              schema:
                "$ref": "#/components/schemas/Problem"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesInputPosition"
        required: true
    delete:
      summary: Reset the position of the item
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      description: |
        Unplace an item by resetting its position.

        The item's area will also be reset.

        ### Who can access this endpoint?
        Admin, Application, User

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: position removed
          content:
            application/json:
              example:
                id: 34
                created_at: '2026-06-22T09:29:17.354Z'
                updated_at: '2026-06-22T09:29:17.374Z'
                name: Torp Group
                sync_id: 8ccd1267-726b-4dfe-a795-98dbe32a2b20
                bookable: true
                position:
                area:
              schema:
                "$ref": "#/components/schemas/BookableResourcesItemWithOnlyAreaAndPosition"
  "/api/v2/spaces/{space_id}/bookable_resources/types":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    get:
      summary: List bookable resources types
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        List bookable resources types

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        Not yet specified.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                types:
                - id: 28
                  created_at: '2026-06-22T09:29:17.396Z'
                  updated_at: '2026-06-22T09:29:17.396Z'
                  name: Marquardt and Sons
                  description: Ut ipsum nihil delectus.
                  bookable: true
                  booking_length_step_unit: minutes
                  booking_length_step: 1
                  display:
                    type: area
                    icon:
                    color: '060688'
                  items_count: 6
                  buildings:
                  - id: 254
                    name: University Place
                  - id: 257
                    name: Royal Acres
                  - id: 253
                    name: Royal Square
                  - id: 255
                    name: Park Estates
                  - id: 256
                    name: Autumn Creek
                - id: 29
                  created_at: '2026-06-22T09:29:17.583Z'
                  updated_at: '2026-06-22T09:29:17.583Z'
                  name: Kuvalis-Lueilwitz
                  description: Debitis itaque explicabo rerum.
                  bookable: false
                  booking_length_step_unit: minutes
                  booking_length_step: 1
                  display:
                    type: marker
                    shape: round
                    icon: mortification
                    color: b12bb1
                    size: small
                  items_count: 9
                  buildings:
                  - id: 258
                    name: Paradise Heights
                  - id: 259
                    name: Summer Crossing
                - id: 30
                  created_at: '2026-06-22T09:29:17.774Z'
                  updated_at: '2026-06-22T09:29:17.774Z'
                  name: Morissette-Zboncak
                  description: Rem provident quia beatae.
                  bookable: false
                  booking_length_step_unit: minutes
                  booking_length_step: 1
                  display:
                    type: area
                    icon:
                    color: bfdede
                  items_count: 1
                  buildings:
                  - id: 260
                    name: Summer Gardens
              schema:
                "$ref": "#/components/schemas/BookableResourcesTypeList"
    post:
      summary: Create a bookable resources type
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      description: |
        Create a new bookable resources type

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '201':
          description: created
          content:
            application/json:
              example:
                id: 31
                created_at: '2026-06-22T09:29:17.918Z'
                updated_at: '2026-06-22T09:29:17.918Z'
                name: Mills Inc
                description: Dolorum numquam nihil iusto.
                bookable: false
                booking_length_step_unit: minutes
                booking_length_step: 1
                display:
                  type: area
                  icon: infatuation
                  color: 6ca76c
                items: []
              schema:
                "$ref": "#/components/schemas/BookableResourcesTypeDetails"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesTypeForm"
        required: true
  "/api/v2/spaces/{space_id}/bookable_resources/types/{id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Bookable resources type id
      required: true
    get:
      summary: Show the bookable resources type details
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        Get the details of a bookable resources type.

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                id: 32
                created_at: '2026-06-22T09:29:17.945Z'
                updated_at: '2026-06-22T09:29:17.945Z'
                name: Runolfsson-Morissette
                description: Sit ut possimus qui.
                bookable: true
                booking_length_step_unit: minutes
                booking_length_step: 1
                display:
                  type: area
                  icon:
                  color: 6c6c47
                items: []
              schema:
                "$ref": "#/components/schemas/BookableResourcesTypeDetails"
    put:
      summary: Update the bookable resources type
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      description: |
        Update a bookable resources type

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '204':
          description: updated
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesTypeForm"
        required: true
    patch:
      summary: Update the bookable resources type
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      parameters: []
      description: |
        Update a bookable resources type

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '204':
          description: updated
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BookableResourcesTypeForm"
        required: true
    delete:
      summary: Delete the bookable resources type
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:write
      description: |
        Destroy a bookable resources type

        ### Who can access this endpoint?
        User, Admin, Application

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '204':
          description: deleted
  "/api/v2/spaces/{space_id}/buildings/{building_id}/bookable_resources/available_types":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    get:
      summary: List available bookable resources types for given building
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        List available bookable resources types for the given building.

        The types listed are marked as bookable and have bookable items matching the
        building.

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        Not yet specified.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                types:
                - id: 36
                  created_at: '2026-06-22T09:29:18.180Z'
                  updated_at: '2026-06-22T09:29:18.180Z'
                  name: Anderson Group
                  description: Deserunt voluptas dolorem consequuntur.
                  bookable: true
                  booking_length_step_unit: minutes
                  booking_length_step: 1
                  display:
                    type: marker
                    shape: square
                    icon: woe
                    color: 0f0f6b
                    size: small
                building:
                  id: 261
                  name: Eagle Pointe
                floor:
              schema:
                "$ref": "#/components/schemas/BookableResourcesAvailableTypeList"
  "/api/v2/spaces/{space_id}/buildings/{building_id}/floors/{floor_id}/bookable_resources/available_types":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    - name: floor_id
      in: path
      schema:
        type: integer
      description: Floor id
      required: true
    get:
      summary: List available bookable resources types for given building and floor
      tags:
      - Bookable resources
      - Experimental
      security:
      - comeenOauth:
        - bookable_resources:read
      description: |
        List available bookable resources types for the given building and floor.

        The types listed are marked as bookable and have bookable items matching the
        building and floor.

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        Not yet specified.

        ### What is the estimated release date of this endpoint?
        2026-07-12
        CW-3375


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                types:
                - id: 37
                  created_at: '2026-06-22T09:29:18.255Z'
                  updated_at: '2026-06-22T09:29:18.255Z'
                  name: Cremin, Kulas and Koss
                  description: Nulla totam quia nam.
                  bookable: true
                  booking_length_step_unit: minutes
                  booking_length_step: 1
                  display:
                    type: area
                    icon:
                    color: cfbecf
                building:
                  id: 262
                  name: Autumn Village
                floor:
                  id: 131
                  name: Automobiles & Parts
              schema:
                "$ref": "#/components/schemas/BookableResourcesAvailableTypeList"
  "/api/v2/spaces/{space_id}/desk_bookings/imports/example.csv":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    get:
      summary: Download an example CSV file
      tags:
      - Desk bookings
      security:
      - comeenOauth:
        - workactivities:read
      description: |
        Provide an example CSV file that can be used to import desk bookings.

        ### Who can access this endpoint?
        User, Application, Admin, ... everyone
      responses:
        '200':
          description: success
          content:
            text/csv:
              example: |
                sync_id,email
                desk-01,john@example.org
                desk-02,jane@example.org
  "/api/v2/spaces/{space_id}/desk_bookings/imports/{id}/accept":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Import id
      required: true
    post:
      summary: Accept a desk bookings import
      description: |
        Accept a previously created desk bookings import, creating work activities,
        presences, and desk bookings for each row.

        Destroys the import on success.

        Don't book anything if any error.

        ### Who can access this endpoint?
        User, Admin

        ### What is the estimated release date of this endpoint?
        2026-08-04


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      tags:
      - Desk bookings
      - Experimental
      security:
      - comeenOauth:
        - workactivities:write
      responses:
        '204':
          description: success
  "/api/v2/spaces/{space_id}/buildings/{building_id}/desk_bookings/import":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    post:
      summary: Import CSV file to book desks
      description: |
        Import CSV file to book desks.

        Returns what desk will be booked and by whom.

        Only succeeds if there are no errors. On failure, returns a single
        error object describing what is wrong with the file.

        The import will need to be accepted to proceed.

        Creating an import erases any previously existing import created for the same building.

        ### Who can access this endpoint?
        User, Admin

        ### How is the data sorted?
        Same ordering as in the CSV

        ### What is the estimated release date of this endpoint?
        2026-08-04


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      tags:
      - Desk bookings
      - Experimental
      security:
      - comeenOauth:
        - workactivities:write
      parameters:
      - name: booking_date
        in: query
        schema:
          type: string
          format: date
        required: true
        description: Date for which desks will be booked  (ISO 8601 format).
      responses:
        '200':
          description: success
          content:
            application/json:
              example:
                id: 2
                booking_date: '2026-06-22'
                items:
                - desk:
                    sync_id: a44b6161-5639-4bc4-ae4b-e80d12410d08
                    name: Industrial Goods & Services-59
                  user:
                    id: 560
                    full_name: Tanner Brown
                    email: tanner-brown@example.org
              schema:
                "$ref": "#/components/schemas/DeskBookingsImport"
        '422':
          description: invalid input
          content:
            application/json:
              example:
                error: malformed
              schema:
                "$ref": "#/components/schemas/DeskBookingsImportError"
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: string
              format: binary
        required: true
        description: |
          CSV file, encoded in UTF-8, using a comma separator.
          Columns should correspond to:
          - sync_id: desk sync_id (required, must exist in the building)
          - email: user email or empty (required, must exist in the space)
  "/api/v2/spaces/{space_id}/floors/{floor_id}/desks/schedule":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: floor_id
      in: path
      description: Floor id
      required: true
      schema:
        type: integer
    get:
      summary: List floor desks with their schedule
      tags:
      - Desks
      - Presences
      - Experimental
      security:
      - comeenOauth:
        - presences:read
      parameters:
      - name: start
        in: query
        schema:
          type: string
          format: date-time
        description: |
          Start bound for the desks schedule period, inclusive.

          Defaults to the beginning of the current UTC day.
      - name: end
        in: query
        schema:
          type: string
          format: date-time
        description: |
          End bound for the desks schedule period, exclusive.

          Defaults to the beginning of the next UTC day.
      description: |
        List desks of a floor with their schedule for the provided period.

        The schedules are the list of presences that are not canceled or finished.

        This endpoint is not paginated.

        ### Who can access this endpoint?
        User, Admin, Application, Signage

        ### How is the data sorted?
        The desks are sorted by sync_id and their schedule are sorted by start time.

        ### What is the estimated release date of this endpoint?
        2026-07-13


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                desks:
                - uuid: 7c9edb9b-1be0-49c2-9ad2-8b9494d56a5c
                  name: Telecommunications-60
                  sync_id:
                  coordinates:
                  bookable: true
                  area:
                  equipment: []
                  schedule:
                  - uuid: 84819ac5-3602-4715-900f-b43a3b075836
                    state: confirmed
                    start: '2026-06-23T00:00:00.000Z'
                    end: '2026-06-23T12:00:00.000Z'
                    person:
                      id: 562
                      full_name: Ramiro Hickle
                      first_name: Ramiro
                      last_name: Hickle
                      email: ramiro.hickle@example.org
                      avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaE1CIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--cd749247dbdd05a0fd9f8c90cfb5dc75f077c0e0/blank.png
                    is_private: false
                - uuid: 0d050a52-2f41-4119-bf61-16a78d7d9d81
                  name: Telecommunications-61
                  sync_id:
                  coordinates:
                  bookable: true
                  area:
                  equipment: []
                  schedule:
                  - uuid: eab2136e-3049-420a-9320-ef8a81bc4b1f
                    state: booked
                    start: '2026-06-25T00:00:00.000Z'
                    end: '2026-06-25T23:59:59.000Z'
                    person:
                      id: 563
                      full_name: Jeannine Koch
                      first_name: Jeannine
                      last_name: Koch
                      email: koch_jeannine@example.org
                      avatar:
                    is_private: false
                - uuid: 886711ea-9b32-413c-a613-868a11f9c1e0
                  name: Telecommunications-62
                  sync_id:
                  coordinates:
                  bookable: true
                  area:
                  equipment: []
                  schedule:
                  - uuid: 71b75d96-6c1e-4cbf-bb6b-a069c52592bc
                    state: ongoing
                    start: '2026-06-22T00:00:00.000Z'
                    end: '2026-06-22T23:59:59.000Z'
                    person:
                      id: 564
                      full_name: Alonso Grimes
                      first_name: Alonso
                      last_name: Grimes
                      email: grimes-alonso@example.org
                      avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaFFCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--073e98302144f89f319830a8d40de0f5eff0ac32/blank.png
                    is_private: false
                - uuid: ea4d229a-39b4-4b5f-bd31-619d15d60794
                  name: Telecommunications-63
                  sync_id:
                  coordinates:
                  bookable: true
                  area:
                  equipment: []
                  schedule:
                  - uuid: '049237ae-f091-46c6-94fa-5b9d63e2d9cf'
                    state: confirmed
                    start: '2026-06-26T00:00:00.000Z'
                    end: '2026-06-26T12:00:00.000Z'
                    person:
                      id: 565
                      full_name: Francoise Dickinson
                      first_name: Francoise
                      last_name: Dickinson
                      email: dickinson.francoise@example.org
                      avatar:
                    is_private: false
                - uuid: 4a7111db-c7d2-49e6-a8b0-9e5d6f286881
                  name: Telecommunications-64
                  sync_id:
                  coordinates:
                  bookable: true
                  area:
                  equipment: []
                  schedule:
                  - uuid: 232903d1-302a-4fae-a69a-b627dc869b5e
                    state: confirmed
                    start: '2026-06-26T00:00:00.000Z'
                    end: '2026-06-26T23:59:59.000Z'
                    person:
                      id: 566
                      full_name: Odis Reynolds
                      first_name: Odis
                      last_name: Reynolds
                      email: odis.reynolds@example.org
                      avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaFVCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--2fa130131d998c7ea52fcdc5cb4a1067a454b7af/blank.png
                    is_private: false
                schedule:
                  start: '2026-06-17T09:29:19.000Z'
                  end: '2026-06-27T09:29:19.000Z'
              schema:
                "$ref": "#/components/schemas/DeskListWithSchedules"
  "/api/v2/spaces/{space_id}/buildings/{building_id}/floors":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    get:
      summary: List floors of a building
      description: |
        Provide a basic list of floors with minimal information associated.

        ### Who can access this endpoint?
        User, Admin, Kiosk, Signage, Application

        ### How is the data sorted?
        The floors are sorted by their `number` property.
      tags:
      - Floors
      security:
      - comeenOauth:
        - meeting_rooms:read
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                floors:
                - id: 135
                  name: Financial Services
                  number: 1
                  flex_office: false
                  floorplan_url: http://www.example.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaGNCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--600b8ceda7cce745b8048c84db68248bb8be37d2/blank.png
                - id: 136
                  name: Telecommunications
                  number: 1
                  flex_office: false
                  floorplan_url:
                - id: 137
                  name: Insurance
                  number: 1
                  flex_office: false
                  floorplan_url:
              schema:
                "$ref": "#/components/schemas/BasicFloorList"
  "/api/v2/spaces/{space_id}/buildings/{building_id}/meeting_rooms/available/for_user/{user_id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: building_id
      in: path
      schema:
        type: integer
      description: Building id
      required: true
    - name: user_id
      in: path
      schema:
        type: integer
      description: User id
      required: true
    - name: start
      in: query
      schema:
        type: string
        format: date_time
      description: Start time. Default to now.
      required: false
    - name: end
      in: query
      schema:
        type: string
        format: date_time
      description: End time. Default to 1 hour from now.
      required: false
    get:
      summary: List available meeting rooms on a building for user and time range
      description: |
        List meeting rooms that can be booked at the time of the query,
        and that do not have any bookings for the provided period.

        ### Who can access this endpoint?
        Admin, Application

        ### How is the data sorted?
        The data is sorted by id.
      tags:
      - Meeting rooms
      security:
      - comeenOauth:
        - meeting_rooms:read
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                meeting_rooms:
                - id: 88
                  name: Paradise Gardens
              schema:
                "$ref": "#/components/schemas/MinimalistMeetingRoomList"
  "/api/v2/spaces/{space_id}/floors/{floor_id}/meeting_rooms/available/for_user/{user_id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: floor_id
      in: path
      schema:
        type: integer
      description: Floor id
      required: true
    - name: user_id
      in: path
      schema:
        type: integer
      description: User id
      required: true
    - name: start
      in: query
      schema:
        type: string
        format: date_time
      description: Start time. Default to now.
      required: false
    - name: end
      in: query
      schema:
        type: string
        format: date_time
      description: End time. Default to 1 hour from now.
      required: false
    get:
      summary: List available meeting rooms on a floor for user and time range
      description: |
        List meeting rooms that can be booked at the time of the query,
        and that do not have any bookings for the provided period.

        ### Who can access this endpoint?
        Admin, Application

        ### How is the data sorted?
        The data is sorted by id.
      tags:
      - Meeting rooms
      security:
      - comeenOauth:
        - meeting_rooms:read
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                meeting_rooms:
                - id: 89
                  name: Park Village
              schema:
                "$ref": "#/components/schemas/MinimalistMeetingRoomList"
  "/api/v2/spaces/{space_id}/meeting_rooms/{id}/book":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Meeting Room id
      required: true
    post:
      summary: Book a Meeting Room
      tags:
      - Meeting rooms
      security:
      - comeenOauth:
        - appointments:write
      parameters: []
      description: |
        Book a meeting room

        ### Who can access this endpoint?
        User, Admin, Application, Kiosk, Signage
      responses:
        '201':
          description: successful
          content:
            application/json:
              example:
                id: 101
                topic: grow 24/7 content
                start: '2026-06-27T12:00:00.000Z'
                end: '2026-06-27T12:15:00.000Z'
                organizer:
                  id: 570
                  full_name: Johnny Pouros
                  first_name: Johnny
                  last_name: Pouros
                  email: pouros_johnny@example.org
                  avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaGtCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--744fe5b0c5016a8bb45f3fb69a55f3d881f4c7ea/blank.png
              schema:
                "$ref": "#/components/schemas/AppointmentEmbedded"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - topic
              - start
              - end
              properties:
                topic:
                  type: string
                description:
                  type: string
                start:
                  type: string
                  format: date-time
                end:
                  type: string
                  format: date-time
                extended_properties:
                  type: object
                check_in:
                  type: boolean
                organizer_id:
                  type: number
                attendee_emails:
                  type: array
                  items:
                    type: string
  "/api/v2/spaces/{space_id}/onsite_presence/rules":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    get:
      summary: List on-site presence rules
      tags:
      - On-site presence rules
      security:
      - comeenOauth:
        - presence_rules:read
      parameters:
      - name: with_archived
        in: query
        schema:
          type: boolean
          default: false
        required: false
        description: 'Whether or not to include rules for which the application period
          ended.

          '
      - name: for_group_ids[]
        in: query
        schema:
          type: array
          items:
            type: integer
        required: false
        description: 'Filters rules which apply to all the specified group ids.

          '
      - name: with_periods[]
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - all_time
            - bounded
            - recurring
            - multiple_dates
        required: false
        description: |
          Filter rules by application period type.
          Refer to the `application_period` attribute in the `PresenceRule` schema for more details on each type.
      - name: start
        in: query
        schema:
          type: string
          format: date-time
        required: false
        description: 'Filter rules with a start date greater than or equal to the
          specified datetime.

          '
      - name: end
        in: query
        schema:
          type: string
          format: date-time
        required: false
        description: 'Filter rules with an end date less than or equal to the specified
          datetime.

          '
      - "$ref": "#/components/parameters/PageParam"
      - "$ref": "#/components/parameters/PerPageParam"
      description: |
        List rules applying to on-site presence creation.

        ### How is the data sorted?
        The rules are sorted by creation date, *descending*.

        ### Who can access this endpoint?
        User, Admin, Application
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                rules:
                - id: 3
                  minimum_days_per_week: 6
                  maximum_days_per_week: 5
                  maximum_days_per_week_hard_limit: true
                  application_period:
                    type: multiple_dates
                    dates:
                    - '2026-06-22'
                  locations:
                    recommended_buildings: []
                    recommended_floors: []
                    recommended_areas: []
                    blocked_buildings: []
                    blocked_floors: []
                    blocked_areas: []
                    enforced_buildings: []
                    enforced_floors: []
                    enforced_areas: []
                    exclusive_buildings: []
                    exclusive_floors: []
                    exclusive_areas: []
                  targets:
                    type: groups
                    groups: []
                - id: 2
                  minimum_days_per_week: 5
                  maximum_days_per_week: 7
                  maximum_days_per_week_hard_limit: true
                  application_period:
                    type: recurring
                    start: '2026-06-18T09:29:19.000Z'
                    end: '2026-06-28T09:29:19.000Z'
                    recurrence: FREQ=WEEKLY;BYDAY=MO,WE,FR
                  locations:
                    recommended_buildings: []
                    recommended_floors: []
                    recommended_areas: []
                    blocked_buildings: []
                    blocked_floors: []
                    blocked_areas: []
                    enforced_buildings: []
                    enforced_floors: []
                    enforced_areas: []
                    exclusive_buildings: []
                    exclusive_floors: []
                    exclusive_areas: []
                  targets:
                    type: groups
                    groups: []
                - id: 1
                  minimum_days_per_week: 6
                  maximum_days_per_week: 3
                  maximum_days_per_week_hard_limit: true
                  application_period:
                    type: bounded
                    start: '2026-06-19T09:29:19.000Z'
                    end: '2026-06-23T09:29:19.000Z'
                  locations:
                    recommended_buildings: []
                    recommended_floors: []
                    recommended_areas: []
                    blocked_buildings: []
                    blocked_floors: []
                    blocked_areas: []
                    enforced_buildings: []
                    enforced_floors: []
                    enforced_areas: []
                    exclusive_buildings: []
                    exclusive_floors: []
                    exclusive_areas: []
                  targets:
                    type: groups
                    groups: []
                pagination:
                  current: 1
                  per_page: 50
                  pages: 1
                  count: 3
              schema:
                "$ref": "#/components/schemas/PresenceRulesList"
    post:
      summary: Create a presence rule
      tags:
      - On-site presence rules
      security:
      - comeenOauth:
        - presence_rules:write
      parameters: []
      description: |
        Create a new presence rule

        ### Who can access this endpoint?
        User, Admin, Application
      responses:
        '201':
          description: created
          content:
            application/json:
              example:
                id: 17
                minimum_days_per_week: 2
                maximum_days_per_week: 5
                maximum_days_per_week_hard_limit: true
                application_period:
                  type: all_time
                  start: '2026-06-15T09:29:20.000Z'
                locations:
                  recommended_buildings: []
                  recommended_floors: []
                  recommended_areas: []
                  blocked_buildings: []
                  blocked_floors: []
                  blocked_areas: []
                  enforced_buildings: []
                  enforced_floors: []
                  enforced_areas: []
                  exclusive_buildings: []
                  exclusive_floors: []
                  exclusive_areas: []
                targets:
                  type: everyone
              schema:
                "$ref": "#/components/schemas/PresenceRule"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/CreatePresenceRuleForm"
        required: true
  "/api/v2/spaces/{space_id}/onsite_presence/rules/{id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Presence rule id
      required: true
    get:
      summary: Show the presence rule details
      tags:
      - On-site presence rules
      security:
      - comeenOauth:
        - presence_rules:read
      description: |
        Show the details of a presence rule

        ### Who can access this endpoint?
        User, Admin, Application
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                id: 20
                minimum_days_per_week: 5
                maximum_days_per_week: 3
                maximum_days_per_week_hard_limit: false
                application_period:
                  type: multiple_dates
                  dates:
                  - '2026-06-25'
                locations:
                  recommended_buildings: []
                  recommended_floors: []
                  recommended_areas: []
                  blocked_buildings: []
                  blocked_floors: []
                  blocked_areas: []
                  enforced_buildings: []
                  enforced_floors: []
                  enforced_areas: []
                  exclusive_buildings: []
                  exclusive_floors: []
                  exclusive_areas: []
                targets:
                  type: groups
                  groups: []
              schema:
                "$ref": "#/components/schemas/PresenceRule"
    put:
      summary: Update the presence rule
      tags:
      - On-site presence rules
      security:
      - comeenOauth:
        - presence_rules:write
      parameters: []
      description: |
        Update a presence rule

        ### Who can access this endpoint?
        User, Admin, Application
      responses:
        '204':
          description: updated
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UpdatePresenceRuleForm"
        required: true
    patch:
      summary: Update the presence rule
      tags:
      - On-site presence rules
      security:
      - comeenOauth:
        - presence_rules:write
      parameters: []
      description: |
        Update a presence rule

        ### Who can access this endpoint?
        User, Admin, Application
      responses:
        '204':
          description: updated
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UpdatePresenceRuleForm"
        required: true
    delete:
      summary: Delete the presence rule
      tags:
      - On-site presence rules
      security:
      - comeenOauth:
        - presence_rules:write
      description: |
        Delete a presence rule

        ### Who can access this endpoint?
        User, Admin, Application
      responses:
        '204':
          description: deleted
  "/api/v2/spaces/{space_id}/recurring_appointments/{id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Recurring appointment id
      required: true
    get:
      summary: Get information about a recurring appointment
      tags:
      - Appointments
      - Recurring appointments
      - Experimental
      security:
      - comeenOauth:
        - appointments:read
      parameters:
      - name: before
        in: query
        schema:
          type: string
          format: date-time
        required: false
        description: |
          Allows counting the number of occurrences that started before this time.

          The default value is the current time.

          This corresponds to the `#/occurrences/before/time` value in the output.
      description: |
        Get information about a recurring appointment

        ### Who can access this endpoint?
        Admin, User, Application

        ### What is the estimated release date of this endpoint?
        2026-07-20


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                id: 9
                topic: synergize enterprise niches
                start:
                released_at:
                attendees:
                - id: 577
                  full_name: Dario Witting
                  email: dario.witting@example.org
                - id: 578
                  full_name: Raleigh Jenkins
                  email: raleigh_jenkins@example.org
                - id: 579
                  full_name: Ken Ritchie
                  email: ken_ritchie@example.org
                occurrences:
                  release_counter: 0
                  release_counter_limit: 10
                  total_release_counter: 0
                  auto_released_count: 0
                  released_count: 0
                  proactively_released_count: 0
                  canceled_count: 0
                  before:
                    time: '2026-06-22T09:29:20.629Z'
                    count: 0
              schema:
                "$ref": "#/components/schemas/RecurringAppointmentDetails"
  "/api/v2/spaces/{space_id}/recurring_appointments/{id}/occurrences":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Recurring appointment id
      required: true
    get:
      summary: List a recurring appointment occurrences
      tags:
      - Appointments
      - Recurring appointments
      - Experimental
      security:
      - comeenOauth:
        - appointments:read
      parameters:
      - name: after
        in: query
        schema:
          type: string
          format: date-time
        required: false
        description: |
          Limit the returned occurrences to those starting after this time.

          The default value is the current time.
      - "$ref": "#/components/parameters/PageParam"
      - "$ref": "#/components/parameters/PerPageParam"
      description: |
        List occurrences of a recurring appointment.

        By default, it only lists future occurrences, but this can be controller by
        providing another date-time with the `after` parameter.

        ### Who can access this endpoint?
        Admin, User, Application

        ### How is the data sorted?
        The occurrences are sorted by start time.

        ### What is the estimated release date of this endpoint?
        2026-08-06


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                occurrences:
                - id: 103
                  topic: maximize virtual networks
                  start: '2026-06-27T12:00:00Z'
                  end: '2026-06-27T12:30:00Z'
                  organizer:
                    id: 582
                    full_name: Rolande Hilpert
                    email: rolande-hilpert@example.org
                  state: booked
                  release:
                  state_changes:
                    booked_at:
                    ongoing_at:
                    finished_at:
                    canceled_at:
                    released_at:
                  workflow:
                    auto_release:
                      planned_at:
                    meeting_will_start_notification:
                      planned_at:
                      sent_at:
                    meeting_started_notification:
                      planned_at:
                      sent_at:
                    summary_notification:
                      planned_at:
                      sent_at:
                pagination:
                  current: 1
                  per_page: 50
                  pages: 1
                  count: 1
              schema:
                "$ref": "#/components/schemas/PaginatedRecurringAppointmentOccurrences"
  "/api/v2/spaces/{space_id}/recurring_appointments/{id}/release":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Recurring appointment id
      required: true
    post:
      summary: Release a recurring appointment
      tags:
      - Appointments
      - Recurring appointments
      - Experimental
      security:
      - comeenOauth:
        - appointments:write
      parameters:
      - name: at
        in: query
        schema:
          type: string
          format: date-time
        required: false
        description: |
          Release the recurring appointment at this moment.

          The default value is the current time.
      description: |
        Release a recurring appointment, that is to say it will proactively release all
        occurrences past the release date.

        ### Who can access this endpoint?
        Admin, User

        ### What is the estimated release date of this endpoint?
        2026-08-06


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                id: 11
                topic: extend holistic channels
                start:
                released_at: '2026-06-28T23:59:59Z'
                attendees:
                - id: 586
                  full_name: Carlton Dibbert
                  email: dibbert_carlton@example.org
                - id: 587
                  full_name: Olive Volkman
                  email: volkman-olive@example.org
                occurrences:
                  release_counter: 0
                  release_counter_limit: 10
                  total_release_counter: 0
                  auto_released_count: 0
                  released_count: 0
                  proactively_released_count: 0
                  canceled_count: 0
                  before:
                    time: '2026-06-22T09:29:21.107Z'
                    count: 0
              schema:
                "$ref": "#/components/schemas/RecurringAppointmentDetails"
  "/api/v2/spaces/{space_id}/recurring_appointments/{id}/release_counter":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: id
      in: path
      schema:
        type: integer
      description: Recurring appointment id
      required: true
    delete:
      summary: Reset the release counter of a recurring appointment
      tags:
      - Appointments
      - Recurring appointments
      - Experimental
      security:
      - comeenOauth:
        - appointments:write
      description: |
        Reset the release counter of a recurring appointment, thus delaying the eventual
        automatic release of the recurring appointment.

        ### Who can access this endpoint?
        Admin, User

        ### What is the estimated release date of this endpoint?
        2026-08-06


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                id: 12
                topic: unleash transparent e-markets
                start:
                released_at:
                attendees:
                - id: 596
                  full_name: Matthew Harber
                  email: matthew-harber@example.org
                - id: 597
                  full_name: Preston Osinski
                  email: osinski-preston@example.org
                occurrences:
                  release_counter: 0
                  release_counter_limit: 10
                  total_release_counter: 0
                  auto_released_count: 0
                  released_count: 0
                  proactively_released_count: 0
                  canceled_count: 0
                  before:
                    time: '2026-06-22T09:29:21.396Z'
                    count: 0
              schema:
                "$ref": "#/components/schemas/RecurringAppointmentDetails"
  "/api/v2/spaces/subscription":
    post:
      summary: Create a new space with a user
      tags:
      - Spaces
      security:
      - comeenOauth:
        - spaces:write
      parameters: []
      description: |
        Create a new space with a user.

        This endpoint is for internal use only.
        ### Who can access this endpoint?
        Subscription Tunnel
      responses:
        '201':
          description: successful
          content:
            application/json:
              example:
                space:
                  uuid: 7037cc9b-7684-4f06-a210-50eccc7d1396
                  name: Bashirian and Sons
                  subdomain: bashirian-and-sons-815
                user:
                  id: 602
                  full_name: Chet Kuhn
                  first_name: Chet
                  last_name: Kuhn
                  email: chet-kuhn@example.org
                  avatar:
              schema:
                "$ref": "#/components/schemas/SpaceSubscription"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - space
              - user
              properties:
                analytics: {}
                space:
                  type: object
                  required:
                  - name
                  - subdomain
                  properties:
                    name:
                      type: string
                    subdomain:
                      type: string
                user:
                  type: object
                  required:
                  - first_name
                  - last_name
                  - email
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    email:
                      type: string
                      format: email
  "/api/v2/spaces/{space_id}/users":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    get:
      summary: List users
      tags:
      - Users
      security:
      - comeenOauth:
        - users:read
      parameters:
      - name: search
        in: query
        required: false
        schema:
          type: string
        description: Search term to filter users across email, as well as first &
          last names.
      - name: in_group_ids[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: integer
        description: |
          Filters users by membership of User Groups. The users must be members of all the
          groups.

          Accepts one or more User Group IDs.
      - name: not_in_group_ids[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: integer
        description: Filters users by non-membership of User Groups. Accepts one or
          more User Group IDs.
      - name: managed_by_id
        in: query
        required: false
        schema:
          type: integer
        description: Filters users by manager. Accepts a User ID to filter users who
          are managed by the specified User.
      - name: not_managed_by_id
        in: query
        required: false
        schema:
          type: integer
        description: Filters users by non-manager. Accepts a User ID to filter users
          who are not managed by the specified User.
      - name: with_role
        in: query
        required: false
        schema:
          "$ref": "#/components/schemas/Role"
        description: Filters users by role.
      - name: with_discarded
        in: query
        required: false
        schema:
          type: boolean
          default: false
        description: Whether to include users queued for deletion in the results.
          Defaults to `false`.
      - "$ref": "#/components/parameters/PageParam"
      - "$ref": "#/components/parameters/PerPageParam"
      description: |
        List and search users

        User and Kiosk access require a search parameter of 3 characters minimum

        ### Who can access this endpoint?
        Admin, Application, Kiosk, User

        ### How is the data sorted?
        The users are sorted by email.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                users: []
                pagination:
                  current: 1
                  per_page: 50
                  pages: 1
                  count: 0
              schema:
                "$ref": "#/components/schemas/PaginatedUserList"
        '422':
          description: search too short
          content:
            application/json:
              example:
                type: problems/invalid_input
                category: unprocessable_entity
                severity: error
                title: Invalid input
                errors:
                - path: "#/search"
                  error: is too short
  "/api/v2/spaces/{space_id}/users/managed_by/{manager_id}":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: manager_id
      in: path
      schema:
        type: integer
      description: User id
      required: true
    get:
      summary: List users managed by someone
      tags:
      - Users
      - Experimental
      security:
      - comeenOauth:
        - users:read
      parameters:
      - "$ref": "#/components/parameters/PageParam"
      - "$ref": "#/components/parameters/PerPageParam"
      description: |
        List users managed by the provided manager id.

        ### Who can access this endpoint?
        Admin, User

        ### How is the data sorted?
        The users are sorted by email.

        ### What is the estimated release date of this endpoint?
        2026-08-09


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                users:
                - id: 651
                  full_name: Jackson Champlin
                  first_name: Jackson
                  last_name: Champlin
                  email: champlin-jackson@example.org
                  avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBajRCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e656716c3d7c1e4515e1919fcfca66cf5230b07f/blank.png
                - id: 653
                  full_name: Wes Lubowitz
                  first_name: Wes
                  last_name: Lubowitz
                  email: lubowitz_wes@example.org
                  avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBa0FCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--74f51bebcafc40813ac4b81973668329315a84a3/blank.png
                - id: 652
                  full_name: Terrance Luettgen
                  first_name: Terrance
                  last_name: Luettgen
                  email: luettgen_terrance@example.org
                  avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBajhCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--80792205b78455da089a81a2c81154897f2cc896/blank.png
                pagination:
                  current: 1
                  per_page: 50
                  pages: 1
                  count: 3
              schema:
                "$ref": "#/components/schemas/PaginatedUserProfiles"
  "/api/v2/spaces/{space_id}/users/by_email/{email}/profile":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: email
      in: path
      schema:
        type: string
        format: email
      description: User Email
      required: true
    get:
      summary: Get user profile
      tags:
      - Users
      security:
      - comeenOauth:
        - users:read
      description: |
        Get a user profile by email

        ### Who can access this endpoint?
        Admin, Application
        User with the role `user_admin`
      responses:
        '200':
          description: successful
          content:
            application/json:
              example:
                id: 654
                full_name: Arron Mohr
                first_name: Arron
                last_name: Mohr
                email: mohr_arron@example.org
                avatar: http://localhost/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBa0VCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--b0b2da22d29ad14c70bd5d0b68abae5cba4640c4/blank.png
              schema:
                "$ref": "#/components/schemas/UserProfile"
        '404':
          description: not found
          content:
            application/json:
              example:
                type: problems/not_found
                category: not_found
                severity: error
                title: Not found
              schema:
                "$ref": "#/components/schemas/Problem"
  "/api/v2/spaces/{space_id}/kiosks/{kiosk_id}/visits/with_host/{user_id}/pre_register":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: kiosk_id
      in: path
      schema:
        type: string
        format: uuid
      description: Kiosk uuid
      required: true
    - name: user_id
      in: path
      description: Host user id
      required: true
      schema:
        type: integer
    post:
      summary: Pre-register visitors
      tags:
      - Visits
      security:
      - comeenOauth:
        - visits:write
      parameters: []
      description: |
        Pre-register visitors for a visit.

        The host must be an existing user of the space.
        Visits will be created in "expected" state.

        ### Warning
        New visitors will be created each time the endpoint is called.

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        The visits are in the same order the guests are provided.
      responses:
        '201':
          description: created
          content:
            application/json:
              example:
                visits:
                - id: 10
                  start_datetime: '2026-06-22T09:29:23.000Z'
                  end_datetime: '2026-06-22T10:29:23.000Z'
                  state: expected
                  kiosk_id: 22
                  space_id: 530
                  visitor:
                    email: john.doe@example.com
                    first_name: John
                    last_name: Doe
                    company: Example Inc.
                    phone: "+33612345678"
              schema:
                type: object
                properties:
                  visits:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Visit"
        '422':
          description: unprocessable entity
          content:
            application/json:
              example:
                type: problems/invalid_input
                category: unprocessable_entity
                severity: error
                title: Invalid input
                errors:
                - path: "#/send_email_instructions"
                  error: must be boolean
              schema:
                "$ref": "#/components/schemas/Problem"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/VisitPreRegistrationForm"
        required: true
  "/api/v2/spaces/{space_id}/kiosks/{kiosk_id}/visits/with_appointment/{appointment_id}/pre_register":
    parameters:
    - name: space_id
      in: path
      schema:
        type: string
        format: uuid
      description: Space uuid
      required: true
    - name: kiosk_id
      in: path
      schema:
        type: string
        format: uuid
      description: Kiosk uuid
      required: true
    - name: appointment_id
      in: path
      description: Appointment id
      required: true
      schema:
        type: integer
    post:
      summary: Pre-register visitors
      tags:
      - Visits
      - Experimental
      security:
      - comeenOauth:
        - visits:write
      parameters: []
      description: |
        Pre-register visitors for a visit.

        The appointment must be an existing appointment of the space.
        Visits will be created in "expected" state.

        If a visitor is already listed in the appointment, a duplicate entry won't be created.

        All existing visits for the appointment will be returned.

        ### Who can access this endpoint?
        User, Admin, Application

        ### How is the data sorted?
        Visits are ordered by creation.

        ### What is the estimated release date of this endpoint?
        2026-08-08


        # ⚠️ This endpoint is marked as experimental and is subject to breaking changes.
      responses:
        '201':
          description: created
          content:
            application/json:
              example:
                visits:
                - id: 13
                  start_datetime: '2026-06-22T09:29:24.000Z'
                  end_datetime: '2026-06-22T10:29:24.000Z'
                  state: expected
                  kiosk_id: 26
                  space_id: 535
                  visitor:
                    email: john.doe@example.com
                    first_name: John
                    last_name: Doe
                    company: Example Inc.
                    phone: "+33612345678"
              schema:
                type: object
                properties:
                  visits:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Visit"
        '200':
          description: nothing created
          content:
            application/json:
              example:
                visits:
                - id: 15
                  start_datetime: '2026-06-22T09:29:24.000Z'
                  end_datetime: '2026-06-22T10:29:24.000Z'
                  state: offsite
                  kiosk_id: 27
                  space_id: 538
                  visitor:
                    email: john.doe@example.com
                    first_name: John
                    last_name: Doe
                    company: Example Inc.
                    phone: "+33612345678"
              schema:
                type: object
                properties:
                  visits:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Visit"
        '422':
          description: unprocessable entity
          content:
            application/json:
              example:
                type: problems/invalid_input
                category: unprocessable_entity
                severity: error
                title: Invalid input
                errors:
                - path: "#/send_email_instructions"
                  error: must be boolean
              schema:
                "$ref": "#/components/schemas/Problem"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/VisitPreRegistrationForm"
        required: true
servers:
- url: "/"
