---
title: "Add, update or delete bookings"
method: POST
path: "/api/v1/organizations/{organizationId}/bookings/{serviceName}"
tags: ["/organizations/{organizationId}/bookings"]
---

# Add, update or delete bookings

`POST /api/v1/organizations/{organizationId}/bookings/{serviceName}`

This endpoint isn't RESTful, it's intended to provide a simple way to add, update and delete invitations and
permissions while keeping references to origin users, bookings and booked resources.
 This endpoint is a
combination of the permission, invitation and identity mapping endpoints and most things that can be done
with this endpoint, could also be done with the other endpoints.
 The KleverKey Zapier app uses this
endpoint.

## Path parameters

- `organizationId` integer, required
- `serviceName` string, required

## Request body

- BookingOptions — Booking options Example JSON: <pre> { "useLockActivationLinks": true, "message": "Please use the main door to enter the building. Enjoy your stay.", "userReferenceId": "user-reference-123", "userEmail": "user@example.com", "userName": "Test User", "operationType": 1, "permission": { "$type": "Swissprime.KleverKey.ApiModels.v1.BookingPermissionTimeSlot, Swissprime.KleverKey.ApiModels", "lockIds": "1,2,3", "referenceId": "booking-reference-123", "startDate": "2023-02-02T10:24:19.358Z", "endDate": "2023-02-02T10:24:19.358Z", "permissionOptions": { "isRemoteActivationAllowed": false, "areAllActivationModesAllowed": false } } } </pre>
  - `useLockActivationLinks` boolean — Grants or revokes lock activation links (guest access) if true, else standard users with permissions/invitations will be used
  - `user` BookingUser — OBSOLETE: Use user properties instead
    - `referenceId` string, required
    - `email` string, required
  - `userReferenceId` string, nullable — The user reference ID should be unique - it will be used to map a user when it's email address changes
  - `userEmail` string, nullable
  - `userName` string, nullable — The user name should be a first name and last name if available - it will only be used for lock activation links (guest access)
  - `preventSending` boolean, nullable — Prevents sending of emails or text messages for lock activation links (guest access)
  - `message` string, nullable — The message appears in emails and on the web page that gets displayed for lock activation links (guest access)
  - `operationType` 1 | 2, required — 1 = CreateOrUpdate, 2 = Delete
  - `permission` union, required — The booking permission can be Always, TimeSlot or WeeklyItems
    - BookingPermissionAlways
      - `lockIds` string, required — A comma separated list of lock IDs (e.g. 1,2,3)
      - `referenceId` string, required — The booking reference ID should be unique - it will be used to update or delete existing bookings
      - `permissionOptions` PermissionOptions
        - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
        - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
        - `changedBy` string, nullable — Indicate who changed access of user
    - BookingPermissionTimeSlot
      - `lockIds` string, required — A comma separated list of lock IDs (e.g. 1,2,3)
      - `referenceId` string, required — The booking reference ID should be unique - it will be used to update or delete existing bookings
      - `permissionOptions` PermissionOptions
        - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
        - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
        - `changedBy` string, nullable — Indicate who changed access of user
    - BookingPermissionWeeklyItems
      - `lockIds` string, required — A comma separated list of lock IDs (e.g. 1,2,3)
      - `referenceId` string, required — The booking reference ID should be unique - it will be used to update or delete existing bookings
      - `permissionOptions` PermissionOptions
        - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
        - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
        - `changedBy` string, nullable — Indicate who changed access of user

## Response `200`

OK

- Booking
  - `invitations` Invitation[], nullable
    - `id` integer, required
    - `type` 1 | 3, required — 1 = UserOrganizationJoining, 3 = SmartCardAssignment
    - `status` 1 | 2 | 3 | 4, required — 1 = Pending, 2 = Accepted, 3 = Rejected, 4 = Canceled
    - `data` InvitationData, required
      - `type` 1 | 3, required — 1 = UserOrganizationJoining, 3 = SmartCardAssignment
      - `senderDisplayName` string, required
      - `senderOrganizationName` string, nullable
    - `dateCreated` string, date-time, required
    - `dateUpdated` string, date-time, nullable
    - `receiverEmail` string, nullable
    - `receiver` User
      - `id` integer, required
      - `organizationId` integer, nullable — OBSOLETE: Returns one of the organizations that the user is member of - use OrganizationIds instead
      - `organizationIds` integer[], nullable
      - `email` string, required
      - `firstName` string, required
      - `lastName` string, required
      - `cultureCode` string, nullable
      - `imageId` integer, nullable
      - `displayName` string, required
      - `type` 1 | 2 | 3, required — 1 = Standard, 2 = Managed, 3 = Service
      - `roles` Role[], required — Only populated if a single user has been requested
        - `id` integer, required
        - `name` string, required
        - `displayName` string, required
        - `isDefaultRole` boolean, required
        - `dateCreated` string, date-time, required
        - `dateUpdated` string, date-time
      - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
        - `id` integer, required
        - `name` string, required
        - `locks` union[], required
          - union
            - Lock
              - …
            - LockInfo
              - …
        - `users` User[], required
        - `permissionType` 1 | 2, required — 1 = Always, 2 = TimeProfile
        - `permissionTimeProfile` PermissionTimeProfile
          - `startDate` string, date-time, nullable — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
          - `endDate` string, date-time, nullable — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
          - `repetitionType` 0 | 1, required — 0 = None, 1 = Weekly
          - `items` PermissionTimeProfileItem[], nullable — List of items, Required if RepetitionType == None
            - `startDate` string, date-time, required — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
            - `endDate` string, date-time, required — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
            - `referenceId` string, nullable
          - `weeklyItems` PermissionTimeProfileWeeklyItem[], nullable — List of weekly items, Required if RepetitionType == Weekly
            - `dayOfWeek` integer, required — Day of week starting with Sunday (Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)
            - `startTime` integer, required — Start time in minutes passed since midnight (local time in lock time zone) i.e. 00:00 => 0 or 10:00 => 600
            - `endTime` integer, required — End time in minutes passed since midnight (local time in lock time zone) i.e. 15:00 => 900 or 00:00 => 1440
        - `permissionOptions` PermissionOptions, required
          - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
          - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
          - `changedBy` string, nullable — Indicate who changed access of user
        - `organizationId` integer, required
        - `dateCreated` string, date-time, required
        - `dateUpdated` string, date-time, nullable
    - `organization` Organization, required
      - `id` integer, required
      - `name` string, required
  - `permissions` Permission[], nullable
    - `id` integer, required
    - `lock` union, required
      - Lock
        - `id` integer, required
        - `lockHexId` string, required
        - `organizationId` integer, nullable
        - `gatewayId` integer, nullable
        - `name` string, required
        - `imageId` integer, required
        - `type` 1 | 17 | 18 | 19 | 20 | 255, required — 1 = LockB1, 17 = UZEDH, 18 = UZMTK, 19 = UZRDR, 20 = AutecReader, 255 = Development
        - `physicalState` 0 | 1 | 2 | 3, required — 0 = Unknown, 1 = Open, 2 = Closed, 3 = Locked
        - `properties` 0, required — 0 = None
        - `wirelessModes` 0 | 1 | 2, required — 0 = None, 1 = BLE, 2 = RFID
        - `bleInterfaceVersion` integer, required
        - `openCloseWaitTime` integer, required
        - `state` 0 | 1 | 2 | 4 | 8 | 16 | 32, required — 0 = Undefined, 1 = BatteryLow, 2 = Emergency, 4 = Closed, 8 = Open, 16 = RtcUpdateRequired, 32 = EventAvailable
        - `keyVersion` integer, required
        - `firmwareVersion` integer, required
        - `manufacturerFirmwareVersion` integer, nullable
        - `isFirmwareUpdateAvailable` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `hasLatestFirmware` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `firmwareUpdateState` 0 | 1 | 2 | 3 | 4 — 0 = Idle, 1 = Scheduled, 2 = Started, 3 = Finished, 4 = Failed
        - `firmwareUpdatePreviousVersion` integer, nullable
        - `firmwareUpdateVersion` integer, nullable
        - `firmwareUpdateDateScheduled` string, date-time, nullable
        - `firmwareUpdateDateStarted` string, date-time, nullable
        - `firmwareUpdateProgressInPercent` integer, nullable
        - `firmwareUpdateDateFinished` string, date-time, nullable
        - `firmwareUpdateDateFailed` string, date-time, nullable
        - `firmwareUpdateErrorCode` string, nullable
        - `displayName` string, required
        - `devicePermissionsCount` integer, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `areDevicePermissionSynced` boolean, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
          - `id` integer, required
          - `name` string, required
          - `locks` union[], required
            - union
              - …
          - `users` User[], required
            - `id` integer, required
            - `organizationId` integer, nullable — OBSOLETE: Returns one of the organizations that the user is member of - use OrganizationIds instead
            - `organizationIds` integer[], nullable
            - `email` string, required
            - `firstName` string, required
            - `lastName` string, required
            - `cultureCode` string, nullable
            - `imageId` integer, nullable
            - `displayName` string, required
            - `type` 1 | 2 | 3, required — 1 = Standard, 2 = Managed, 3 = Service
            - `roles` Role[], required — Only populated if a single user has been requested
              - …
            - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
          - `permissionType` 1 | 2, required — 1 = Always, 2 = TimeProfile
          - `permissionTimeProfile` PermissionTimeProfile
            - `startDate` string, date-time, nullable — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
            - `endDate` string, date-time, nullable — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
            - `repetitionType` 0 | 1, required — 0 = None, 1 = Weekly
            - `items` PermissionTimeProfileItem[], nullable — List of items, Required if RepetitionType == None
              - …
            - `weeklyItems` PermissionTimeProfileWeeklyItem[], nullable — List of weekly items, Required if RepetitionType == Weekly
              - …
          - `permissionOptions` PermissionOptions, required
            - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
            - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
            - `changedBy` string, nullable — Indicate who changed access of user
          - `organizationId` integer, required
          - `dateCreated` string, date-time, required
          - `dateUpdated` string, date-time, nullable
        - `hasLocationData` boolean
        - `location` Location
          - `latitude` number, double, required
          - `longitude` number, double, required
          - `accuracy` number, float, required — Accuracy in meters
        - `timezone` string, required
        - `timerConfiguration` TimerConfiguration
          - `weeklyItems` TimerConfigurationWeeklyItem[], nullable
            - `dayOfWeek` integer, required — Day of week starting with Sunday (Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)
            - `time` integer, required — Time in minutes passed since midnight (local time in lock time zone) i.e. 00:00 => 0 or 10:00 => 600
            - `activationType` 3 | 4, required — 3 = Open, 4 = Close
          - `exceptions` TimerConfigurationException[], nullable
            - `startDate` string, date-time, required
            - `numberOfDays` integer, required
        - `smartCardAuthentication` 0 | 1 | 2 | 32, required — 0 = None, 1 = AuthenticationUid, 2 = AuthenticationSecured, 32 = RfidStandardIso14443A
        - `hardwareConfigurationOutside` 0 | 1 | 2 | 3, required — 0 = None, 1 = Knob, 2 = PullBar, 3 = Handle
        - `hardwareConfigurationSelfLockingPanicLock` boolean
        - `powerSource` integer, nullable
        - `powerSourceUpdated` string, date-time, nullable
        - `flashUsage` integer, nullable
        - `dieTemperature` integer, nullable
        - `bleRssi` integer, nullable
        - `bleRssiUpdated` string, date-time, nullable
        - `isConnected` boolean, nullable
        - `dateBatteryChanged` string, date-time, nullable
        - `dateConnected` string, date-time, nullable
        - `dateDisconnected` string, date-time, nullable
        - `dateLastActivity` string, date-time, nullable
        - `weeklyOpeningCount` number, double, nullable
        - `batteryChangeRecommended` boolean
      - LockInfo
        - `id` integer, required
        - `lockHexId` string, required
        - `organizationId` integer, nullable
        - `gatewayId` integer, nullable
        - `name` string, required
        - `imageId` integer, required
        - `type` 1 | 17 | 18 | 19 | 20 | 255, required — 1 = LockB1, 17 = UZEDH, 18 = UZMTK, 19 = UZRDR, 20 = AutecReader, 255 = Development
        - `physicalState` 0 | 1 | 2 | 3, required — 0 = Unknown, 1 = Open, 2 = Closed, 3 = Locked
        - `properties` 0, required — 0 = None
        - `wirelessModes` 0 | 1 | 2, required — 0 = None, 1 = BLE, 2 = RFID
        - `bleInterfaceVersion` integer, required
        - `openCloseWaitTime` integer, required
        - `state` 0 | 1 | 2 | 4 | 8 | 16 | 32, required — 0 = Undefined, 1 = BatteryLow, 2 = Emergency, 4 = Closed, 8 = Open, 16 = RtcUpdateRequired, 32 = EventAvailable
        - `keyVersion` integer, required
        - `firmwareVersion` integer, required
        - `manufacturerFirmwareVersion` integer, nullable
        - `isFirmwareUpdateAvailable` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `hasLatestFirmware` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `firmwareUpdateState` 0 | 1 | 2 | 3 | 4 — 0 = Idle, 1 = Scheduled, 2 = Started, 3 = Finished, 4 = Failed
        - `firmwareUpdatePreviousVersion` integer, nullable
        - `firmwareUpdateVersion` integer, nullable
        - `firmwareUpdateDateScheduled` string, date-time, nullable
        - `firmwareUpdateDateStarted` string, date-time, nullable
        - `firmwareUpdateProgressInPercent` integer, nullable
        - `firmwareUpdateDateFinished` string, date-time, nullable
        - `firmwareUpdateDateFailed` string, date-time, nullable
        - `firmwareUpdateErrorCode` string, nullable
        - `displayName` string, required
        - `devicePermissionsCount` integer, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `areDevicePermissionSynced` boolean, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
        - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
          - `id` integer, required
          - `name` string, required
          - `locks` union[], required
            - union
              - …
          - `users` User[], required
            - `id` integer, required
            - `organizationId` integer, nullable — OBSOLETE: Returns one of the organizations that the user is member of - use OrganizationIds instead
            - `organizationIds` integer[], nullable
            - `email` string, required
            - `firstName` string, required
            - `lastName` string, required
            - `cultureCode` string, nullable
            - `imageId` integer, nullable
            - `displayName` string, required
            - `type` 1 | 2 | 3, required — 1 = Standard, 2 = Managed, 3 = Service
            - `roles` Role[], required — Only populated if a single user has been requested
              - …
            - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
          - `permissionType` 1 | 2, required — 1 = Always, 2 = TimeProfile
          - `permissionTimeProfile` PermissionTimeProfile
            - `startDate` string, date-time, nullable — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
            - `endDate` string, date-time, nullable — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
            - `repetitionType` 0 | 1, required — 0 = None, 1 = Weekly
            - `items` PermissionTimeProfileItem[], nullable — List of items, Required if RepetitionType == None
              - …
            - `weeklyItems` PermissionTimeProfileWeeklyItem[], nullable — List of weekly items, Required if RepetitionType == Weekly
              - …
          - `permissionOptions` PermissionOptions, required
            - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
            - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
            - `changedBy` string, nullable — Indicate who changed access of user
          - `organizationId` integer, required
          - `dateCreated` string, date-time, required
          - `dateUpdated` string, date-time, nullable
        - `hasLocationData` boolean
        - `location` Location
          - `latitude` number, double, required
          - `longitude` number, double, required
          - `accuracy` number, float, required — Accuracy in meters
        - `timezone` string, required
        - `timerConfiguration` TimerConfiguration
          - `weeklyItems` TimerConfigurationWeeklyItem[], nullable
            - `dayOfWeek` integer, required — Day of week starting with Sunday (Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)
            - `time` integer, required — Time in minutes passed since midnight (local time in lock time zone) i.e. 00:00 => 0 or 10:00 => 600
            - `activationType` 3 | 4, required — 3 = Open, 4 = Close
          - `exceptions` TimerConfigurationException[], nullable
            - `startDate` string, date-time, required
            - `numberOfDays` integer, required
        - `smartCardAuthentication` 0 | 1 | 2 | 32, required — 0 = None, 1 = AuthenticationUid, 2 = AuthenticationSecured, 32 = RfidStandardIso14443A
        - `hardwareConfigurationOutside` 0 | 1 | 2 | 3, required — 0 = None, 1 = Knob, 2 = PullBar, 3 = Handle
        - `hardwareConfigurationSelfLockingPanicLock` boolean
        - `powerSource` integer, nullable
        - `powerSourceUpdated` string, date-time, nullable
        - `flashUsage` integer, nullable
        - `dieTemperature` integer, nullable
        - `bleRssi` integer, nullable
        - `bleRssiUpdated` string, date-time, nullable
        - `isConnected` boolean, nullable
        - `dateBatteryChanged` string, date-time, nullable
        - `dateConnected` string, date-time, nullable
        - `dateDisconnected` string, date-time, nullable
        - `dateLastActivity` string, date-time, nullable
        - `weeklyOpeningCount` number, double, nullable
        - `batteryChangeRecommended` boolean
    - `user` User, required
      - `id` integer, required
      - `organizationId` integer, nullable — OBSOLETE: Returns one of the organizations that the user is member of - use OrganizationIds instead
      - `organizationIds` integer[], nullable
      - `email` string, required
      - `firstName` string, required
      - `lastName` string, required
      - `cultureCode` string, nullable
      - `imageId` integer, nullable
      - `displayName` string, required
      - `type` 1 | 2 | 3, required — 1 = Standard, 2 = Managed, 3 = Service
      - `roles` Role[], required — Only populated if a single user has been requested
        - `id` integer, required
        - `name` string, required
        - `displayName` string, required
        - `isDefaultRole` boolean, required
        - `dateCreated` string, date-time, required
        - `dateUpdated` string, date-time
      - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
        - `id` integer, required
        - `name` string, required
        - `locks` union[], required
          - union
            - Lock
              - …
            - LockInfo
              - …
        - `users` User[], required
        - `permissionType` 1 | 2, required — 1 = Always, 2 = TimeProfile
        - `permissionTimeProfile` PermissionTimeProfile
          - `startDate` string, date-time, nullable — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
          - `endDate` string, date-time, nullable — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
          - `repetitionType` 0 | 1, required — 0 = None, 1 = Weekly
          - `items` PermissionTimeProfileItem[], nullable — List of items, Required if RepetitionType == None
            - `startDate` string, date-time, required — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
            - `endDate` string, date-time, required — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
            - `referenceId` string, nullable
          - `weeklyItems` PermissionTimeProfileWeeklyItem[], nullable — List of weekly items, Required if RepetitionType == Weekly
            - `dayOfWeek` integer, required — Day of week starting with Sunday (Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)
            - `startTime` integer, required — Start time in minutes passed since midnight (local time in lock time zone) i.e. 00:00 => 0 or 10:00 => 600
            - `endTime` integer, required — End time in minutes passed since midnight (local time in lock time zone) i.e. 15:00 => 900 or 00:00 => 1440
        - `permissionOptions` PermissionOptions, required
          - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
          - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
          - `changedBy` string, nullable — Indicate who changed access of user
        - `organizationId` integer, required
        - `dateCreated` string, date-time, required
        - `dateUpdated` string, date-time, nullable
    - `permissionTypeSet` 1 | 2 — 1 = Always, 2 = TimeProfile
    - `permissionTypeRequested` 1 | 2 — 1 = Always, 2 = TimeProfile
    - `permissionTimeProfileSet` PermissionTimeProfile
      - `startDate` string, date-time, nullable — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
      - `endDate` string, date-time, nullable — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
      - `repetitionType` 0 | 1, required — 0 = None, 1 = Weekly
      - `items` PermissionTimeProfileItem[], nullable — List of items, Required if RepetitionType == None
        - `startDate` string, date-time, required — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
        - `endDate` string, date-time, required — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
        - `referenceId` string, nullable
      - `weeklyItems` PermissionTimeProfileWeeklyItem[], nullable — List of weekly items, Required if RepetitionType == Weekly
        - `dayOfWeek` integer, required — Day of week starting with Sunday (Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)
        - `startTime` integer, required — Start time in minutes passed since midnight (local time in lock time zone) i.e. 00:00 => 0 or 10:00 => 600
        - `endTime` integer, required — End time in minutes passed since midnight (local time in lock time zone) i.e. 15:00 => 900 or 00:00 => 1440
    - `permissionTimeProfileRequested` PermissionTimeProfile
      - `startDate` string, date-time, nullable — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
      - `endDate` string, date-time, nullable — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
      - `repetitionType` 0 | 1, required — 0 = None, 1 = Weekly
      - `items` PermissionTimeProfileItem[], nullable — List of items, Required if RepetitionType == None
        - `startDate` string, date-time, required — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
        - `endDate` string, date-time, required — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
        - `referenceId` string, nullable
      - `weeklyItems` PermissionTimeProfileWeeklyItem[], nullable — List of weekly items, Required if RepetitionType == Weekly
        - `dayOfWeek` integer, required — Day of week starting with Sunday (Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)
        - `startTime` integer, required — Start time in minutes passed since midnight (local time in lock time zone) i.e. 00:00 => 0 or 10:00 => 600
        - `endTime` integer, required — End time in minutes passed since midnight (local time in lock time zone) i.e. 15:00 => 900 or 00:00 => 1440
    - `permissionOptionsSet` PermissionOptions
      - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
      - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
      - `changedBy` string, nullable — Indicate who changed access of user
    - `permissionOptionsRequested` PermissionOptions
      - `isRemoteActivationAllowed` boolean — Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)
      - `areAllActivationModesAllowed` boolean — Allow a user to open and close locks also in office mode (locks stay open or closed after activation)
      - `changedBy` string, nullable — Indicate who changed access of user
    - `permissionStatus` 1 | 2 | 3 | 4, required — 1 = GrantPending, 2 = Active, 3 = RevokePending, 4 = Expired
    - `lockName` string, nullable — User defined custom name of the lock
    - `isNotificationEnabled` boolean, required — Notifications (e.g. activities) are activated
    - `isSynced` boolean — Permission is synchronized with lock for all devices
    - `displayName` string, required
    - `dateCreated` string, date-time, required
    - `dateUpdated` string, date-time, nullable
    - `dateGranted` string, date-time, nullable
  - `lockActivationLinks` LockActivationLink[], nullable
    - `id` integer, required
    - `referenceId` string, nullable
    - `locks` union[], required
      - union
        - Lock
          - `id` integer, required
          - `lockHexId` string, required
          - `organizationId` integer, nullable
          - `gatewayId` integer, nullable
          - `name` string, required
          - `imageId` integer, required
          - `type` 1 | 17 | 18 | 19 | 20 | 255, required — 1 = LockB1, 17 = UZEDH, 18 = UZMTK, 19 = UZRDR, 20 = AutecReader, 255 = Development
          - `physicalState` 0 | 1 | 2 | 3, required — 0 = Unknown, 1 = Open, 2 = Closed, 3 = Locked
          - `properties` 0, required — 0 = None
          - `wirelessModes` 0 | 1 | 2, required — 0 = None, 1 = BLE, 2 = RFID
          - `bleInterfaceVersion` integer, required
          - `openCloseWaitTime` integer, required
          - `state` 0 | 1 | 2 | 4 | 8 | 16 | 32, required — 0 = Undefined, 1 = BatteryLow, 2 = Emergency, 4 = Closed, 8 = Open, 16 = RtcUpdateRequired, 32 = EventAvailable
          - `keyVersion` integer, required
          - `firmwareVersion` integer, required
          - `manufacturerFirmwareVersion` integer, nullable
          - `isFirmwareUpdateAvailable` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `hasLatestFirmware` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `firmwareUpdateState` 0 | 1 | 2 | 3 | 4 — 0 = Idle, 1 = Scheduled, 2 = Started, 3 = Finished, 4 = Failed
          - `firmwareUpdatePreviousVersion` integer, nullable
          - `firmwareUpdateVersion` integer, nullable
          - `firmwareUpdateDateScheduled` string, date-time, nullable
          - `firmwareUpdateDateStarted` string, date-time, nullable
          - `firmwareUpdateProgressInPercent` integer, nullable
          - `firmwareUpdateDateFinished` string, date-time, nullable
          - `firmwareUpdateDateFailed` string, date-time, nullable
          - `firmwareUpdateErrorCode` string, nullable
          - `displayName` string, required
          - `devicePermissionsCount` integer, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `areDevicePermissionSynced` boolean, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
            - `id` integer, required
            - `name` string, required
            - `locks` union[], required
              - …
            - `users` User[], required
              - …
            - `permissionType` 1 | 2, required — 1 = Always, 2 = TimeProfile
            - `permissionTimeProfile` PermissionTimeProfile
              - …
            - `permissionOptions` PermissionOptions, required
              - …
            - `organizationId` integer, required
            - `dateCreated` string, date-time, required
            - `dateUpdated` string, date-time, nullable
          - `hasLocationData` boolean
          - `location` Location
            - `latitude` number, double, required
            - `longitude` number, double, required
            - `accuracy` number, float, required — Accuracy in meters
          - `timezone` string, required
          - `timerConfiguration` TimerConfiguration
            - `weeklyItems` TimerConfigurationWeeklyItem[], nullable
              - …
            - `exceptions` TimerConfigurationException[], nullable
              - …
          - `smartCardAuthentication` 0 | 1 | 2 | 32, required — 0 = None, 1 = AuthenticationUid, 2 = AuthenticationSecured, 32 = RfidStandardIso14443A
          - `hardwareConfigurationOutside` 0 | 1 | 2 | 3, required — 0 = None, 1 = Knob, 2 = PullBar, 3 = Handle
          - `hardwareConfigurationSelfLockingPanicLock` boolean
          - `powerSource` integer, nullable
          - `powerSourceUpdated` string, date-time, nullable
          - `flashUsage` integer, nullable
          - `dieTemperature` integer, nullable
          - `bleRssi` integer, nullable
          - `bleRssiUpdated` string, date-time, nullable
          - `isConnected` boolean, nullable
          - `dateBatteryChanged` string, date-time, nullable
          - `dateConnected` string, date-time, nullable
          - `dateDisconnected` string, date-time, nullable
          - `dateLastActivity` string, date-time, nullable
          - `weeklyOpeningCount` number, double, nullable
          - `batteryChangeRecommended` boolean
        - LockInfo
          - `id` integer, required
          - `lockHexId` string, required
          - `organizationId` integer, nullable
          - `gatewayId` integer, nullable
          - `name` string, required
          - `imageId` integer, required
          - `type` 1 | 17 | 18 | 19 | 20 | 255, required — 1 = LockB1, 17 = UZEDH, 18 = UZMTK, 19 = UZRDR, 20 = AutecReader, 255 = Development
          - `physicalState` 0 | 1 | 2 | 3, required — 0 = Unknown, 1 = Open, 2 = Closed, 3 = Locked
          - `properties` 0, required — 0 = None
          - `wirelessModes` 0 | 1 | 2, required — 0 = None, 1 = BLE, 2 = RFID
          - `bleInterfaceVersion` integer, required
          - `openCloseWaitTime` integer, required
          - `state` 0 | 1 | 2 | 4 | 8 | 16 | 32, required — 0 = Undefined, 1 = BatteryLow, 2 = Emergency, 4 = Closed, 8 = Open, 16 = RtcUpdateRequired, 32 = EventAvailable
          - `keyVersion` integer, required
          - `firmwareVersion` integer, required
          - `manufacturerFirmwareVersion` integer, nullable
          - `isFirmwareUpdateAvailable` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `hasLatestFirmware` boolean, nullable — Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `firmwareUpdateState` 0 | 1 | 2 | 3 | 4 — 0 = Idle, 1 = Scheduled, 2 = Started, 3 = Finished, 4 = Failed
          - `firmwareUpdatePreviousVersion` integer, nullable
          - `firmwareUpdateVersion` integer, nullable
          - `firmwareUpdateDateScheduled` string, date-time, nullable
          - `firmwareUpdateDateStarted` string, date-time, nullable
          - `firmwareUpdateProgressInPercent` integer, nullable
          - `firmwareUpdateDateFinished` string, date-time, nullable
          - `firmwareUpdateDateFailed` string, date-time, nullable
          - `firmwareUpdateErrorCode` string, nullable
          - `displayName` string, required
          - `devicePermissionsCount` integer, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `areDevicePermissionSynced` boolean, nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree
          - `accessGroups` AccessGroup[], nullable — Only populated for requests to the API endpoint /organizations/{organizationId}/permissions
            - `id` integer, required
            - `name` string, required
            - `locks` union[], required
              - …
            - `users` User[], required
              - …
            - `permissionType` 1 | 2, required — 1 = Always, 2 = TimeProfile
            - `permissionTimeProfile` PermissionTimeProfile
              - …
            - `permissionOptions` PermissionOptions, required
              - …
            - `organizationId` integer, required
            - `dateCreated` string, date-time, required
            - `dateUpdated` string, date-time, nullable
          - `hasLocationData` boolean
          - `location` Location
            - `latitude` number, double, required
            - `longitude` number, double, required
            - `accuracy` number, float, required — Accuracy in meters
          - `timezone` string, required
          - `timerConfiguration` TimerConfiguration
            - `weeklyItems` TimerConfigurationWeeklyItem[], nullable
              - …
            - `exceptions` TimerConfigurationException[], nullable
              - …
          - `smartCardAuthentication` 0 | 1 | 2 | 32, required — 0 = None, 1 = AuthenticationUid, 2 = AuthenticationSecured, 32 = RfidStandardIso14443A
          - `hardwareConfigurationOutside` 0 | 1 | 2 | 3, required — 0 = None, 1 = Knob, 2 = PullBar, 3 = Handle
          - `hardwareConfigurationSelfLockingPanicLock` boolean
          - `powerSource` integer, nullable
          - `powerSourceUpdated` string, date-time, nullable
          - `flashUsage` integer, nullable
          - `dieTemperature` integer, nullable
          - `bleRssi` integer, nullable
          - `bleRssiUpdated` string, date-time, nullable
          - `isConnected` boolean, nullable
          - `dateBatteryChanged` string, date-time, nullable
          - `dateConnected` string, date-time, nullable
          - `dateDisconnected` string, date-time, nullable
          - `dateLastActivity` string, date-time, nullable
          - `weeklyOpeningCount` number, double, nullable
          - `batteryChangeRecommended` boolean
    - `receiverName` string, required
    - `receiverEmailOrPhoneNumber` string, required
    - `message` string, required
    - `permissionType` 1 | 2, required — 1 = Always, 2 = TimeProfile
    - `permissionTimeProfile` PermissionTimeProfile
      - `startDate` string, date-time, nullable — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
      - `endDate` string, date-time, nullable — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None
      - `repetitionType` 0 | 1, required — 0 = None, 1 = Weekly
      - `items` PermissionTimeProfileItem[], nullable — List of items, Required if RepetitionType == None
        - `startDate` string, date-time, required — Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
        - `endDate` string, date-time, required — End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)
        - `referenceId` string, nullable
      - `weeklyItems` PermissionTimeProfileWeeklyItem[], nullable — List of weekly items, Required if RepetitionType == Weekly
        - `dayOfWeek` integer, required — Day of week starting with Sunday (Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)
        - `startTime` integer, required — Start time in minutes passed since midnight (local time in lock time zone) i.e. 00:00 => 0 or 10:00 => 600
        - `endTime` integer, required — End time in minutes passed since midnight (local time in lock time zone) i.e. 15:00 => 900 or 00:00 => 1440
    - `url` string, required
    - `dateCreated` string, date-time, required
    - `dateUpdated` string, date-time, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/kleverkey/apis/kleverkey-api.md) · [All operations](https://skmtc.net/kleverkey/apis/kleverkey-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kleverkey/kleverkey-api/revisions/c65c361917fe/schema)
