{
  "openapi": "3.1.0",
  "info": {
    "title": "Clearooms API",
    "version": "1.0",
    "contact": {
      "name": "Clearooms Technical Team",
      "url": "https://clearooms.com",
      "email": "technical@clearooms.com"
    },
    "termsOfService": "https://clearooms.com/terms",
    "summary": "API for Clearooms Platform",
    "description": "The Clearooms API allows customers to manage bookings, rooms and integrations with external systems.",
    "license": {
      "name": "Proprietary - For Authorized Clearooms Customers Only",
      "url": "https://clearooms.com/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.clearooms.com/api/v1",
      "description": ""
    }
  ],
  "paths": {
    "/activity": {
      "get": {
        "summary": "Get activity",
        "tags": [
          "Activity"
        ],
        "responses": {
          "200": {
            "description": "A bare array, or a paginated object (`data`, `links`, `meta`) when `paginate` is true.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Activity"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Activity"
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "get-activity",
        "description": "Get a log of activity on your organisation's account, newest first. Results are paginated 15 per page when `paginate` is true. Requires the `admin` scope.",
        "parameters": [
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "subject_type[]",
            "description": "Filter by subject class base names, such as `Room`, `Desk`, `Office`, `Organisation` or `User`. `GET /activity/filters` lists the values in use.",
            "style": "form",
            "explode": true
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "subject_id[]",
            "description": "Filter by subject IDs.",
            "style": "form",
            "explode": true
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "in": "query",
            "name": "start_date",
            "description": "The start date to filter by. Only applied when `end_date` is also sent."
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "in": "query",
            "name": "end_date",
            "description": "The end date to filter by, on or after `start_date`. A plain date matches up to midnight at the start of that day."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "paginate",
            "description": "Whether the results should be paginated."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "causer_id[]",
            "description": "Filter by causer IDs, usually user IDs.",
            "style": "form",
            "explode": true
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "causer_type[]",
            "description": "Filter by causer class base names, usually `User`.",
            "style": "form",
            "explode": true
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "source[]",
            "description": "Filter by source, matched against `properties.extra` or `properties.method`.",
            "style": "form",
            "explode": true
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "my_changes",
                "security",
                "destructive"
              ]
            },
            "in": "query",
            "name": "category",
            "description": "Filter by category."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "description": "Search terms. Matches properties, description, subject type, causer name and subject name."
          }
        ]
      }
    },
    "/assets": {
      "get": {
        "summary": "Get assets",
        "tags": [
          "Assets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Asset"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "get-assets",
        "description": "Get your organisation's assets, such as office floor plans. Requires one of these scopes: `read`, `assets.read`.",
        "parameters": [
          {
            "name": "ids[]",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 200,
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Only return the assets with these IDs. Up to 200."
          }
        ]
      },
      "post": {
        "summary": "Create an asset",
        "tags": [
          "Assets"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "post-assets",
        "description": "Store a new asset, such as an office floor plan, against your organisation. A PDF is converted to a JPEG image. Requires the `write` scope.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "content"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file. Accepted types by default: `jpeg`, `bmp`, `png`, `gif`, `svg`, `pdf`.\n\nMaximum size `5000KB` by default.\n\nA PDF must convert to an image no larger than `5000px` x `3000px`."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Second floor",
                    "content": "(binary file)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/assets/{assetId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "assetId",
          "in": "path",
          "required": true,
          "description": "The ID of the asset"
        }
      ],
      "get": {
        "summary": "Get an asset",
        "tags": [
          "Assets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "get-assets-assetId",
        "description": "Get a single asset from your organisation, such as an office floor plan. Requires one of these scopes: `read`, `assets.read`."
      },
      "delete": {
        "summary": "Delete an asset",
        "tags": [
          "Assets"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "delete-assets-assetId",
        "description": "Delete an asset from your organisation, along with its stored file. Requires the `write` scope."
      }
    },
    "/attributes": {
      "get": {
        "summary": "Get attributes",
        "tags": [
          "Users"
        ],
        "operationId": "get-attributes",
        "description": "Get the user-applicable attributes for your organisation. Requires one of these scopes: `settings.users.manage`, `office.attendance.view`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Attribute"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      },
      "post": {
        "summary": "Create an attribute",
        "tags": [
          "Users"
        ],
        "operationId": "post-attributes",
        "description": "Create a new user-applicable attribute. Requires the `settings.users.manage` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/AttributeRequestBody"
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attribute"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error."
          }
        }
      }
    },
    "/attributes/{attributeId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "attributeId",
          "in": "path",
          "required": true,
          "description": "The ID of the attribute"
        }
      ],
      "get": {
        "summary": "Get an attribute",
        "tags": [
          "Users"
        ],
        "operationId": "get-attributes-attributeId",
        "description": "Get the user attribute given by `{attributeId}`. Requires the `settings.users.manage` scope.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attribute"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "The attribute does not exist or belongs to another organisation."
          }
        }
      },
      "put": {
        "summary": "Update an attribute",
        "tags": [
          "Users"
        ],
        "operationId": "put-attributes-attributeId",
        "description": "Update the user attribute given by `{attributeId}`. Requires the `settings.users.manage` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/AttributeRequestBody"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attribute"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "The attribute does not exist or belongs to another organisation."
          },
          "422": {
            "description": "Validation error."
          }
        }
      },
      "delete": {
        "summary": "Delete an attribute",
        "tags": [
          "Users"
        ],
        "operationId": "delete-attributes-attributeId",
        "description": "Delete the attribute given by `{attributeId}`.\n\nThis will not delete any users to whom the attribute is assigned. Requires the `settings.users.manage` scope.",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "The attribute does not exist or belongs to another organisation."
          }
        }
      }
    },
    "/bookings": {
      "get": {
        "summary": "Get bookings",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "A list of bookings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Booking"
                      },
                      {
                        "$ref": "#/components/schemas/MinimisedBooking",
                        "description": "Returned if the `minimised` header is `true`."
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "get-bookings",
        "description": "Get the bookings in your organisation for a day or a date range. Bookings in disabled offices are left out unless you are an admin.\n\nGive `date` for a single day, `date` and `end_date` for a range, or `active_at_date` for every booking that overlaps that day.\n\nRequires one of these scopes: `bookings.view`, `parking.view`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "in": "query",
            "name": "date",
            "description": "**Required if** `active_at_date` is not set. The day to search, or the start of the range if `end_date` is set."
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "in": "query",
            "name": "end_date",
            "description": "The last day of the range to search. Bookings that start on or before the end of this day are included."
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "in": "query",
            "name": "active_at_date",
            "description": "**Required if** `date` is not set. Returns every booking that overlaps this day. Takes priority over `date` and `end_date`."
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "office_id",
            "description": "The ID of the office by which to filter."
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "desk_id",
            "description": "The ID of the desk by which to filter."
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "team_id",
            "description": "Only return bookings for members of this team."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "order_by_last_name",
            "description": "Sort the bookings by the user's last name in this direction."
          }
        ]
      },
      "post": {
        "summary": "Create a booking",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "201": {
            "description": "The first booking created, followed by any linked booking. With the `minimised` header, only the first booking.\n\nIf a linked booking could not be made, the response also has a `warnings` key. Because of how it is added, the list then comes back as an object with keys `\"0\"`, `\"1\"` and so on, plus `warnings`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Booking"
                          },
                          {
                            "$ref": "#/components/schemas/MinimisedBooking",
                            "description": "Returned if the `minimised` header is `true`."
                          }
                        ]
                      }
                    },
                    {
                      "type": "object",
                      "description": "Returned when there are warnings.",
                      "additionalProperties": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Booking"
                          },
                          {
                            "$ref": "#/components/schemas/MinimisedBooking",
                            "description": "Returned if the `minimised` header is `true`."
                          }
                        ]
                      },
                      "properties": {
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "parking_booking_failed",
                                  "desk_booking_failed"
                                ]
                              },
                              "message": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error, or \"No valid booking dates found.\" if none of the dates are available."
          }
        },
        "operationId": "post-bookings",
        "description": "Book a desk or parking space for one or more dates.\n\nGive `date` and `end_date` for a booking over consecutive days (one booking per day, at the same times each day), or `dates` for a list of specific slots. More than one date creates a repeating series. Only the dates that pass the availability checks are booked; the request fails with `422` if none do. The first booking is created straight away and the rest of a series is created after the response is sent.\n\nSet `also_book_car_parking` when booking a desk, or `also_book_desk` when booking a parking space, to book a linked space of the other type at the same time. If no space is free, the main booking is still made and a warning is returned.\n\nRequires one of these scopes: `bookings.create.own`, `bookings.create.guests`, `bookings.create.others`, `bookings.edit.others`, `bookings.manage.team`, `parking.create.own`, `parking.create.guests`, `parking.create.others`, `parking.edit.others`, `parking.manage.team`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "desk_id"
                ],
                "properties": {
                  "desk_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the desk or parking space to book."
                  },
                  "date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "**Required if** `dates` is not given. The start of the booking. The time is ignored if `all_day` is `true`, or replaced with the shift's start time if `shift_id` is set."
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "**Required if** `all_day` is not `true` and `dates` is not given. The end of the booking. If it is on a later day than `date`, one booking is made per day."
                  },
                  "all_day": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the booking should last all day according to the office's working hours."
                  },
                  "dates": {
                    "type": "array",
                    "description": "A list of specific slots to book, used instead of `date` and `end_date`. Each slot must be on a different day.",
                    "items": {
                      "type": "object",
                      "required": [
                        "start",
                        "end"
                      ],
                      "properties": {
                        "start": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The start of the slot."
                        },
                        "end": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The end of the slot. Must be after `start`."
                        }
                      }
                    }
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The ID of the user the booking is for. If neither this nor `guest_name` is given, the booking is for the authenticated user. If given, `guest_name` and `guest_email` are ignored."
                  },
                  "guest_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "If the booking is for a guest, their name."
                  },
                  "guest_email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "description": "If the booking is for a guest, their email address."
                  },
                  "shift_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Book for this shift. The start and end times are taken from the shift, which must belong to one of the office's active shift groups, and shift booking must be enabled for the office. When `dates` is given, each slot must match the shift's times."
                  },
                  "repeat": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9,
                    "description": "Validated but not used."
                  },
                  "book_all_available": {
                    "type": "boolean",
                    "description": "If `true`, skip the custom field, archived user and availability checks so that unavailable dates are dropped instead of failing the request."
                  },
                  "custom_fields": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Values keyed by field ID."
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "value": {}
                          }
                        },
                        "description": "A list of field IDs and values."
                      }
                    ],
                    "description": "Values for the custom fields on the desk. Use the keyed form: required and restricted-value fields are only checked against keys, so a required field given in the list form fails validation."
                  },
                  "vehicle_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Vehicles to attach. Only allowed when booking a parking space. Each must be one of the user's vehicles or a pool car they can use (for a guest booking, the authenticated user's)."
                  },
                  "guest_vehicle_registration": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "A one-off vehicle registration for a guest booking of a parking space. It is not saved to anyone's profile."
                  },
                  "parking_permit_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Parking permits to attach. Only allowed when booking a parking space; each must be a valid permit held by the user. If the space requires a permit type, the user must hold one unless the office does not enforce permits."
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50,
                    "description": "The channel the booking was made through, recorded in its activity log: `mobile`, `api`, `zapier` or `desk-qr`. Other values are ignored. The `X-Source-System` header takes priority."
                  },
                  "also_book_car_parking": {
                    "type": "boolean",
                    "description": "When booking a desk, also book a free parking space for the same times. Not allowed when booking a parking space."
                  },
                  "parking_desk_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "With `also_book_car_parking`, the parking space to try first. Not validated."
                  },
                  "parking_resource_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "With `also_book_car_parking`, only pick a parking space with this desk resource."
                  },
                  "parking_vehicle_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "With `also_book_car_parking`, vehicles to attach to the parking booking. Checked in the same way as `vehicle_ids`."
                  },
                  "parking_guest_vehicle_registration": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "With `also_book_car_parking` on a guest booking, a one-off registration for the parking booking."
                  },
                  "parking_custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "With `also_book_car_parking`, values for the parking space custom fields, keyed by field ID."
                  },
                  "also_book_desk": {
                    "type": "boolean",
                    "description": "When booking a parking space, also book a free desk for the same times. Not allowed when booking a desk."
                  },
                  "desk_desk_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "With `also_book_desk`, the desk to try first. Not validated."
                  },
                  "desk_resource_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "With `also_book_desk`, only pick a desk with this desk resource."
                  },
                  "desk_custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "With `also_book_desk`, values for the desk custom fields, keyed by field ID."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "desk_id": "b58d2e77-a2a3-4419-b34e-dc70b7797629",
                    "date": "2026-11-02 09:00:00",
                    "end_date": "2026-11-02 17:30:00",
                    "all_day": false,
                    "custom_fields": {
                      "4f1c2a9e-8b7d-4c3e-9a61-2d5e8f0b7c34": "Project Falcon"
                    },
                    "also_book_car_parking": true
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          }
        ]
      }
    },
    "/bookings/{bookingId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "bookingId",
          "in": "path",
          "required": true,
          "description": "The ID of the booking"
        }
      ],
      "delete": {
        "summary": "Delete a booking",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "delete-bookings-id",
        "description": "Cancel the booking given by `{bookingId}`, along with any bookings linked to it.\n\nRequires one of these scopes: `bookings.create.own`, `bookings.create.guests`, `bookings.create.others`, `bookings.delete.others`, `bookings.manage.team`, `parking.create.own`, `parking.create.guests`, `parking.create.others`, `parking.delete.others`, `parking.manage.team`.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cancellation_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The ID of one of your organisation's active cancellation reasons for this type of desk, or `other`. **Required if** the office requires a cancellation reason (see `cancellation_reason_policy` on the booking)."
                  },
                  "cancellation_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "**Required if** `cancellation_reason` is `other` or a reason that requires a note."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "cancellation_reason": "other",
                    "cancellation_note": "Working from home that day."
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update a booking",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BookingResponse"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "put-bookings-bookingId",
        "description": "Update the times, desk or shift of the booking given by `{bookingId}`. The new times are checked for availability.\n\n`all_day` is always written, so leaving it out makes an all-day booking a timed one.\n\nRequires one of these scopes: `bookings.create.own`, `bookings.create.guests`, `bookings.create.others`, `bookings.edit.others`, `bookings.manage.team`, `parking.create.own`, `parking.create.guests`, `parking.create.others`, `parking.edit.others`, `parking.manage.team`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The new start of the booking."
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "**Required if** `all_day` is not `true`. The new end of the booking."
                  },
                  "all_day": {
                    "type": "boolean",
                    "description": "Whether the booking is all day as defined by the office's working hours."
                  },
                  "desk_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "If changing the desk, the ID of the new desk."
                  },
                  "shift_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "If changing the shift, the ID of the new shift, or `null` to remove it. The booking's times must match the new shift's times."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "date": "2026-11-03 09:00:00",
                    "end_date": "2026-11-03 13:00:00",
                    "all_day": false
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get a booking",
        "operationId": "get-bookings-bookingId",
        "description": "Get the booking given by `{bookingId}` with its desk, office, user, vehicles, parking permits and activity. The booking must belong to your organisation; no extra scope is checked.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the booking"
          }
        ]
      }
    },
    "/bookings/{bookingId}/future": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "bookingId",
          "in": "path",
          "required": true,
          "description": "The ID of the booking"
        }
      ],
      "delete": {
        "summary": "Delete future bookings",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "delete-bookings-id-future",
        "description": "Cancel the booking given by `{bookingId}` and every later booking in its series, along with any bookings linked to them. If the booking is not part of a series, only it is cancelled. The user the booking is for is sent a notification.\n\nRequires authentication only; no specific scope is checked.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cancellation_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The ID of one of your organisation's active cancellation reasons for this type of desk, or `other`. **Required if** the office requires a cancellation reason (see `cancellation_reason_policy` on the booking)."
                  },
                  "cancellation_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "**Required if** `cancellation_reason` is `other` or a reason that requires a note."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "cancellation_reason": "other",
                    "cancellation_note": "Working from home that day."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/desks": {
      "post": {
        "summary": "Create a desk",
        "tags": [
          "Desks"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Desk"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "post-desks",
        "description": "Create a desk or parking space. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "position_x",
                  "position_y",
                  "office_id"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "The name of the desk."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ],
                    "default": "desk"
                  },
                  "position_x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "The x-coordinate on the office's floor plan, as a percentage of its width."
                  },
                  "position_y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "The y-coordinate on the office's floor plan, as a percentage of its height."
                  },
                  "absolute_x": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "absolute_y": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "office_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The office where the desk is situated."
                  },
                  "external_system": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000,
                    "description": "Any notes that apply to the desk."
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Assigns the desk to a user. Read by the controller but not validated."
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Assigns the desk to a team. Read by the controller but not validated."
                  },
                  "required_parking_permit_type_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Replaces the parking permit types required to book this parking space. Ignored when `required_parking_permit_types` is sent."
                  },
                  "required_parking_permit_types": {
                    "type": "array",
                    "description": "Replaces the parking permit types required to book this parking space, with optional notes.",
                    "items": {
                      "type": "object",
                      "required": [
                        "id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "notes": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Desk 12",
                    "type": "desk",
                    "position_x": 42.5,
                    "position_y": 18.25,
                    "office_id": "4082f5a9-3688-47bd-93ab-82c493dae5ce",
                    "notes": "Next to the window"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List desks",
        "description": "List the organisation's desks. Parking spaces are left out unless parking is enabled. With `date` and `office_id`, returns the office's desks with their availability for that day. Requires the `bookings.view` scope.",
        "operationId": "get-desks",
        "tags": [
          "Desks"
        ],
        "parameters": [
          {
            "name": "office_id",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            },
            "description": "Only return desks in this office. Required when `date` is sent."
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Only return this kind of desk."
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Return availability for this date instead. Requires `office_id`. `search`, sorting and pagination are ignored."
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Filter by desk, office, user or team name."
          },
          {
            "name": "sort_field",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "desk",
                "office",
                "team",
                "user",
                null
              ]
            },
            "description": "The field to sort by."
          },
          {
            "name": "sort_direction",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "asc",
                "desc",
                null
              ]
            },
            "description": "The sort direction."
          },
          {
            "name": "paginate",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Return 10 desks per page."
          },
          {
            "name": "expands",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Accepted but not used by this endpoint."
          },
          {
            "name": "minimised",
            "in": "header",
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "description": "With `date`, send `true` to receive minimised desks."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Desk"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Desk"
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/DeskWithAvailability"
                          },
                          {
                            "$ref": "#/components/schemas/MiniminsedDeskWithAvailability"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "put": {
        "summary": "Update several desks",
        "description": "Set the allocations of several desks at once. If `allocations` is omitted, existing allocations on the desks are removed. All desks must be in your organisation. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "put-desks",
        "tags": [
          "Desks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "desks"
                ],
                "properties": {
                  "desks": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "allocations": {
                    "type": "array",
                    "description": "If sent and not empty, `user_id` and `team_id` are cleared.",
                    "items": {
                      "type": "object",
                      "description": "One allocation. Set one of `user_id`, `team_id` or `guests`.",
                      "properties": {
                        "user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "team_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "guests": {
                          "description": "Any non-null value creates a guest allocation."
                        },
                        "days": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "mon",
                              "tue",
                              "wed",
                              "thu",
                              "fri",
                              "sat",
                              "sun"
                            ]
                          }
                        },
                        "priority_settings": {},
                        "start_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "end_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "locations": {
                          "type": "array",
                          "description": "Team allocations only.",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "auto_book": {
                          "type": "object",
                          "description": "User allocations only, and only when the desk has a single user allocation.",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "mode": {
                              "type": "string"
                            },
                            "start_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "window_amount": {
                              "type": "integer"
                            },
                            "window_unit": {
                              "type": "string"
                            },
                            "end_date": {
                              "type": "string",
                              "format": "date"
                            },
                            "horizon_cap_at_end_date": {
                              "type": "boolean"
                            },
                            "respect_non_working_days": {
                              "type": "boolean"
                            },
                            "conflict_strategy": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The user to assign the desks to."
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The team to assign the desks to."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "desks": [
                      "8a7b6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d"
                    ],
                    "allocations": [
                      {
                        "user_id": "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a",
                        "team_id": null,
                        "days": [
                          "mon",
                          "wed",
                          "fri"
                        ],
                        "start_date": "2026-11-02",
                        "end_date": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete several desks",
        "description": "Delete several desks at once. All desks must be in your organisation. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "delete-desks",
        "tags": [
          "Desks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "desks"
                ],
                "properties": {
                  "desks": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "desks": [
                      "8a7b6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
                      "9b8c7d6e-5f4a-4b3c-8d2e-1f0a9b8c7d6e"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/desks/{deskId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "deskId",
          "in": "path",
          "required": true,
          "description": "The ID of the desk"
        }
      ],
      "get": {
        "summary": "Get a desk",
        "tags": [
          "Desks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Desk"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "get-desks-id",
        "description": "Get the desk given by `{deskId}`. No scope is required, but you must be allowed to view the desk."
      },
      "put": {
        "summary": "Update a desk",
        "tags": [
          "Desks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Desk"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "put-desks-deskId",
        "description": "Update the desk given by `{deskId}`. Sending `allocations` replaces all user, team and guest allocations and clears `user_id` and `team_id`; sending `user_id` or `team_id` removes all allocations. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "position_x",
                  "position_y"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ]
                  },
                  "position_x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "The x-coordinate on the office's floor plan, as a percentage of its width."
                  },
                  "position_y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "The y-coordinate on the office's floor plan, as a percentage of its height."
                  },
                  "absolute_x": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "absolute_y": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Assigns the desk to a user. Read by the controller but not validated."
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Assigns the desk to a team. Read by the controller but not validated."
                  },
                  "allocations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "description": "One allocation. Set exactly one of `user_id`, `team_id` or `guests`.",
                      "properties": {
                        "user_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "Allocates the desk to this user. Read by the controller but not validated."
                        },
                        "team_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "Allocates the desk to this team. Read by the controller but not validated; send `null` for user and guest allocations."
                        },
                        "guests": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "Any non-null value allocates the desk to guests. Read by the controller but not validated."
                        },
                        "days": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "mon",
                              "tue",
                              "wed",
                              "thu",
                              "fri",
                              "sat",
                              "sun"
                            ]
                          },
                          "description": "The weekdays the allocation applies on. Read by the controller but not validated."
                        },
                        "priority_settings": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "$ref": "#/components/schemas/DeskAllocationPrioritySetting"
                          },
                          "description": "Read by the controller but not validated."
                        },
                        "locations": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Team allocations only. Read by the controller but not validated."
                        },
                        "start_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "end_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date",
                          "description": "Must be on or after `start_date`."
                        },
                        "auto_book": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "User allocations only. Ignored unless this is the only user allocation.",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "mode": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "fixed",
                                "rolling",
                                null
                              ]
                            },
                            "start_date": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date"
                            },
                            "window_amount": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 1,
                              "maximum": 520
                            },
                            "window_unit": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "week",
                                "month",
                                "year",
                                null
                              ]
                            },
                            "end_date": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date"
                            },
                            "horizon_cap_at_end_date": {
                              "type": "boolean",
                              "default": false
                            },
                            "respect_non_working_days": {
                              "type": "boolean",
                              "default": true
                            },
                            "conflict_strategy": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "skip",
                                null
                              ],
                              "default": "skip"
                            }
                          }
                        }
                      }
                    }
                  },
                  "auto_book_disable_action": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "keep",
                      "remove",
                      null
                    ],
                    "description": "What to do with existing auto-bookings when auto-book is turned off: `keep` them, or `remove` them in the background."
                  },
                  "required_parking_permit_type_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Replaces the parking permit types required to book this parking space. Ignored when `required_parking_permit_types` is sent."
                  },
                  "required_parking_permit_types": {
                    "type": "array",
                    "description": "Replaces the parking permit types required to book this parking space, with optional notes.",
                    "items": {
                      "type": "object",
                      "required": [
                        "id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "notes": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 255
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Desk 12",
                    "position_x": 42.5,
                    "position_y": 18.25,
                    "notes": null,
                    "allocations": [
                      {
                        "user_id": "3c8e2f6a-1d4b-4e9a-8f7c-2b5d6e1a9c04",
                        "team_id": null,
                        "days": [
                          "mon",
                          "tue",
                          "wed"
                        ],
                        "priority_settings": null,
                        "start_date": "2026-11-02",
                        "end_date": null
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a desk",
        "tags": [
          "Desks"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "delete-desks-deskId",
        "description": "Delete the desk given by `{deskId}`, and clean up any OpenSpaces configuration for it. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`."
      }
    },
    "/desks/{deskId}/resources/{deskResourceId}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "deskId",
          "in": "path",
          "required": true,
          "description": "The ID of the desk"
        },
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "deskResourceId",
          "in": "path",
          "required": true,
          "description": "The ID of the desk resource"
        }
      ],
      "put": {
        "summary": "Attach a desk resource to a desk",
        "tags": [
          "Desks"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "The resource type does not match the desk type."
          }
        },
        "operationId": "put-desks-deskId-resources-deskResourceId",
        "description": "Attach the desk resource given by `{deskResourceId}` to the desk given by `{deskId}`. The resource's `type` must match the desk's. Requires the `settings.edit` scope."
      },
      "delete": {
        "summary": "Detach a desk resource from a desk",
        "tags": [
          "Desks"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "delete-desks-deskId-resources-deskResourceId",
        "description": "Detach the desk resource given by `{deskResourceId}` from the desk given by `{deskId}`. Requires the `settings.edit` scope."
      }
    },
    "/desks/availability": {
      "get": {
        "summary": "Get desk availability by date",
        "tags": [
          "Desks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeskAvailabilityByDate"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "get-desks-availability",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "desk_id",
            "required": true,
            "description": "The ID of the desk."
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "in": "query",
            "name": "from",
            "required": true,
            "description": "The first date to check."
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "in": "query",
            "name": "to",
            "required": true,
            "description": "The last date to check."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "startTime",
            "description": "The start time on each date, format `HH:mm`. Defaults to the start of working hours. Read by the controller but not validated."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "endTime",
            "description": "The end time on each date, format `HH:mm`. Defaults to the end of working hours. Read by the controller but not validated."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "date"
              }
            },
            "in": "query",
            "name": "selectedDates[]",
            "style": "form",
            "explode": true,
            "description": "Dates already chosen for this booking. Once one of these passes, it is counted when checking the dates after it."
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "user_id",
            "description": "The user to check for. Defaults to the authenticated user."
          },
          {
            "schema": {
              "type": "boolean",
              "default": false
            },
            "in": "query",
            "name": "guest",
            "description": "Whether the booking is for a guest."
          }
        ],
        "description": "Check whether the desk given by `desk_id` can be booked on each date from `from` to `to`, using the office's working hours unless `startTime` and `endTime` are given. Parking spaces are checked against parking limits. Requires the `bookings.view` scope."
      }
    },
    "/desk-resources": {
      "get": {
        "summary": "Get desk resources",
        "tags": [
          "Desks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeskResource"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "operationId": "get-desk-resources",
        "description": "Get the desk resources for your organisation, with the number of matching desks each is attached to. Requires the `read` scope.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Only return resources of this type."
          }
        ]
      },
      "post": {
        "summary": "Create a desk resource",
        "tags": [
          "Desks"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskResource"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "post-desk-resources",
        "description": "Create a new desk resource. Requires the `settings.edit` scope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ],
                    "description": "The kind of desk the resource can be attached to."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Height-adjustable desk",
                    "type": "desk"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/desk-resources/{id}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The ID of the desk resource"
        }
      ],
      "get": {
        "summary": "Get a desk resource",
        "tags": [
          "Desks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskResource"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "get-desk-resources-id",
        "description": "Get the desk resource given by `{id}`. Requires the `read` scope."
      },
      "put": {
        "summary": "Update a desk resource",
        "tags": [
          "Desks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskResource"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "put-desk-resources-id",
        "description": "Update the desk resource given by `{id}`. Requires the `settings.edit` scope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ],
                    "description": "The kind of desk the resource can be attached to."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Height-adjustable desk",
                    "type": "desk"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a desk resource",
        "tags": [
          "Desks"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "delete-desk-resources-id",
        "description": "Delete the desk resource given by `{id}`. It is also detached from any desk it is attached to. Requires the `settings.edit` scope."
      }
    },
    "/devices/{deviceId}/settings": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "deviceId",
          "in": "path",
          "required": true
        }
      ],
      "put": {
        "summary": "Update device-level settings",
        "tags": [
          "Display App"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "put-devices-deviceId-settings",
        "requestBody": {
          "$ref": "#/components/requestBodies/DeviceSettingsRequestBody"
        },
        "description": "Update (or create if none are set) the device-level settings for the Clearooms Display App device given by `{deviceId}`.\n\nReturns `201` if the settings were created and `200` if they were updated. Requires the `settings.edit` scope."
      },
      "delete": {
        "summary": "Delete device-level settings",
        "tags": [
          "Display App"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "delete-devices-deviceId-settings",
        "description": "Delete the device-level settings for the device given by `{deviceId}`, so that it falls back to its room's or organisation's settings. Requires the `settings.edit` scope."
      }
    },
    "/meetings": {
      "get": {
        "summary": "Get meetings",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Meeting"
                      },
                      {
                        "$ref": "#/components/schemas/MinimisedMeeting"
                      }
                    ]
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error, or neither `date` nor both `start_date` and `end_date` were given.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-meetings",
        "description": "Get a list of meetings for your organisation on a date or in a date range.\n\nDates are whole days in UTC, or in the office's timezone if `office_id` is given. The response is not paginated. Set the `minimised` header to `true` to get `MinimisedMeeting` objects. Requires the `meetings.read` scope.",
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2025-05-02"
            },
            "in": "query",
            "name": "date",
            "description": "**Required if** `start_date` is not provided. Return meetings on this day."
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "room_id",
            "description": "Only return meetings in this room."
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "office_id",
            "description": "Only return meetings in this office. The dates are also read in the office's timezone."
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2025-04-25"
            },
            "in": "query",
            "name": "start_date",
            "description": "**Required if** `date` is not provided, or `end_date` is provided. Use this and `end_date` to search a date range. Must not be after `end_date`."
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2025-05-02"
            },
            "in": "query",
            "name": "end_date",
            "description": "**Required if** `start_date` is provided. Must not be before `start_date`."
          }
        ]
      },
      "post": {
        "summary": "Create a meeting",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Meeting"
                      },
                      {
                        "$ref": "#/components/schemas/MinimisedMeeting"
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: you cannot book the room."
          },
          "422": {
            "description": "Validation error."
          },
          "429": {
            "description": "Too many meeting bookings."
          }
        },
        "operationId": "post-meetings",
        "description": "Create a meeting within Clearooms.\n\nGive the room as `room` or as the `rooms` array. Times are in `Y-m-d H:i` format, in the timezones given by `start_time_tz` and `end_time_tz`. The request is rejected with `422` if any room is unavailable under its rules.\n\nThe response is an array of the meetings created. Requires one of these scopes: `meetings.manage`, `meetings.manage.team`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "subject",
                  "private",
                  "start_time",
                  "end_time",
                  "start_time_tz",
                  "end_time_tz"
                ],
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "private": {
                    "type": "boolean",
                    "description": "Whether the meeting is private."
                  },
                  "confirmed": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "start_time": {
                    "type": "string",
                    "example": "2025-05-02 09:00",
                    "description": "Format `Y-m-d H:i`, in the timezone given by `start_time_tz`."
                  },
                  "end_time": {
                    "type": "string",
                    "example": "2025-05-02 10:00",
                    "description": "Format `Y-m-d H:i`, in the timezone given by `end_time_tz`. Must be after `start_time`."
                  },
                  "start_time_tz": {
                    "$ref": "#/components/schemas/Timezone"
                  },
                  "end_time_tz": {
                    "$ref": "#/components/schemas/Timezone"
                  },
                  "theme": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "logo_asset_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "room": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The room to book. **Required if** `rooms` is not provided."
                  },
                  "rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "The rooms to book, as an alternative to `room`. **Required if** `room` is not provided. The first room is treated as the primary room. Each room must belong to your organisation."
                  },
                  "additional_rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Extra rooms to attach to the meeting. Only accepted if the organisation allows multiple rooms per meeting. Every room must be available."
                  },
                  "linked_rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Linked rooms to attach to the meeting. Every room must be available."
                  },
                  "extending_meeting_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The meeting this one extends."
                  },
                  "online_meeting": {
                    "type": "boolean"
                  },
                  "online_meeting_custom_link": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "online_meeting_provider": {
                    "type": "string",
                    "description": "**Required if** `online_meeting` is `true`."
                  },
                  "service_requests": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "service_id",
                        "room_id",
                        "service_items"
                      ],
                      "properties": {
                        "service_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "A service in your organisation that the room and the user are allowed to use."
                        },
                        "room_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "The meeting room the service is delivered to. Must be one of the meeting's rooms. Filled in automatically if the meeting has exactly one room."
                        },
                        "request_notes": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 1000
                        },
                        "purchase_order": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 50,
                          "description": "Required if the organisation makes purchase orders mandatory."
                        },
                        "required_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": "2025-05-02 09:00",
                          "description": "When the service is required. Must fall within the meeting and the service's cut-off limit."
                        },
                        "service_items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "service_item_id"
                            ],
                            "properties": {
                              "service_item_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "An item belonging to the service."
                              },
                              "quantity": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Must be within the item's minimum and maximum quantity."
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000,
                    "description": "If given without `description_html`, it is also used as `description_html`."
                  },
                  "description_html": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000
                  },
                  "dates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "start",
                        "end"
                      ],
                      "properties": {
                        "start": {
                          "type": "string",
                          "description": "Format `Y-m-d H:i`, in the timezone given by `start_time_tz`."
                        },
                        "end": {
                          "type": "string",
                          "description": "Format `Y-m-d H:i`, in the timezone given by `end_time_tz`. Must be after `start`."
                        }
                      }
                    },
                    "description": "Specific dates to book, used with `occurrence_type` `multi`. Each date is checked for availability."
                  },
                  "add_services_to_all_meetings": {
                    "type": "boolean",
                    "description": "For repeat or multi-date meetings, whether to add the service requests to every occurrence."
                  },
                  "attendees": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Not validated, but read when the attendees are saved."
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email",
                          "description": "Not validated, but read when the attendees are saved. Must be a valid email address if given."
                        },
                        "type": {
                          "type": "string",
                          "description": "Not validated, but read when the attendees are saved. For example `ORGANISER`."
                        },
                        "required": {
                          "type": "boolean",
                          "description": "Not validated, but read when the attendees are saved."
                        },
                        "guest": {
                          "type": "boolean"
                        },
                        "attendance_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "in_person",
                            "remote",
                            "unknown",
                            null
                          ]
                        },
                        "clearooms_only": {
                          "type": "boolean",
                          "description": "Record the attendee in Clearooms without sending them a calendar invitation. Ignored unless the room rules allow it."
                        },
                        "external_contact_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "An external contact in your organisation."
                        },
                        "visitor": {
                          "type": "object",
                          "properties": {
                            "user_id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "The employee being visited."
                            },
                            "name": {
                              "type": "string"
                            },
                            "office_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "company": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 255
                            },
                            "email": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "email"
                            },
                            "expected_arrival": {
                              "type": "string"
                            },
                            "car_registration_number": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 255
                            },
                            "locale": {
                              "$ref": "#/components/schemas/UserLocale"
                            },
                            "dates": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "date"
                              },
                              "description": "For repeat visitors, the dates of the visit."
                            },
                            "phone": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 40,
                              "description": "The visitor's phone number."
                            },
                            "visitor_type_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "An ArrivalsHQ visitor type in your organisation."
                            },
                            "send_invite": {
                              "type": "boolean",
                              "default": true,
                              "description": "Whether to email the visitor their invitation."
                            },
                            "booking_location_visible": {
                              "type": "boolean",
                              "default": true,
                              "description": "Whether the visitor is shown where their bookings are on the floor plan."
                            }
                          },
                          "description": "Book this attendee in as a visitor. `user_id`, `name`, `office_id` and `expected_arrival` are required. `company` is required unless your visitor rules hide it; `email`, `car_registration_number` and `locale` are required if your visitor rules make them mandatory."
                        }
                      }
                    }
                  },
                  "custom_fields": {
                    "type": "object",
                    "description": "Custom field values keyed by custom field ID. Custom fields marked as required for the room must be given.",
                    "additionalProperties": {}
                  },
                  "rrule": {
                    "type": "string",
                    "description": "An iCalendar recurrence rule, used with `occurrence_type` `repeat`."
                  },
                  "locations": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 255
                    }
                  },
                  "setup_time": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "**Required if** `setup_time_unit` is provided."
                  },
                  "setup_time_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "minutes",
                      "hours",
                      null
                    ],
                    "description": "**Required if** `setup_time` is provided."
                  },
                  "cleanup_time": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "**Required if** `cleanup_time_unit` is provided."
                  },
                  "cleanup_time_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "minutes",
                      "hours",
                      null
                    ],
                    "description": "**Required if** `cleanup_time` is provided."
                  },
                  "attendee_count": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "The number of people attending. **Required if** the room's `attendee_count_mode` rule is `required`. Must not exceed the room capacity when attendees are limited to capacity."
                  },
                  "occurrence_type": {
                    "type": "string",
                    "enum": [
                      "single",
                      "multi",
                      "repeat"
                    ],
                    "description": "Defaults to `single`."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "subject": "Quarterly planning",
                    "private": false,
                    "start_time": "2025-05-02 09:00",
                    "end_time": "2025-05-02 10:00",
                    "start_time_tz": "Europe/London",
                    "end_time_tz": "Europe/London",
                    "rooms": [
                      "7d2c650c-2c54-45cd-adef-aed8ee267cfd"
                    ],
                    "description": "Agenda to follow.",
                    "online_meeting": false,
                    "attendees": [
                      {
                        "name": "Jane Doe",
                        "email": "jane.doe@example.com",
                        "type": "ORGANISER",
                        "required": true,
                        "attendance_type": "in_person"
                      }
                    ],
                    "occurrence_type": "single"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offices": {
      "get": {
        "summary": "Get offices",
        "tags": [
          "Offices"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Office"
                      },
                      {
                        "$ref": "#/components/schemas/MinimisedOffice"
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "operationId": "get-offices",
        "description": "Get the offices the authenticated user may access, ordered by `order`. `default` is true only for the user's own office. With the `minimised` header set to `true`, each office is a `MinimisedOffice`. Requires the `read` scope.",
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          }
        ]
      },
      "post": {
        "summary": "Create an office",
        "description": "Create an office with default desk limits. Requires one of these scopes: `admin`, `settings.edit`.",
        "operationId": "post-offices",
        "tags": [
          "Offices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "hot_desks_message": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "hot_desks_desks_size": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 60
                  },
                  "plan_icon_sizes": {
                    "type": "object",
                    "properties": {
                      "desks": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 60
                      },
                      "rooms": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 60
                      },
                      "parking_spaces": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 60
                      }
                    }
                  },
                  "default": {
                    "type": "boolean"
                  },
                  "booking_color": {
                    "$ref": "#/components/schemas/HexColour"
                  },
                  "timezone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "restricted": {
                    "type": "boolean"
                  },
                  "building_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "A building in your organisation."
                  },
                  "street_address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required when any other address field is sent."
                  },
                  "address_locality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required when any other address field is sent."
                  },
                  "address_region": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required when any other address field is sent."
                  },
                  "address_country": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required when any other address field is sent."
                  },
                  "postal_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required when any other address field is sent."
                  },
                  "office_notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000
                  },
                  "renderer": {
                    "type": "string",
                    "enum": [
                      "legacy",
                      "v2"
                    ],
                    "description": "The office plan renderer. Forced to `v2` unless the organisation allows the legacy renderer, in which case it defaults to `legacy`."
                  },
                  "geofences": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "latitude",
                        "longitude",
                        "radius_metres"
                      ],
                      "properties": {
                        "latitude": {
                          "type": "number",
                          "minimum": -90,
                          "maximum": 90
                        },
                        "longitude": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "radius_metres": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        }
                      }
                    },
                    "description": "Geofences must not include an `id`."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Main Office",
                    "timezone": "Europe/London",
                    "enabled": true,
                    "restricted": false,
                    "street_address": "1 Example Street",
                    "address_locality": "Southwark",
                    "address_region": "London",
                    "address_country": "United Kingdom",
                    "postal_code": "SE1 1AA"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Office"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "put": {
        "summary": "Reorder offices",
        "description": "Set the display order of several offices at once. Requires the `settings.edit` scope.",
        "operationId": "put-offices",
        "tags": [
          "Offices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "offices"
                ],
                "properties": {
                  "offices": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "order"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "order": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "offices": [
                      {
                        "id": "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c",
                        "order": 0
                      },
                      {
                        "id": "4a2d3b8f-6c5e-4f9b-8d32-8e7f6a5b4c3d",
                        "order": 1
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/offices/{officeId}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "officeId",
          "in": "path",
          "required": true,
          "description": "The ID of the office"
        }
      ],
      "get": {
        "summary": "Get an office",
        "tags": [
          "Offices"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Office"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "get-offices-officeId",
        "description": "Get the office given by `{officeId}`. Requests from the Clearooms Desk Booking mobile app get an older shape without `desk_count`, `car_park_count`, `room_count`, `renderer`, `allow_legacy_renderer`, `plan_max_parking_spaces` and `current_parking_usage`. Requires the `read` scope."
      },
      "put": {
        "summary": "Update an office",
        "tags": [
          "Offices"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Office"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "put-offices-officeId",
        "description": "Update the office given by `{officeId}`. Sending `scheme_asset_id` also marks onboarding as complete for the organisation. Requires one of these scopes: `admin`, `settings.edit`, `settings.edit-office-plan`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "scheme_asset_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The `id` of one of your organisation's assets to use as the floor plan."
                  },
                  "hot_desks_message": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "hot_desks_desks_size": {
                    "$ref": "#/components/schemas/DeskSize"
                  },
                  "plan_icon_sizes": {
                    "type": "object",
                    "required": [
                      "desks",
                      "rooms",
                      "parking_spaces"
                    ],
                    "description": "Also sets `hot_desks_desks_size` to `desks`.",
                    "properties": {
                      "desks": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 60
                      },
                      "rooms": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 60
                      },
                      "parking_spaces": {
                        "type": "integer",
                        "minimum": 10,
                        "maximum": 60
                      }
                    }
                  },
                  "default": {
                    "type": "boolean",
                    "description": "Treated as `false` when not sent. An office that is already the default stays the default."
                  },
                  "booking_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
                    "description": "A hex colour code, `#RRGGBB` or `#RGB`."
                  },
                  "timezone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "An IANA timezone, for example `Europe/London`. Not checked against the timezone list."
                  },
                  "scale_x": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "scale_y": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "unit_system": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "`metric` or `imperial`. Not checked against a list."
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "restricted": {
                    "type": "boolean"
                  },
                  "ip_addresses": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "description": "IPv4 or IPv6 addresses or CIDR ranges. An empty array is stored as `null`.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "building_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The ID of one of your organisation's buildings."
                  },
                  "street_address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if any of `street_address`, `address_locality`, `address_region`, `address_country` and `postal_code` is sent."
                  },
                  "address_locality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if any of `street_address`, `address_locality`, `address_region`, `address_country` and `postal_code` is sent."
                  },
                  "address_region": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if any of `street_address`, `address_locality`, `address_region`, `address_country` and `postal_code` is sent."
                  },
                  "address_country": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if any of `street_address`, `address_locality`, `address_region`, `address_country` and `postal_code` is sent."
                  },
                  "postal_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if any of `street_address`, `address_locality`, `address_region`, `address_country` and `postal_code` is sent."
                  },
                  "office_notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000
                  },
                  "renderer": {
                    "type": "string",
                    "enum": [
                      "legacy",
                      "v2"
                    ],
                    "description": "`legacy` is only allowed when the organisation may use the legacy renderer."
                  },
                  "geofences": {
                    "type": "array",
                    "description": "Replaces the office's geofences. Include `id` to keep an existing one; IDs of the building's geofences are ignored.",
                    "items": {
                      "type": "object",
                      "required": [
                        "latitude",
                        "longitude",
                        "radius_metres"
                      ],
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "latitude": {
                          "type": "number",
                          "minimum": -90,
                          "maximum": 90
                        },
                        "longitude": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "radius_metres": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Samoa",
                    "timezone": "Pacific/Pago_Pago",
                    "hot_desks_desks_size": 33,
                    "plan_icon_sizes": {
                      "desks": 33,
                      "rooms": 40,
                      "parking_spaces": 28
                    },
                    "enabled": true,
                    "restricted": false,
                    "booking_color": "#1E88E5",
                    "renderer": "v2",
                    "geofences": [
                      {
                        "latitude": -14.2756,
                        "longitude": -170.702,
                        "radius_metres": 200
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete an office",
        "tags": [
          "Offices"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "operationId": "delete-offices-officeId",
        "description": "Delete the office given by `{officeId}`. Requires one of these scopes: `admin`, `settings.edit`."
      }
    },
    "/reports": {
      "get": {
        "summary": "Get reports",
        "tags": [
          "Reports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportResource"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "operationId": "get-reports",
        "description": "List your organisation's saved reports. Requires the `reports.view` scope.",
        "parameters": [
          {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ReportType"
              }
            },
            "in": "query",
            "name": "type[]",
            "description": "Filter by report type. Can also be sent as a single `type` value.",
            "style": "form",
            "explode": true
          }
        ]
      },
      "post": {
        "summary": "Schedule a report",
        "tags": [
          "Reports"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResource"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "post-reports",
        "requestBody": {
          "$ref": "#/components/requestBodies/ReportRequestBody"
        },
        "description": "Save a report, optionally on a schedule. Requires the `reports.manage` scope."
      }
    },
    "/reports/{reportId}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "reportId",
          "in": "path",
          "required": true
        }
      ],
      "put": {
        "summary": "Update a scheduled report",
        "tags": [
          "Reports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResource"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "put-reports-reportId",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "fields": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/ReportExternalAttendeeFields"
                      }
                    ],
                    "description": "External attendee reports only. Replaces the existing fields."
                  },
                  "schedule": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/ReportScheduleInput"
                      }
                    ],
                    "description": "External attendee reports only. `no_schedule` removes the schedule."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Visitors this week",
                    "fields": {
                      "period": "this_week",
                      "format": "xlsx",
                      "recipients": [
                        "reception@example.com"
                      ],
                      "filters": {
                        "group_by": "date"
                      }
                    },
                    "schedule": {
                      "type": "weekdays",
                      "time_to_execute": "07:30"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Update the report given by `{reportId}`. Only `name` can be changed on room, desk and parking space reports; `fields` and `schedule` are only applied to `external_attendees` reports. Requires the `reports.manage` scope."
      },
      "delete": {
        "summary": "Delete a scheduled report",
        "tags": [
          "Reports"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "operationId": "delete-reports-reportId",
        "description": "Delete the report given by `{reportId}`. Requires the `reports.manage` scope."
      }
    },
    "/reports/bookings/{from}/{to}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "date",
            "example": "2026-01-26"
          },
          "name": "from",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "string",
            "example": "2026-01-30",
            "format": "date"
          },
          "name": "to",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "boolean",
            "default": false
          },
          "in": "query",
          "name": "paginate",
          "description": "**RECOMMENDED** - Whether to paginate the results (50 per page)",
          "allowEmptyValue": true
        },
        {
          "schema": {
            "type": "integer"
          },
          "in": "query",
          "name": "page",
          "description": "The page number to retrieve when paginating"
        },
        {
          "schema": {
            "type": "boolean",
            "default": false
          },
          "in": "query",
          "name": "showCancelled",
          "description": "Whether to include cancelled bookings in the report",
          "allowEmptyValue": true
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "buildings",
          "allowEmptyValue": true,
          "description": "A list of building IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "desks",
          "allowEmptyValue": true,
          "description": "A list of desk IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "offices",
          "allowEmptyValue": true,
          "description": "A list of office IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "teams",
          "allowEmptyValue": true,
          "description": "A list of team IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "users",
          "allowEmptyValue": true,
          "description": "A list of user IDs by which to filter. Treated as \"all\" if not provided."
        }
      ],
      "get": {
        "summary": "Get a bookings report",
        "tags": [
          "Bookings",
          "Reports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BookingReport"
                      },
                      "description": "Returned without `paginate`."
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BookingReport"
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      },
                      "description": "Returned with `paginate`."
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "operationId": "get-reports-bookings-from-to",
        "description": "Get a report on all bookings that start or end between two dates. Both dates can be the same, to get a single day's bookings.\n\nThe response is paginated (50 per page) whenever the `paginate` parameter is present, whatever its value. Without it, every booking is returned at once.\n\nRequires the `reports.view` scope.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "in": "query",
            "name": "type",
            "description": "Only include bookings of this type of desk."
          }
        ]
      }
    },
    "/reports/bookings/{from}/{to}/csv": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "date",
            "example": "2026-01-26"
          },
          "name": "from",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "string",
            "format": "date",
            "example": "2026-01-30"
          },
          "name": "to",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "boolean",
            "default": false
          },
          "in": "query",
          "name": "paginate",
          "allowEmptyValue": true,
          "description": "**RECOMMENDED** - Whether to paginate the results (50 per page)"
        },
        {
          "schema": {
            "type": "integer"
          },
          "in": "query",
          "name": "page",
          "description": "The page number to retrieve when paginating"
        },
        {
          "schema": {
            "type": "boolean",
            "default": false
          },
          "in": "query",
          "name": "showCancelled",
          "allowEmptyValue": true,
          "description": "Whether to include cancelled bookings in the report"
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "buildings",
          "allowEmptyValue": true,
          "description": "A list of building IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "desks",
          "allowEmptyValue": true,
          "description": "A list of desk IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "offices",
          "allowEmptyValue": true,
          "description": "A list of office IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "teams",
          "allowEmptyValue": true,
          "description": "A list of team IDs by which to filter. Treated as \"all\" if not provided."
        },
        {
          "schema": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": false
          },
          "in": "query",
          "name": "users",
          "allowEmptyValue": true,
          "description": "A list of user IDs by which to filter. Treated as \"all\" if not provided."
        }
      ],
      "get": {
        "summary": "Email a bookings report as CSV",
        "tags": [
          "Bookings",
          "Reports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Always \"Report generation queued\".",
                      "readOnly": true
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "operationId": "get-reports-bookings-from-to-csv",
        "description": "Queue a CSV version of the bookings report and email it to the requesting user. Takes the same filters as the bookings report.\n\nRequires the `reports.view` scope.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "in": "query",
            "name": "type",
            "description": "Only include bookings of this type of desk."
          }
        ]
      }
    },
    "/roles": {
      "get": {
        "summary": "Get roles",
        "tags": [
          "Users"
        ],
        "operationId": "get-roles",
        "description": "Get the roles that can be assigned to users: your organisation's custom roles plus any ready-made default roles whose names they don't override. No specific scope is required.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Role"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a role",
        "tags": [
          "Users"
        ],
        "operationId": "post-roles",
        "description": "Create a role that can be assigned to users. Requires the `roles.manage` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/RoleRequestBody"
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error."
          }
        }
      }
    },
    "/roles/{roleId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "roleId",
          "in": "path",
          "required": true,
          "description": "The ID of the role"
        }
      ],
      "put": {
        "summary": "Update a role",
        "tags": [
          "Users"
        ],
        "operationId": "put-roles-roleId",
        "description": "Update the custom role given by `{roleId}`. Users with the role have their scopes refreshed if the scopes change. Ready-made default roles cannot be updated. Requires the `roles.manage` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/RoleRequestBody"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "The role belongs to another organisation."
          },
          "422": {
            "description": "Validation error, or:\n\n - The role is a ready-made default role\n - You are removing the `roles.manage` scope from a role you have been assigned"
          }
        }
      },
      "delete": {
        "summary": "Delete a role",
        "tags": [
          "Users"
        ],
        "operationId": "delete-roles-roleId",
        "description": "Delete the custom role given by `{roleId}` from your organisation. A role cannot be deleted while any users are assigned to it. Requires the `roles.manage` scope.",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "The role belongs to another organisation."
          },
          "422": {
            "description": "Returned if:\n\n - The role is your organisation's default role\n - The role has assigned users\n - The role is a ready-made default role"
          }
        }
      }
    },
    "/rooms": {
      "get": {
        "summary": "Get rooms",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Room"
                      },
                      {
                        "$ref": "#/components/schemas/DisplayAppRoom"
                      },
                      {
                        "$ref": "#/components/schemas/RoomWithAvailability"
                      },
                      {
                        "$ref": "#/components/schemas/MinimisedRoomWithAvailability"
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "`date` was given and `office_id` was missing or not found."
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "get-rooms",
        "description": "Get a list of rooms belonging to the organisation, ordered by `order`.\n\nIf `date` is given, each room includes its availability for the office's working hours that day, and the response items are `RoomWithAvailability` objects (or `MinimisedRoomWithAvailability` if the `minimised` header is `true`). Otherwise the items are `Room` objects. Requires the `read` scope.",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2025-05-02"
            },
            "in": "query",
            "name": "date",
            "description": "Return the rooms in `office_id` with their availability on this date. `office_id` is required with `date`."
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "office_id",
            "description": "Only return the rooms in this office. **Required if** `date` is provided."
          },
          {
            "schema": {
              "type": "string",
              "example": "boardroom"
            },
            "in": "query",
            "name": "search",
            "description": "Search for rooms by name. Ignored if `date` is provided."
          },
          {
            "$ref": "#/components/parameters/minimised"
          }
        ]
      },
      "post": {
        "summary": "Create a room",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Room"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden: you cannot create rooms in this office."
          },
          "422": {
            "description": "Validation error, or `resource_id` is already used by another room.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "post-rooms",
        "requestBody": {
          "$ref": "#/components/requestBodies/RoomRequestBody"
        },
        "description": "Create a new room. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`."
      }
    },
    "/rooms/{roomId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "roomId",
          "in": "path",
          "required": true,
          "description": "The ID of the room"
        }
      ],
      "get": {
        "summary": "Get a room",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Room"
                    },
                    {
                      "$ref": "#/components/schemas/DisplayAppRoom"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-rooms-roomId",
        "description": "Get the room given by `{roomId}`. Requires the `read` scope."
      },
      "put": {
        "summary": "Update a room",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Room"
                }
              }
            }
          },
          "400": {
            "description": "You tried to change the capacity of a room integrated with a calendar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "put-rooms-roomId",
        "description": "Update the room given by `{roomId}`.\n\nIf `restricted_teams`, `restricted_users` or `restricted_times` is given, it replaces the room's existing list. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "requestBody": {
          "$ref": "#/components/requestBodies/RoomRequestBody"
        }
      },
      "delete": {
        "summary": "Delete a room",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "delete-rooms-roomId",
        "description": "Delete the room given by `{roomId}`. Requires the `settings.edit` scope."
      }
    },
    "/rooms/{roomId}/links": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "roomId",
          "in": "path",
          "required": true,
          "description": "The ID of the room"
        }
      ],
      "get": {
        "summary": "Get linked rooms",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Room"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-rooms-roomId-links",
        "description": "Returns a list of rooms linked to the one given by `{roomId}`. Requires the `settings.edit` scope."
      },
      "post": {
        "summary": "Create a room link",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "Returns an array of the two now-linked rooms.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "minItems": 2,
                  "maxItems": 2,
                  "items": {
                    "$ref": "#/components/schemas/Room"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Returned if:\n\n - The two rooms are in different offices\n - You are trying to link a room to itself\n - The two rooms are already linked to each other"
          }
        },
        "operationId": "post-rooms-roomId-links",
        "description": "Link the room given by `{roomId}` to the one given in the request body, to allow for larger meetings across the two.\n\nUseful if you have multiple adjoined meeting rooms that can be brought together, for example by removing partition walls. Requires the `settings.edit` scope.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "linked_room"
                ],
                "properties": {
                  "linked_room": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the room you wish to link to the one given in the path parameter. Must be in the same office and your organisation."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "linked_room": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rooms/{roomId}/links/{secondRoomId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "roomId",
          "in": "path",
          "required": true,
          "description": "The ID of the first room"
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "secondRoomId",
          "in": "path",
          "required": true,
          "description": "The ID of the second room"
        }
      ],
      "delete": {
        "summary": "Delete a room link",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Returned if:\n\n - The two rooms are already not linked\n - There is a future or ongoing meeting booked across the two rooms"
          }
        },
        "operationId": "delete-rooms-roomId-links-secondRoomId",
        "description": "Unlink the two linked meeting rooms given by `{roomId}` and `{secondRoomId}`. Requires the `settings.edit` scope."
      }
    },
    "/rooms/{roomId}/settings": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "roomId",
          "in": "path",
          "required": true
        }
      ],
      "get": {
        "summary": "Get room-level device settings",
        "tags": [
          "Display App"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-rooms-roomId-settings",
        "description": "Get the room-level device settings for the Clearooms Display App.\n\nIf there are no room-level settings, the organisation-level settings are returned. Requires the `read` scope."
      },
      "put": {
        "summary": "Update room-level device settings",
        "tags": [
          "Display App"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "put-rooms-roomId-settings",
        "description": "Update (or create if none are set) the room-level device settings for the Clearooms Display App.\n\nReturns `201` if the settings were created and `200` if they were updated. Requires the `admin` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/DeviceSettingsRequestBody"
        }
      },
      "delete": {
        "summary": "Delete room-level device settings",
        "tags": [
          "Display App"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "delete-rooms-roomId-settings",
        "description": "Delete the room-level settings for the Clearooms Display App, so that the room falls back to the organisation-level settings. Requires the `admin` scope."
      }
    },
    "/room-resources": {
      "get": {
        "summary": "Get room resources",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoomResource"
                  }
                }
              }
            }
          }
        },
        "operationId": "get-room-resources",
        "description": "Get room resources for your organisation. Requires the `read` scope."
      },
      "post": {
        "summary": "Create a room resource",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "201": {
            "$ref": "#/components/responses/RoomResourceResponse"
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "post-room-resources",
        "description": "Create a new resource that can be attached to rooms. For example a projector or a whiteboard. Requires the `settings.edit` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/RoomResourceRequestBody"
        }
      }
    },
    "/room-resources/{roomResourceId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "roomResourceId",
          "in": "path",
          "required": true,
          "description": "The ID of the room resource"
        }
      ],
      "get": {
        "summary": "Get a room resource",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomResource"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-room-resources-roomResourceId",
        "description": "Get the room resource given by `{roomResourceId}`. Requires the `read` scope."
      },
      "put": {
        "summary": "Update a room resource",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RoomResourceResponse"
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "put-room-resources-roomResourceId",
        "description": "Update the room resource given by `{roomResourceId}`. Requires the `settings.edit` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/RoomResourceRequestBody"
        }
      },
      "delete": {
        "summary": "Delete a room resource",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "delete-room-resources-roomResourceId",
        "description": "Delete the room resource given by `{roomResourceId}`, detaching it from every room. Requires the `settings.edit` scope."
      }
    },
    "/services": {
      "get": {
        "summary": "Get services",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Service"
                  }
                }
              }
            }
          }
        },
        "operationId": "get-services",
        "description": "Get a list of services for your organisation, ordered by `order` and then `name`. No specific scope is required."
      },
      "post": {
        "summary": "Create a service",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "post-services",
        "requestBody": {
          "$ref": "#/components/requestBodies/ServiceRequestBody"
        },
        "description": "Create a new meeting service for your organisation. Requires the `settings.services.manage` scope."
      },
      "put": {
        "summary": "Reorder services",
        "description": "Set the display order of your organisation's services. Requires the `settings.services.manage` scope.",
        "operationId": "put-services",
        "tags": [
          "Meetings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "services": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "order": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id",
                        "order"
                      ]
                    }
                  }
                },
                "required": [
                  "services"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "services": [
                      {
                        "id": "6b1e4c2a-1f3d-4e5a-8b7c-9d0e1f2a3b4c",
                        "order": 1
                      },
                      {
                        "id": "7c2f5d3b-2a4e-4f6b-9c8d-0e1f2a3b4c5e",
                        "order": 2
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/services/{serviceId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "serviceId",
          "in": "path",
          "required": true,
          "description": "The ID of the service"
        }
      ],
      "get": {
        "summary": "Get a service",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "get-services-serviceId",
        "description": "Get the meeting service given by `{serviceId}`. Requires the `settings.services.manage` scope."
      },
      "put": {
        "summary": "Update a service",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error, or an item you left out is part of a future service request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "put-services-serviceId",
        "description": "Update the meeting service given by `{serviceId}`. The availability is replaced, and items left out of `items` are deleted. Requires the `settings.services.manage` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/ServiceRequestBody"
        }
      },
      "delete": {
        "summary": "Delete a service",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "200": {
            "description": "Deleted. The response body is empty."
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Returned if there are any future service requests for this service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "delete-services-serviceId",
        "description": "Delete the meeting service given by `{serviceId}`, with its items and availability. Requires the `settings.services.manage` scope."
      }
    },
    "/settings/device": {
      "get": {
        "summary": "Get organisation-level device settings",
        "tags": [
          "Display App"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          }
        },
        "operationId": "get-settings-device",
        "description": "Get the organisation-level device settings for the Clearooms Display App.\n\nThese are treated as the default settings for any Android or iOS device where you have the Display App installed, in the absence of any room-specific or device-specific settings.\n\nRequires the `read` scope."
      },
      "put": {
        "summary": "Update organisation-level device settings",
        "tags": [
          "Display App"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSettings"
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        },
        "operationId": "put-settings-device",
        "description": "Update the organisation-level device settings for the Clearooms Display App.\n\nThese are treated as the default settings for any Android or iOS device where you have the Display App installed, in the absence of any room-specific or device-specific settings.\n\nReturns `201` if the organisation had no settings yet and `200` if they were updated. Requires the `settings.edit` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/DeviceSettingsRequestBody"
        }
      }
    },
    "/settings/organisation/visitors/rules": {
      "get": {
        "summary": "Get visitor rules",
        "tags": [
          "Visitors"
        ],
        "operationId": "get-settings-organisation-visitors-rules",
        "description": "Get your organisation's visitor rules. If none exist yet, default rules are created and returned. Requires one of these scopes: `settings.edit`, `visitors.manage`, `arrivals.branding.manage`, `arrivals.notifications.manage`, `arrivals.compliance.view`, `arrivals.compliance.manage`.",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/VisitorRulesResponse"
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      },
      "put": {
        "summary": "Update visitor rules",
        "tags": [
          "Visitors"
        ],
        "operationId": "put-settings-organisation-visitors-rules",
        "description": "Update your organisation's visitor rules. Only the settings you send are changed; anything you leave out keeps its current value. Turning on `approvals_enabled` or `id_scanning_required` without the matching plan feature is not an error: the setting is left unchanged and listed in `stripped`. Returns `201` if this call created the rules, otherwise `200`. Requires one of these scopes: `settings.edit`, `arrivals.branding.manage`, `arrivals.notifications.manage`, `arrivals.compliance.manage`.",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Older name for `whos_in_privacy_enabled`. Takes priority if both are sent."
                  },
                  "whos_in_privacy_enabled": {
                    "type": "boolean"
                  },
                  "additional_notification_email_enabled": {
                    "type": "boolean",
                    "description": "Turning this off removes every office from `additional_notification_offices`."
                  },
                  "additional_notification_email_send_timing": {
                    "type": "string",
                    "enum": [
                      "immediately",
                      "check_in"
                    ],
                    "description": "Not validated."
                  },
                  "additional_notification_offices": {
                    "type": "array",
                    "description": "**Required if** `additional_notification_email_enabled` is `true`. When sent, it replaces the list: offices not in it have their notification settings removed.",
                    "items": {
                      "type": "object",
                      "required": [
                        "office_id"
                      ],
                      "properties": {
                        "office_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Must be an existing office."
                        },
                        "recipients": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Comma-separated email addresses."
                        }
                      }
                    }
                  },
                  "welcome_email_enabled": {
                    "type": "boolean"
                  },
                  "welcome_email_send_timing": {
                    "type": "string",
                    "enum": [
                      "immediately",
                      "check_in"
                    ]
                  },
                  "welcome_email_send_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Time in `H:i:s` format, such as `09:00:00`."
                  },
                  "invitation_send_timing": {
                    "type": "string",
                    "enum": [
                      "on_registration",
                      "day_before",
                      "day_of"
                    ]
                  },
                  "invitation_send_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Time in `H:i:s` format, such as `08:00:00`."
                  },
                  "enabled_languages": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "enum": [
                        "EN",
                        "CY",
                        "DE",
                        "ES",
                        "FR",
                        "IT",
                        "NL",
                        "PL",
                        "PT"
                      ]
                    },
                    "description": "Languages offered on the kiosk. Send `null` to turn every language on."
                  },
                  "nda_acknowledgement_enabled": {
                    "type": "boolean"
                  },
                  "approvals_enabled": {
                    "type": "boolean",
                    "description": "Turning this on needs the `arrivals-visitor-approvals` plan feature. Without it, the value is dropped and named in `stripped`."
                  },
                  "id_scanning_required": {
                    "type": "boolean",
                    "description": "Turning this on needs the `arrivals-id-scanning` plan feature. Without it, the value is dropped and named in `stripped`."
                  },
                  "email_acknowledgement_to_visitor": {
                    "type": "boolean"
                  },
                  "repeat_visitors_enabled": {
                    "type": "boolean"
                  },
                  "max_repeat_visitor_weeks": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 52,
                    "description": "**Required if** `repeat_visitors_enabled` is `true`."
                  },
                  "mandatory_fields": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "description": "A list of single-key objects, one per field: `true` makes it required, `false` optional, and `\"hidden\"` or `null` hides it. If you send any field, send all five. Sending `null`, an empty list or a plain object saves an empty set of rules, so every field falls back to its default (company required, the rest optional).",
                    "items": {
                      "type": "object",
                      "minProperties": 1,
                      "maxProperties": 1,
                      "properties": {
                        "email": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "hidden"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "car_registration_number": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "hidden"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "locale": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "hidden"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expected_arrival": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "hidden"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "company": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "hidden"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "welcome_email_enabled": true,
                    "invitation_send_timing": "day_before",
                    "invitation_send_time": "08:00:00",
                    "enabled_languages": [
                      "EN",
                      "FR",
                      "DE"
                    ],
                    "approvals_enabled": true,
                    "mandatory_fields": [
                      {
                        "email": true
                      },
                      {
                        "car_registration_number": false
                      },
                      {
                        "locale": "hidden"
                      },
                      {
                        "expected_arrival": true
                      },
                      {
                        "company": true
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated rules, plus `stripped`.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/VisitorRules"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "stripped": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "approvals_enabled",
                              "id_scanning_required"
                            ]
                          },
                          "description": "Settings you tried to turn on that your plan does not include. They were not saved."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The rules were created by this call. Same body as `200`.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/VisitorRules"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "stripped": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "approvals_enabled",
                              "id_scanning_required"
                            ]
                          },
                          "description": "Settings you tried to turn on that your plan does not include. They were not saved."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/teams": {
      "get": {
        "summary": "Get teams",
        "tags": [
          "Teams"
        ],
        "operationId": "get-teams",
        "description": "Get the teams in your organisation as a tree, ordered by name. Hidden and system teams are excluded; a team whose parent is excluded is shown at the top level. Requires the `read` scope.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Team"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      },
      "post": {
        "summary": "Create a team",
        "tags": [
          "Teams"
        ],
        "operationId": "post-teams",
        "description": "Create a new team within your organisation. Requires the `settings.users.manage` scope.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the team."
                  },
                  "manager_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The ID of the user that is this team's manager."
                  },
                  "parent_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "If applicable, the team of which this team is a sub-team."
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "The IDs of roles to assign to the team. All must belong to your organisation. Members' scopes are refreshed."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Accounts Payable",
                    "manager_id": "04d66580-8fdd-49ba-83df-eaa2ccf424ff",
                    "parent_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                    "roles": []
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error."
          }
        }
      }
    },
    "/teams/{teamId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "teamId",
          "in": "path",
          "required": true,
          "description": "The ID of the team"
        }
      ],
      "put": {
        "summary": "Update a team",
        "tags": [
          "Teams"
        ],
        "operationId": "put-teams-teamId",
        "description": "Update the team given by `{teamId}`. System teams cannot be updated. Requires the `settings.users.manage` scope.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the team."
                  },
                  "manager_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The ID of the user that is this team's manager."
                  },
                  "parent_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "This cannot be the current team or any of its descendants."
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "The IDs of roles to assign to the team, replacing any existing ones. All must belong to your organisation. Members' scopes are refreshed. Roles are unchanged if omitted."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Accounts Receivable",
                    "manager_id": null,
                    "parent_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the team is a system team or belongs to another organisation."
          },
          "422": {
            "description": "Validation error, or:\n\n - You are trying to assign a team as its own parent\n - You are trying to assign a team's descendant as its parent"
          }
        }
      },
      "delete": {
        "summary": "Delete a team",
        "tags": [
          "Teams"
        ],
        "operationId": "delete-teams-teamId",
        "description": "Delete the team given by `{teamId}`. System teams cannot be deleted.\n\nThis does not delete any users, desks, or roles that were assigned to the team. Requires the `settings.users.manage` scope.",
        "responses": {
          "200": {
            "description": "Deleted. The response body is empty."
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the team is a system team or belongs to another organisation."
          }
        }
      }
    },
    "/timezones": {
      "get": {
        "summary": "Get timezones",
        "tags": [
          "General"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Timezone"
                  }
                }
              }
            }
          }
        },
        "operationId": "get-timezones",
        "description": "Get a list of timezones. This returns every timezone in the [IANA Time Zone Database](https://www.iana.org/time-zones), plus any out-of-date ones still used by your organisation's offices. No scope is required."
      }
    },
    "/users": {
      "post": {
        "summary": "Create a user",
        "tags": [
          "Users"
        ],
        "operationId": "post-users",
        "description": "Create a new user who can log into Clearooms. If no `password` is given, a random one is set and a welcome email is sent. If no `roles` are given, the organisation's default role is assigned. Requires the `admin` scope.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 255
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "description": "Must not be used by another user."
                  },
                  "password": {
                    "type": "string",
                    "description": "Must meet the default password rules. If omitted, a welcome email is sent instead."
                  },
                  "office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Must be an office in your organisation."
                  },
                  "teams": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Must be teams in your organisation."
                  },
                  "attributes": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Must be attributes in your organisation."
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Must be existing roles."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Jane Example",
                    "email": "jane.example@example.com",
                    "office_id": "98b811b5-1191-42ec-aa87-5c6ac353077f",
                    "teams": [
                      "a34dfc39-1924-4826-8e69-c0a25bca2767"
                    ],
                    "attributes": [
                      "b45efc39-1924-4826-8e69-c0a25bca2768"
                    ],
                    "roles": [
                      "c56dfc39-1924-4826-8e69-c0a25bca2769"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error."
          }
        }
      },
      "get": {
        "summary": "List users",
        "tags": [
          "Users"
        ],
        "operationId": "get-users",
        "description": "List the users in your organisation, owners first and then by name unless `sort` is given. Send `page` to paginate; otherwise all matching users, including archived ones, are returned as a plain array. With the `minimised` header set to `true`, `MinimisedUser` records are returned instead of `User`. Requires one of these scopes: `read`, `users.read`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Page number. When given, the response is paginated and archived users are excluded unless `archived` or `include_archived` is `1`."
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 15
            },
            "description": "Number of users per page."
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search by name or email."
          },
          {
            "name": "is_host",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Return only users who are visitor hosts. Only `true` has an effect."
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "When paginating, return only archived (`1`) or only active (`0`, the default) users."
          },
          {
            "name": "include_archived",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "When paginating, include both archived and active users. Only the value `1` has an effect."
          },
          {
            "name": "is_manager",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            },
            "description": "Filter by manager status. Not validated."
          },
          {
            "name": "manager",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Return only users managed by this user. Must be in your organisation."
          },
          {
            "name": "roles",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Role IDs, as a JSON array or comma-separated list. All must belong to your organisation."
          },
          {
            "name": "teams",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Team IDs, as a JSON array or comma-separated list. All must belong to your organisation."
          },
          {
            "name": "no_teams",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Return users who are in no team. Combined with `teams`, returns users in those teams or in none."
          },
          {
            "name": "delegate_ability",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "create",
                "edit"
              ]
            },
            "description": "Return only you and the users who let you create or edit meetings on their behalf."
          },
          {
            "name": "login_status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "recent"
              ]
            },
            "description": "`active`: has logged in; `inactive`: never logged in; `recent`: logged in within the last 30 days."
          },
          {
            "name": "user_types",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Any of `none`, `admin`, `owner`, `no-login`, as a JSON array or comma-separated list. `none` (or an empty list) returns no users."
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "last_login_at",
                "email"
              ]
            },
            "description": "Field to sort by."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            },
            "description": "Sort direction."
          },
          {
            "name": "exceptions_first_desk_limits_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "List users with an exception for this desk limit first. Requires `exceptions_first_rule`. Ignored if `sort` is given."
          },
          {
            "name": "exceptions_first_rule",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The desk limit rule for `exceptions_first_desk_limits_id`. Requires `exceptions_first_desk_limits_id`."
          },
          {
            "name": "only_openspaces",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Return only OpenSpaces users. Not validated."
          },
          {
            "name": "include_openspaces",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Include OpenSpaces users, who are excluded by default. Not validated."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/User"
                          },
                          {
                            "$ref": "#/components/schemas/MinimisedUser"
                          }
                        ]
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/User"
                              },
                              {
                                "$ref": "#/components/schemas/MinimisedUser"
                              }
                            ]
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error."
          }
        }
      }
    },
    "/users/me": {
      "get": {
        "summary": "Get current user",
        "tags": [
          "Users"
        ],
        "operationId": "get-users-me",
        "description": "Get the details of the currently logged-in user. No specific scope is required.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CurrentUserResponse"
          }
        }
      },
      "put": {
        "summary": "Update current user",
        "tags": [
          "Users"
        ],
        "operationId": "put-users-me",
        "description": "Update the currently logged-in user. Requires the `write` scope.",
        "requestBody": {
          "$ref": "#/components/requestBodies/UserRequestBody"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CurrentUserResponse"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error, for example the email address is already in use."
          }
        }
      }
    },
    "/users/me/bookings/confirmed/{bookingId}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "bookingId",
          "in": "path",
          "required": true
        }
      ],
      "put": {
        "summary": "Check Out",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "The checked-out booking.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Unprocessable Entity\n\nBesides the standard validation, checking out can fail because your organisation has not enabled check-out."
          }
        },
        "operationId": "put-users-me-bookings-confirmed-bookingId",
        "description": "Check out of the booking given by `{bookingId}`. The booking ends now and stops being all-day.\n\nRequires one of these scopes: `bookings.create.own`, `bookings.checkin.others`."
      }
    },
    "/users/me/bookings/unconfirmed/{bookingId}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "bookingId",
          "in": "path",
          "required": true
        }
      ],
      "put": {
        "summary": "Check In",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "The user's remaining unconfirmed bookings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BookingWithDesk"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Unprocessable Entity\n\nBesides the standard validation, checking in can fail for several reasons:\n\n- The booking has already been cancelled because it was not checked in on time.\n- The booking is on a different day.\n- Early check-in is being attempted, and your organisation's settings do not allow it.\n- Early check-in is allowed, but checking in now would clash with another booking on the same desk.\n- Your organisation requires check-in from specific IP addresses, and the request comes from a different one.\n- Your organisation requires check-in with a QR code, and the code given is invalid."
          }
        },
        "operationId": "put-users-me-bookings-unconfirmed-bookingId",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "attended"
                ],
                "properties": {
                  "attended": {
                    "type": "boolean",
                    "description": "If `true`, the booking is checked in. If `false`, the booking is cancelled."
                  },
                  "d": {
                    "type": "integer",
                    "minimum": 86400,
                    "maximum": 315360000,
                    "description": "If sending an OTP, how long the OTP is valid for, in seconds."
                  },
                  "otp": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 6,
                    "example": "123456",
                    "description": "A one-time code, depending on your organisation's check-in settings."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "attended": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "description": "Check in to the booking given by `{bookingId}`, or cancel it by sending `attended: false`.\n\nReturns the authenticated user's remaining bookings that still need a check-in, or an empty array if check-in is disabled. If the booking is already checked in, the same list is returned with no error.\n\nRequires one of these scopes: `bookings.create.own`, `bookings.checkin.others`."
      }
    },
    "/users/me/bookings/step-in/{bookingId}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "bookingId",
          "in": "path",
          "required": true
        }
      ],
      "put": {
        "summary": "Step back in to a booking",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "The booking.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\nThe booking does not belong to the authenticated user."
          },
          "422": {
            "description": "Unprocessable Entity\n\nStepping back in fails if the booking has been checked out."
          }
        },
        "operationId": "put-users-me-bookings-step-in-bookingId",
        "description": "Step back in to the booking given by `{bookingId}` after stepping out. The booking must belong to the authenticated user.\n\nRequires one of these scopes: `bookings.create.own`, `bookings.checkin.others`."
      }
    },
    "/users/me/bookings/step-out/{bookingId}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "name": "bookingId",
          "in": "path",
          "required": true
        }
      ],
      "put": {
        "summary": "Step out of a booking",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "The booking.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden\n\nThe booking does not belong to the authenticated user."
          },
          "422": {
            "description": "Unprocessable Entity\n\nStepping out fails if:\n\n- The booking has already been checked out\n- The booking has ended\n- The booking has not started yet\n- The booking is already stepped out"
          }
        },
        "operationId": "put-users-me-bookings-step-out-bookingId",
        "description": "Step out of the booking given by `{bookingId}` when leaving the desk for a short while, then step back in with the step-in endpoint. The booking must belong to the authenticated user.\n\nYour organisation's settings may limit how long you can step out for, after which the booking is checked out and ended.\n\nRequires one of these scopes: `bookings.create.own`, `bookings.checkin.others`."
      }
    },
    "/user-statuses": {
      "post": {
        "summary": "Create a user status",
        "tags": [
          "Users"
        ],
        "operationId": "post-user-statuses",
        "description": "Create a status on a user's calendar. Without the `settings.users.manage` scope you can only create statuses for yourself. If the custom status allows office selection, the office is worked out from the user's bookings, meetings, visitors or default office. Requires one of these scopes: `settings.users.manage`, `users.status.edit`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id",
                  "start_date",
                  "end_date"
                ],
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the user to whom the status applies."
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Must be after or equal to the `start_date`."
                  },
                  "custom_status_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Must be an existing custom status."
                  },
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "Holiday",
                      "Unpaid Leave",
                      "Sick Leave",
                      "Maternity",
                      "Paternity",
                      "Meeting",
                      "Compassionate",
                      "Dentist/Doctors",
                      null
                    ],
                    "maxLength": 100,
                    "description": "Legacy built-in status."
                  },
                  "office_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Validated (must be an office in your organisation) but ignored when creating; the office is worked out automatically."
                  },
                  "free_desk_allocations": {
                    "type": "boolean",
                    "description": "Whether to free the user's allocated desks during the status. Defaults to `false`."
                  },
                  "block_availability": {
                    "type": "boolean",
                    "description": "Defaults to `false`."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "remove_bookings_in_period": {
                    "type": "boolean",
                    "description": "Whether to delete the user's desk bookings that start during the status."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": "4da755fb-ba05-4b10-905c-9b42c2266464",
                    "start_date": "2025-04-28 00:00:00",
                    "end_date": "2025-04-28 23:59:59",
                    "custom_status_id": "e75ac1ab-a28c-4aaf-9ee4-f70c07ad86cd"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserStatus"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or you do not have permission to create statuses for other users."
          },
          "422": {
            "description": "Validation error, or the status overlaps another of the user's statuses (error key `dates`)."
          }
        }
      },
      "get": {
        "summary": "List user statuses",
        "description": "List user statuses in your organisation, ordered by start date. Returns an array, or a paginated object when `paginate` is true. Requires one of these scopes: `read`, `settings.users.manage`.",
        "operationId": "get-user-statuses",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Only statuses overlapping this range. Used together with `end_date`."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Must be on or after `start_date`."
          },
          {
            "name": "free_desk_allocations",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter by whether the status frees the user's desk allocations."
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter by user."
          },
          {
            "name": "paginate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Paginate the results."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            },
            "description": "Results per page when paginating."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserStatus"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/UserStatus"
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/visitors": {
      "get": {
        "summary": "List visitors",
        "tags": [
          "Visitors"
        ],
        "operationId": "get-visitors",
        "description": "List every visit to every office you can access, not paginated. Cancelled visits are left out. If you can only read your own visitors or ones you created, you see only those. Returns an empty array if your organisation does not have visitor management. Requires one of these scopes: `visitors.read`, `read`, `visitors.read.own`, `visitors.read.created`.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Visitor"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      },
      "post": {
        "summary": "Create a visitor",
        "tags": [
          "Visitors"
        ],
        "operationId": "create-visitors",
        "description": "Pre-register a visitor, or log one who has already arrived by sending `time_in`. Send more than one date in `dates` to create a repeat visitor: one visit is created per date, linked by `repeat_visitor_booking_id`, and the earliest is returned.\n\nThe visitor is emailed an invitation if your visitor rules have `welcome_email_enabled` on, the visitor has an email address and you did not send `send_invite: false`.\n\nSome fields need ArrivalsHQ plan features and are silently ignored without them:\n\n| Field | Plan feature |\n| --- | --- |\n| `nda_document_ids` | `arrivals-documents` |\n| `accessibility_notes` | `arrivals-accessibility-capture` |\n| `site_id`, `health_responses`, `bookings`, `link_booking_ids`, `link_meeting_id` | `arrivals-pre-registration` |\n\n`visitor_type_id` is not ignored: a type your plan does not include returns `422`. On ArrivalsHQ plans, the office must be on a site (or you must send `site_id`), otherwise the call returns `422`.\n\nRequires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "user_id",
                  "notify_employee"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "user_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the host. If you can only manage your own visitors, this must be your own ID."
                  },
                  "office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The office being visited. Required unless `site_id` is sent. On ArrivalsHQ plans, the office must be on a site, or you must send `site_id` too; when both are sent, the office must be on that site."
                  },
                  "site_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 36,
                    "description": "ArrivalsHQ plans only (`arrivals-pre-registration`); ignored otherwise. The site being visited. Without `office_id`, the visit goes to the site's default office. Not returned in the response."
                  },
                  "notify_employee": {
                    "type": "boolean",
                    "description": "Whether to email the host when the visitor signs in."
                  },
                  "send_invite": {
                    "type": "boolean",
                    "default": true,
                    "description": "Send `false` to stop the visitor being emailed an invitation. An invitation is only sent when your visitor rules have `welcome_email_enabled` on and the visitor has an email address. Not returned in the response."
                  },
                  "expected_arrival": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date and time, such as `2026-05-14 14:00`. Required unless `time_in` or `dates` is sent, or always if your visitor rules make it required. Ignored when `dates` is sent."
                  },
                  "dates": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "description": "Date and time."
                    },
                    "description": "Every visit date, including the first. The earliest becomes `expected_arrival`. More than one date creates a repeat visitor: this needs `repeat_visitors_enabled` in your visitor rules, and no date can be more than `max_repeat_visitor_weeks` ahead."
                  },
                  "time_in": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date and time, such as `2026-05-14 13:57`. Send to log a visitor who has already arrived."
                  },
                  "time_out": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date and time, on or after `time_in`."
                  },
                  "locale": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required or optional depending on your organisation's visitor rules (see `GET /settings/organisation/visitors/rules`). Defaults to `en`."
                  },
                  "company": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Required by default. Optional only if your organisation's visitor rules make it optional."
                  },
                  "car_registration_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Required or optional depending on your organisation's visitor rules (see `GET /settings/organisation/visitors/rules`)."
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255,
                    "description": "Required or optional depending on your organisation's visitor rules (see `GET /settings/organisation/visitors/rules`). If left empty, an answer in `custom_field_responses` labelled like an email address (such as `Email address`) is used."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 40,
                    "description": "If left empty, an answer in `custom_field_responses` labelled like a phone number is used. Not returned in the response."
                  },
                  "visitor_type_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "One of your organisation's visitor types. Returns `422` if your plan does not include that type."
                  },
                  "accessibility_notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Needs the `arrivals-accessibility-capture` plan feature; ignored otherwise."
                  },
                  "health_responses": {
                    "type": [
                      "array",
                      "object",
                      "null"
                    ],
                    "items": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 500
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 500
                    },
                    "description": "Health question answers. ArrivalsHQ plans only (`arrivals-pre-registration`); ignored otherwise. Not returned in the response."
                  },
                  "custom_field_responses": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 500
                    },
                    "description": "Free-text answers keyed by label, such as `{\"Mobile number\": \"07700 900123\"}`. Separate from `custom_fields`. Not returned in the response."
                  },
                  "custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Values keyed by visitor custom field ID. Only fields shown on visitor entry are saved, and required ones must be sent."
                  },
                  "nda_document_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "description": "Documents to attach to the invitation email. Needs the `arrivals-documents` plan feature; ignored otherwise. IDs that are unknown, inactive or from another organisation are dropped without an error. Not returned in the response."
                  },
                  "bookings": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "A desk, parking space or meeting room to book for the visitor on the first visit date. ArrivalsHQ plans only (`arrivals-pre-registration`); ignored otherwise. If a booking cannot be made, the call returns `422` and nothing is created.",
                    "properties": {
                      "show_location": {
                        "type": "boolean",
                        "description": "Whether the visitor can see where the booking is on the floor plan."
                      },
                      "desk": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "required": [
                          "desk_id"
                        ],
                        "properties": {
                          "desk_id": {
                            "type": "string",
                            "maxLength": 36,
                            "description": "A specific ID, or `auto` to pick any free one."
                          }
                        }
                      },
                      "parking": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "required": [
                          "desk_id"
                        ],
                        "properties": {
                          "desk_id": {
                            "type": "string",
                            "maxLength": 36,
                            "description": "A parking space ID, or `auto` to pick any free one."
                          }
                        }
                      },
                      "room": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "required": [
                          "room_id"
                        ],
                        "properties": {
                          "room_id": {
                            "type": "string",
                            "maxLength": 36,
                            "description": "A specific ID, or `auto` to pick any free one."
                          },
                          "duration_minutes": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 15,
                            "maximum": 480
                          },
                          "start_time": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "`HH:MM`, office-local. Send with `end_time`. Takes priority over `duration_minutes`."
                          },
                          "end_time": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "`HH:MM`, office-local, after `start_time`. Send with `start_time`."
                          }
                        }
                      }
                    }
                  },
                  "link_booking_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "maxItems": 20,
                    "items": {
                      "type": "string",
                      "maxLength": 36
                    },
                    "description": "Existing guest desk or parking bookings to link to this visitor. ArrivalsHQ plans only (`arrivals-pre-registration`); ignored otherwise."
                  },
                  "link_meeting_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 36,
                    "description": "An existing meeting the visitor is attending. Cannot be combined with `bookings.room`, and must be on the visit date. ArrivalsHQ plans only (`arrivals-pre-registration`); ignored otherwise."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Jamie Fictional",
                    "user_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
                    "office_id": "5e4d3c2b-1a09-4f8e-a7d6-c5b4a3928170",
                    "site_id": "3f6c1a52-7d8e-4b9f-a0c1-d2e3f4a5b6c7",
                    "expected_arrival": "2026-11-12 10:00",
                    "notify_employee": true,
                    "send_invite": true,
                    "locale": "en",
                    "company": "Example Ltd",
                    "email": "jamie@example.com",
                    "phone": "07700 900123",
                    "visitor_type_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
                    "accessibility_notes": "Uses a wheelchair; needs step-free access.",
                    "nda_document_ids": [
                      "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"
                    ],
                    "bookings": {
                      "show_location": true,
                      "desk": {
                        "desk_id": "auto"
                      },
                      "room": {
                        "room_id": "auto",
                        "start_time": "10:00",
                        "end_time": "11:00"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Visitor"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, your organisation does not have visitor management, you can only manage your own visitors and `user_id` is someone else, or the office belongs to another organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The host, a linked booking or a linked meeting could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error, or a requested booking could not be made (for example, no desk is free that day, or `link_meeting_id` is combined with `bookings.room`). Nothing is created."
          }
        }
      }
    },
    "/visitors/{officeId}/{date}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "officeId",
          "in": "path",
          "required": true,
          "description": "The ID of the office"
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "date",
          "in": "path",
          "required": true,
          "description": "The date by which to search"
        }
      ],
      "get": {
        "summary": "List an office's visitors on a date",
        "tags": [
          "Visitors"
        ],
        "operationId": "get-visitors-officeId-date",
        "description": "List the visitors for the office given by `{officeId}` on `{date}`, not paginated. A visit matches on its sign-in time or, if the visitor has not signed in, its expected arrival. Cancelled visits are left out. If you can only read your own visitors or ones you created, you see only those. Returns an empty array if your organisation does not have visitor management. Requires one of these scopes: `visitors.read`, `read`, `visitors.read.own`, `visitors.read.created`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Visitor"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      }
    },
    "/visitors/{visitorId}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "visitorId",
          "in": "path",
          "required": true,
          "description": "The ID of the visitor"
        }
      ],
      "put": {
        "summary": "Update a visitor",
        "tags": [
          "Visitors"
        ],
        "operationId": "put-visitors-visitorId",
        "description": "Update the visitor given by `{visitorId}`. Fields you leave out keep their current value. If you change `expected_arrival` or `office_id` on a visit that has not started, its desk, parking and meeting room bookings move with it; if any cannot, nothing is saved and the call returns `422` with code `booking_clash`. A cancelled visit cannot be updated. Requires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Changes the host. Must be a user in your organisation, otherwise `422`. `null` is ignored."
                  },
                  "office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Moves the visit to this office, if you can create visitors there. An unknown ID is ignored."
                  },
                  "notify_employee": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Validated but not applied."
                  },
                  "time_in": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date and time. Send `null` to clear it. Setting it on a visitor who had not signed in signs them in: the host is emailed if `notify_employee` is on and host emails are on in your ArrivalsHQ notification settings."
                  },
                  "time_out": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date and time, on or after `time_in`. Cannot be cleared."
                  },
                  "locale": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Only changed when sent; `null` resets it to `en`. If sent, it cannot be empty when your visitor rules make it required."
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 255,
                    "description": "Send `null` to clear it. If sent, it cannot be empty when your visitor rules make it required."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 40,
                    "description": "Send `null` to clear it. Not returned in the response."
                  },
                  "car_registration_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "If sent, it cannot be empty when your visitor rules make it required."
                  },
                  "company": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "If sent, it cannot be empty unless your visitor rules make it optional."
                  },
                  "expected_arrival": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date and time. Send `null` to clear it. If sent, it is required when your visitor rules make it required, or when `time_in` is null. Moving an upcoming visit to another day moves its bookings too."
                  },
                  "custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Values keyed by visitor custom field ID. Only fields shown on visitor entry or check-in are saved."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "email": "jamie.fictional@example.com",
                    "phone": "07700 900456",
                    "user_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
                    "expected_arrival": "2026-11-13 10:00"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Visitor"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, the visitor belongs to another organisation, you cannot create visitors in the new `office_id`, or you can only manage your own visitors (or ones you created) and this is not one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "410": {
            "description": "The visit has been cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error, `user_id` is not in your organisation, or (with `code: booking_clash`) the visit's bookings cannot move to the new date or office.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "booking_clash"
                      ]
                    },
                    "clashes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "desk",
                              "parking",
                              "room"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a visitor",
        "tags": [
          "Visitors"
        ],
        "operationId": "delete-visitors-visitorId",
        "description": "Permanently delete the visit given by `{visitorId}`. This also works on a cancelled visit. To cancel an upcoming visit and keep its history, use `POST /visitors/{visitorId}/cancel` instead. Requires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or you can only manage your own visitors (or ones you created) and this is not one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The visitor does not exist or belongs to another organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getVisitor",
        "summary": "Get a visitor",
        "tags": [
          "Visitors"
        ],
        "description": "Return the full record for one visit: contact details, host, office, visitor type, approval and ID verification status, custom fields, the documents sent and acknowledged, and a timeline of what has happened so far. Cancelled visits are returned too, with `status` set to `cancelled`. A token limited to its own or created visitors gets 403 for any other visit. Requires one of these scopes: `visitors.read`, `read`, `visitors.read.own`, `visitors.read.created`.",
        "parameters": [
          {
            "name": "visitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the visitor (one visit)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisitorDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or it can only read its own or created visitors and this visit is neither.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The visitor does not exist, belongs to another organisation, or your organisation does not have Visitor Management.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/{userId}/avatar": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "userId",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "userId",
          "in": "path",
          "required": true
        }
      ],
      "put": {
        "summary": "Upload an avatar for a user",
        "tags": [
          "Users"
        ],
        "operationId": "put-users-userId-avatar",
        "description": "Upload an avatar for the user given by `{userId}`, replacing any existing one. The image is cropped to 400 × 400 pixels. As PHP does not parse multipart bodies on `PUT`, send this as a `POST` with a `_method=PUT` field. Requires the `settings.users.manage` scope.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "avatar"
                ],
                "properties": {
                  "avatar": {
                    "type": "string",
                    "format": "binary",
                    "description": "A JPEG, PNG or TIFF image."
                  },
                  "name": {
                    "type": "string",
                    "description": "A name for the stored asset. Not validated."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/UserResponse"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the user belongs to another organisation."
          },
          "422": {
            "description": "Validation error."
          }
        }
      },
      "delete": {
        "summary": "Delete a user's avatar",
        "description": "Remove a user's avatar. The user must be in your organisation. Requires the `settings.users.manage` scope.",
        "operationId": "delete-users-userId-avatar",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/users/{userId}/vehicles": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "userId",
          "in": "path",
          "required": true
        }
      ],
      "get": {
        "summary": "List vehicles for a specific user",
        "tags": [
          "Users"
        ],
        "operationId": "get-users-userId-vehicles",
        "description": "List the vehicles of the user given by `{userId}`: their personal vehicles (default first, then newest) followed by any pool cars they can access. The user must be in your organisation and must not be an OpenSpaces user. Requires the `write` scope.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the user is in another organisation or is an OpenSpaces user."
          }
        }
      },
      "post": {
        "summary": "Create a vehicle for a specific user",
        "tags": [
          "Users"
        ],
        "operationId": "post-users-userId-vehicles",
        "description": "Create a vehicle for the user given by `{userId}`. If the user already has a vehicle with this registration number it is updated instead, and a previously deleted vehicle with the same registration is restored. The user must be in your organisation and must not be an OpenSpaces user. Requires the `settings.users.manage` scope.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "registration_number"
                ],
                "properties": {
                  "registration_number": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "make": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "model": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "fuel_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "year": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1900,
                    "description": "No later than next year."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "registration_number": "AB12 CDE",
                    "make": "Ford",
                    "model": "Focus",
                    "color": "Blue",
                    "fuel_type": "Petrol",
                    "year": 2021,
                    "notes": "Usually parked on level 2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/VehicleResponse"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the user is in another organisation or is an OpenSpaces user."
          },
          "422": {
            "description": "Validation error, or:\n\n - Another user in your organisation already has a vehicle with this registration number\n - You are changing `make`, `model` or `color` while the vehicle's image is being generated"
          }
        }
      }
    },
    "/user-statuses/{userStatusId}": {
      "delete": {
        "summary": "Delete a user status",
        "tags": [
          "Users"
        ],
        "operationId": "delete-user-statuses-userStatusId",
        "description": "Delete the user status given by `{userStatusId}`. Without the `settings.users.manage` scope you can only delete your own statuses. Requires one of these scopes: `settings.users.manage`, `users.status.edit`.",
        "parameters": [
          {
            "name": "userStatusId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user status."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or you do not have permission to delete statuses for other users."
          },
          "404": {
            "description": "The status does not exist or belongs to another organisation."
          }
        }
      },
      "put": {
        "summary": "Update a user status",
        "description": "Update a user status. It must not overlap another status for the same user. Updating another user's status also needs `settings.users.manage`. Requires one of these scopes: `settings.users.manage`, `users.status.edit`.",
        "operationId": "put-user-statuses-userStatusId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userStatusId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user status."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "enum": [
                      "Holiday",
                      "Unpaid Leave",
                      "Sick Leave",
                      "Maternity",
                      "Paternity",
                      "Meeting",
                      "Compassionate",
                      "Dentist/Doctors",
                      null
                    ],
                    "description": "Optional."
                  },
                  "custom_status_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Optional."
                  },
                  "free_desk_allocations": {
                    "type": "boolean"
                  },
                  "block_availability": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Must be on or after `start_date`."
                  },
                  "remove_bookings_in_period": {
                    "type": "boolean",
                    "description": "Optional. Cancel the user's desk bookings in the period."
                  },
                  "office_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional. An office in your organisation."
                  }
                },
                "required": [
                  "start_date",
                  "end_date"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "custom_status_id": "e75ac1ab-a28c-4aaf-9ee4-f70c07ad86cd",
                    "start_date": "2026-11-02 00:00:00",
                    "end_date": "2026-11-02 23:59:59",
                    "notes": "Working from the Main Office"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserStatus"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/bookings/range-cancel": {
      "put": {
        "summary": "Cancel bookings in a date range",
        "operationId": "put-bookings-range-cancel",
        "description": "Cancel every active booking in an office between two dates. Users are notified unless `disable_notifications` is set. Requires the `admin` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "string",
                      "description": "e.g. \"12 bookings cancelled.\""
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "office_id",
                  "from",
                  "to"
                ],
                "properties": {
                  "office_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "An office in your organisation."
                  },
                  "from": {
                    "type": "string",
                    "description": "Any parseable date or date-time. Bookings starting on or after this date are cancelled."
                  },
                  "to": {
                    "type": "string",
                    "description": "Any parseable date or date-time. Bookings ending on or before this date are cancelled. Must be on or after `from`."
                  },
                  "disable_notifications": {
                    "type": "boolean",
                    "description": "If `true`, users are not notified."
                  },
                  "cancellation_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A cancellation reason ID from your organisation, or `other`. Optional."
                  },
                  "cancellation_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "**Required** if `cancellation_reason` is `other` or a reason that requires a note."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "office_id": "9a4c82e6-3141-414d-837a-374a96fa0137",
                    "from": "2026-12-24 00:00",
                    "to": "2026-12-26 23:59",
                    "disable_notifications": false,
                    "cancellation_reason": "other",
                    "cancellation_note": "Office closed for the holidays."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bookings/cancellation-reasons": {
      "get": {
        "summary": "List cancellation reason options",
        "operationId": "get-bookings-cancellation-reasons",
        "description": "List the active cancellation reasons offered when cancelling a booking of the given type, with the built-in \"Other\" option last. Requires the `read` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BookingCancellationReasonOption"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "The desk type of the booking being cancelled. Defaults to `desk`."
          }
        ]
      }
    },
    "/users/me/bookings": {
      "get": {
        "summary": "List my bookings",
        "operationId": "get-users-me-bookings",
        "description": "List the authenticated user's bookings, ordered by start date. Requires the `bookings.view` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BookingsResponse"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/minimised"
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Only bookings active on this date."
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only bookings starting on or after this time."
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only bookings ending on or before this time."
          },
          {
            "name": "unconfirmed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Only bookings whose check-in status is `pending`."
          },
          {
            "name": "use_cache",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Allow a cached response up to 5 minutes old."
          }
        ]
      }
    },
    "/users/me/bookings/unconfirmed": {
      "get": {
        "summary": "List my unconfirmed bookings",
        "operationId": "get-users-me-bookings-unconfirmed",
        "description": "List the authenticated user's bookings that need a check-in, are still pending and have started. Returns an empty array if check-in is disabled. Requires the `read` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Booking"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/settings/organisation/booking-cancellation-reasons": {
      "get": {
        "summary": "List cancellation reasons",
        "operationId": "get-settings-organisation-booking-cancellation-reasons",
        "description": "List your organisation's booking cancellation reasons, with how many bookings used each one. Requires the `read` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BookingCancellationReason"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a cancellation reason",
        "operationId": "post-settings-organisation-booking-cancellation-reasons",
        "description": "Add a booking cancellation reason to the end of your organisation's list. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingCancellationReason"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "label"
                ],
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "applies_to": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "enum": [
                        "desk",
                        "parking_space"
                      ]
                    },
                    "description": "The desk types this reason is offered for. Values must be distinct."
                  },
                  "requires_note": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "label": "Working from home",
                    "applies_to": [
                      "desk"
                    ],
                    "requires_note": false,
                    "is_active": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/settings/organisation/booking-cancellation-reasons/reorder": {
      "put": {
        "summary": "Reorder cancellation reasons",
        "operationId": "put-settings-organisation-booking-cancellation-reasons-reorder",
        "description": "Set the order of your organisation's cancellation reasons. Reasons left out keep their relative order after the listed ones. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Distinct reason IDs from your organisation, in the new order."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "ids": [
                      "3f1c2b6a-8d4e-4a51-9c3e-1b2a3c4d5e6f",
                      "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/settings/organisation/booking-cancellation-reasons/{bookingCancellationReasonId}": {
      "put": {
        "summary": "Update a cancellation reason",
        "operationId": "put-settings-organisation-booking-cancellation-reasons-bookingCancellationReasonId",
        "description": "Update the cancellation reason given by `{bookingCancellationReasonId}`. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingCancellationReason"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "bookingCancellationReasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the cancellation reason"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Cannot be empty if sent."
                  },
                  "applies_to": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "enum": [
                        "desk",
                        "parking_space"
                      ]
                    },
                    "description": "The desk types this reason is offered for. Values must be distinct."
                  },
                  "requires_note": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "label": "Feeling unwell",
                    "requires_note": true
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a cancellation reason",
        "operationId": "delete-settings-organisation-booking-cancellation-reasons-bookingCancellationReasonId",
        "description": "Delete the cancellation reason given by `{bookingCancellationReasonId}`. A reason that has been used on bookings cannot be deleted; deactivate it instead. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "description": "Forbidden"
          },
          "409": {
            "description": "The reason has been used on bookings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "bookings_count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "bookingCancellationReasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the cancellation reason"
          }
        ]
      }
    },
    "/custom-availability-rules": {
      "get": {
        "summary": "List custom availability rules",
        "operationId": "get-custom-availability-rules",
        "description": "List your organisation's custom availability rules. Requires the `read` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomAvailabilityRule"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "desk_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Only rules for this desk type."
          }
        ]
      },
      "post": {
        "summary": "Create a custom availability rule",
        "operationId": "post-custom-availability-rules",
        "description": "Create a custom availability rule. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAvailabilityRule"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "description",
                  "start_date",
                  "end_date",
                  "availability_type"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "start_date": {
                    "type": "string",
                    "description": "When the rule starts, as a date or date and time."
                  },
                  "end_date": {
                    "type": "string",
                    "description": "When the rule ends, as a date or date and time."
                  },
                  "offices": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Office IDs the rule applies to."
                  },
                  "desks": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Desk IDs the rule applies to."
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Team IDs the rule applies to."
                  },
                  "rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Room IDs the rule applies to."
                  },
                  "days": {
                    "type": "array",
                    "description": "The days of the week the rule applies on, as numbers from `0` (Sunday) to `6` (Saturday). Leave empty or omit for every day. The type of each entry is not validated; anything other than these numbers never matches.",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "availability_type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "room"
                    ]
                  },
                  "desk_type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ],
                    "description": "Defaults to `desk`."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Christmas closure",
                    "description": "Main office closed over Christmas",
                    "start_date": "2026-12-24 00:00:00",
                    "end_date": "2026-12-28 00:00:00",
                    "offices": [
                      "9a4c82e6-3141-414d-837a-374a96fa0137"
                    ],
                    "days": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "availability_type": "desk",
                    "desk_type": "desk"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/custom-availability-rules/{customAvailabilityRuleId}": {
      "get": {
        "summary": "Get a custom availability rule",
        "operationId": "get-custom-availability-rules-customAvailabilityRuleId",
        "description": "Get the custom availability rule given by `{customAvailabilityRuleId}`. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAvailabilityRule"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "customAvailabilityRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom availability rule"
          }
        ]
      },
      "put": {
        "summary": "Update a custom availability rule",
        "operationId": "put-custom-availability-rules-customAvailabilityRuleId",
        "description": "Update the custom availability rule given by `{customAvailabilityRuleId}`. The `offices`, `desks`, `teams` and `rooms` lists replace the existing ones. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomAvailabilityRule"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "customAvailabilityRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom availability rule"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "description",
                  "start_date",
                  "end_date",
                  "availability_type"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "start_date": {
                    "type": "string",
                    "description": "When the rule starts, as a date or date and time."
                  },
                  "end_date": {
                    "type": "string",
                    "description": "When the rule ends, as a date or date and time."
                  },
                  "offices": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Office IDs the rule applies to. Leaving this out clears the list."
                  },
                  "desks": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Desk IDs the rule applies to. Leaving this out clears the list."
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Team IDs the rule applies to. Leaving this out clears the list."
                  },
                  "rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Room IDs the rule applies to. Leaving this out clears the list."
                  },
                  "days": {
                    "type": "array",
                    "description": "The days of the week the rule applies on, as numbers from `0` (Sunday) to `6` (Saturday). Leave empty or omit for every day. The type of each entry is not validated; anything other than these numbers never matches.",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "availability_type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "room"
                    ]
                  },
                  "desk_type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ],
                    "description": "Defaults to `desk` when left out, even if the rule was for parking spaces."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Christmas closure",
                    "description": "Main office closed over Christmas",
                    "start_date": "2026-12-24 00:00:00",
                    "end_date": "2026-12-28 00:00:00",
                    "offices": [
                      "9a4c82e6-3141-414d-837a-374a96fa0137"
                    ],
                    "days": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "availability_type": "desk",
                    "desk_type": "desk"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a custom availability rule",
        "operationId": "delete-custom-availability-rules-customAvailabilityRuleId",
        "description": "Delete the custom availability rule given by `{customAvailabilityRuleId}`. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "customAvailabilityRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom availability rule"
          }
        ]
      }
    },
    "/custom-booking-fields": {
      "get": {
        "summary": "List custom booking fields",
        "operationId": "get-custom-booking-fields",
        "description": "List your organisation's custom booking fields, ordered by `order`. Unlike the other custom booking field endpoints, this returns the stored records, with `desks` and `offices` as full records instead of lists of IDs.\n\nRequires one of these scopes: `settings.edit`, `reports.manage`.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/CustomBookingFieldRecord"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "desks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "The full stored records of the desks the field applies to, each with a `pivot` object."
                          },
                          "offices": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "The full stored records of the offices the field applies to, each with a `pivot` object."
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a custom booking field",
        "operationId": "post-custom-booking-fields",
        "description": "Create a custom booking field. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomBookingField"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "label",
                  "required",
                  "restrictByValue",
                  "order"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "description": "The input type, for example `text`. Not validated against a list."
                  },
                  "label": {
                    "type": "string"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "offices": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Office IDs the field applies to. Leaving this out clears the list."
                  },
                  "desks": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Desk IDs the field applies to. Leaving this out clears the list."
                  },
                  "restrictByValue": {
                    "type": "boolean"
                  },
                  "restrictByValueRequiredValue": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The value a booking must give when `restrictByValue` is `true`."
                  },
                  "order": {
                    "type": "integer"
                  },
                  "restrict_to_openspaces": {
                    "type": "boolean",
                    "description": "Whether the field only applies to bookings made through an OpenSpaces widget."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "cost_code",
                    "type": "text",
                    "label": "Cost code",
                    "required": true,
                    "offices": [
                      "9a4c82e6-3141-414d-837a-374a96fa0137"
                    ],
                    "desks": [],
                    "restrictByValue": false,
                    "order": 1,
                    "restrict_to_openspaces": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/custom-booking-fields/{customBookingFieldId}": {
      "get": {
        "summary": "Get a custom booking field",
        "operationId": "get-custom-booking-fields-customBookingFieldId",
        "description": "Get the custom booking field given by `{customBookingFieldId}`. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomBookingField"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "customBookingFieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom booking field"
          }
        ]
      },
      "put": {
        "summary": "Update a custom booking field",
        "operationId": "put-custom-booking-fields-customBookingFieldId",
        "description": "Update the custom booking field given by `{customBookingFieldId}`. The `offices` and `desks` lists replace the existing ones. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomBookingField"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "customBookingFieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom booking field"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "label",
                  "required",
                  "restrictByValue",
                  "order"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "description": "The input type, for example `text`. Not validated against a list."
                  },
                  "label": {
                    "type": "string"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "offices": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Office IDs the field applies to. Leaving this out clears the list."
                  },
                  "desks": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Desk IDs the field applies to. Leaving this out clears the list."
                  },
                  "restrictByValue": {
                    "type": "boolean"
                  },
                  "restrictByValueRequiredValue": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The value a booking must give when `restrictByValue` is `true`."
                  },
                  "order": {
                    "type": "integer"
                  },
                  "restrict_to_openspaces": {
                    "type": "boolean",
                    "description": "Whether the field only applies to bookings made through an OpenSpaces widget."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "cost_code",
                    "type": "text",
                    "label": "Cost code",
                    "required": true,
                    "offices": [
                      "9a4c82e6-3141-414d-837a-374a96fa0137"
                    ],
                    "desks": [],
                    "restrictByValue": false,
                    "order": 1,
                    "restrict_to_openspaces": false
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a custom booking field",
        "operationId": "delete-custom-booking-fields-customBookingFieldId",
        "description": "Delete the custom booking field given by `{customBookingFieldId}`. Requires the `settings.edit` scope.",
        "tags": [
          "Bookings"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "customBookingFieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom booking field"
          }
        ]
      }
    },
    "/approval-assignments": {
      "get": {
        "summary": "List approval assignments",
        "operationId": "get-approval-assignments",
        "description": "List your organisation's approval assignments, 15 per page. Requires the `read` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApprovalAssignment"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "can_approve",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Only assignments where you, or one of your teams, is the approver."
          },
          {
            "name": "approvable_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "room"
              ]
            },
            "description": "Only assignments for desks or rooms."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The page number."
          }
        ]
      },
      "post": {
        "summary": "Create an approval assignment",
        "operationId": "post-approval-assignments",
        "description": "Make a user or team the approver for a desk or room. Requires the `admin` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalAssignment"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "room_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The room to approve. **Required** if `desk_id` is not set; cannot be sent with `desk_id`."
                  },
                  "desk_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The desk to approve. **Required** if `room_id` is not set; cannot be sent with `room_id`."
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The approving team. **Required** if `user_id` is not set."
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The approving user. **Required** if `team_id` is not set."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "desk_id": "b58d2e77-a2a3-4419-b34e-dc70b7797629",
                    "user_id": "0a650d09-ab4a-4d84-a11e-735344bda4dd"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-assignments/{approvalAssignmentId}": {
      "delete": {
        "summary": "Delete an approval assignment",
        "operationId": "delete-approval-assignments-approvalAssignmentId",
        "description": "Delete the approval assignment given by `{approvalAssignmentId}`. If it was the last one for the desk or room, pending approvals for it are removed. Requires the `admin` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        },
        "parameters": [
          {
            "name": "approvalAssignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the approval assignment"
          }
        ]
      }
    },
    "/approval-assignments/store-multiple": {
      "post": {
        "summary": "Create approval assignments in bulk",
        "operationId": "post-approval-assignments-store-multiple",
        "description": "Make a user or team the approver for several desks or rooms. Existing assignments are kept. Returns all assignments for the given desks or rooms. Requires the `admin` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApprovalAssignment"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rooms": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Room IDs. **Required** if `desks` is not set; cannot be sent with `desks`."
                  },
                  "desks": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Desk IDs. **Required** if `rooms` is not set; cannot be sent with `rooms`."
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The approving team. **Required** if `user_id` is not set."
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The approving user. **Required** if `team_id` is not set."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "rooms": [
                      "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
                      "6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a"
                    ],
                    "team_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-assignments/destroy-multiple": {
      "post": {
        "summary": "Delete approval assignments in bulk",
        "operationId": "post-approval-assignments-destroy-multiple",
        "description": "Remove a user or team as approver from several desks or rooms. Requires the `admin` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rooms": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Room IDs. **Required** if `desks` is not set; cannot be sent with `desks`."
                  },
                  "desks": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Desk IDs. **Required** if `rooms` is not set; cannot be sent with `rooms`."
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The approving team. **Required** if `user_id` is not set."
                  },
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The approving user. **Required** if `team_id` is not set."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "rooms": [
                      "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
                      "6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a"
                    ],
                    "team_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-exceptions": {
      "get": {
        "summary": "List approval exceptions",
        "operationId": "get-approval-exceptions",
        "description": "List your organisation's approval exceptions. Without `approvable_id` or `approvable_ids`, only exceptions that apply to every item of a type are returned. Requires the `settings.edit` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApprovalException"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "parameters": [
          {
            "name": "parent_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by exempt model class, e.g. `App\\Team`."
          },
          {
            "name": "approvable_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by model class, e.g. `App\\Desk`."
          },
          {
            "name": "approvable_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter by a single desk or room."
          },
          {
            "name": "approvable_ids",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by several desks or rooms. Send as `approvable_ids[]=…`.",
            "style": "form",
            "explode": true
          }
        ]
      },
      "put": {
        "summary": "Sync approval exceptions",
        "operationId": "put-approval-exceptions",
        "description": "Replace the approval exceptions for a type, or for the given desks or rooms, with the list sent. Requires the `settings.edit` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApprovalException"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "approvable_type",
                  "approval_exceptions"
                ],
                "properties": {
                  "approvable_type": {
                    "type": "string",
                    "description": "The model class, e.g. `App\\Desk` or `App\\Room`."
                  },
                  "approvable_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "A single desk or room. Treated as `approvable_ids` with one item."
                  },
                  "approvable_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Desks or rooms to sync. If neither this nor `approvable_id` is sent, the exceptions apply to every item of `approvable_type`."
                  },
                  "approval_exceptions": {
                    "type": "array",
                    "description": "The full list of exceptions. May be empty.",
                    "items": {
                      "type": "object",
                      "required": [
                        "parent_id",
                        "parent_type"
                      ],
                      "properties": {
                        "parent_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "parent_type": {
                          "type": "string",
                          "description": "`App\\User`, `App\\Team` or `App\\Role`."
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "approvable_type": "App\\Room",
                    "approvable_ids": [
                      "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f"
                    ],
                    "approval_exceptions": [
                      {
                        "parent_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
                        "parent_type": "App\\Team"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-settings/{type}": {
      "get": {
        "summary": "Get approval settings",
        "operationId": "get-approval-settings-type",
        "description": "Get your organisation's automatic approval setting for bookings or meetings. Defaults are returned if none has been saved. Requires the `settings.edit` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalSetting"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Invalid approval type"
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Booking",
                "Meeting"
              ]
            },
            "description": "Whether to manage booking or meeting approval settings"
          }
        ]
      },
      "put": {
        "summary": "Update approval settings",
        "operationId": "put-approval-settings-type",
        "description": "Set whether pending bookings or meetings are approved or declined automatically, and after how many minutes. Requires the `settings.edit` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalSetting"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Booking",
                "Meeting"
              ]
            },
            "description": "Whether to manage booking or meeting approval settings"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "auto_action",
                  "auto_action_minutes"
                ],
                "properties": {
                  "auto_action": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "decline",
                      "none"
                    ]
                  },
                  "auto_action_minutes": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "auto_action": "approve",
                    "auto_action_minutes": 60
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-statuses/meetings": {
      "get": {
        "summary": "List meeting approvals",
        "operationId": "get-approval-statuses-meetings",
        "description": "List meetings that you, or one of your teams, can approve, newest first, 10 per page. Requires the `read` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MeetingApprovalStatus"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "pending",
                "approved",
                "declined"
              ]
            },
            "description": "Which approvals to list.",
            "required": true
          },
          {
            "name": "room_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only meetings in this room."
          },
          {
            "name": "master_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only occurrences of this recurring meeting."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The page number."
          }
        ]
      }
    },
    "/approval-statuses/meetings/{approvalStatusId}": {
      "put": {
        "summary": "Approve or decline a meeting",
        "operationId": "put-approval-statuses-meetings-approvalStatusId",
        "description": "Set the approval status given by `{approvalStatusId}`. Declining deletes the meeting. The organiser is emailed. You must be an approver for the meeting. Requires the `read` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalStatus"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "approvalStatusId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the approval status"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "approved",
                      "declined"
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional reason, e.g. for declining."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "status": "declined",
                    "reason": "Room needed for a board meeting."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-statuses/meetings/series": {
      "post": {
        "summary": "Approve or decline a meeting series",
        "operationId": "post-approval-statuses-meetings-series",
        "description": "Set the approval status of every pending or approved meeting in a series. Declining deletes them. You must be an approver for the meetings. Requires the `read` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApprovalStatus"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No meetings found to approve"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status",
                  "master_id"
                ],
                "properties": {
                  "master_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the recurring meeting's master. Not validated by the request; an unknown ID returns 404."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "approved",
                      "declined"
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional reason, e.g. for declining."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "master_id": "07a15e44-d29b-4f04-adfa-33969fceea8e",
                    "status": "approved"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-statuses/bookings": {
      "get": {
        "summary": "List booking approvals",
        "operationId": "get-approval-statuses-bookings",
        "description": "List bookings that you, or one of your teams, can approve, newest first, 10 per page. Requires the `read` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "pending",
                "approved",
                "declined"
              ]
            },
            "description": "Which approvals to list.",
            "required": true
          },
          {
            "name": "master_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only bookings in this repeat booking."
          },
          {
            "name": "desk_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only bookings for this desk."
          },
          {
            "name": "office_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only bookings in this office."
          },
          {
            "name": "desk_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Only bookings for this desk type."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The page number."
          }
        ]
      }
    },
    "/approval-statuses/bookings/{approvalStatusId}": {
      "put": {
        "summary": "Approve or decline a booking",
        "operationId": "put-approval-statuses-bookings-approvalStatusId",
        "description": "Set the approval status given by `{approvalStatusId}`. Declining deletes the booking. The organiser is emailed. You must be an approver for the booking. Requires the `read` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalStatus"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "parameters": [
          {
            "name": "approvalStatusId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the approval status"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "approved",
                      "declined"
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional reason, e.g. for declining."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "status": "declined",
                    "reason": "Room needed for a board meeting."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/approval-statuses/bookings/series": {
      "post": {
        "summary": "Approve or decline a booking series",
        "operationId": "post-approval-statuses-bookings-series",
        "description": "Set the approval status of every pending or approved booking in a series. Declining deletes them. You must be an approver for the bookings. Requires the `read` scope.",
        "tags": [
          "Approvals"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApprovalStatus"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No bookings found to approve"
          },
          "422": {
            "description": "Validation error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status",
                  "master_id"
                ],
                "properties": {
                  "master_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the repeat booking. Not validated by the request; an unknown ID returns 404."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "approved",
                      "declined"
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional reason, e.g. for declining."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "master_id": "07a15e44-d29b-4f04-adfa-33969fceea8e",
                    "status": "approved"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rooms/availability": {
      "get": {
        "summary": "Get room availability over a date range",
        "description": "Check whether a room can be booked for the given time on each date in a range, applying the room's rules. If `additional_rooms` are given, a date is only available when every room is free. Requires the `meetings.manage` scope.",
        "operationId": "get-rooms-availability",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "room_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The room to check.",
            "required": true
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "First date of the range.",
            "required": true
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Last date of the range.",
            "required": true
          },
          {
            "name": "start_time",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "09:00"
            },
            "description": "Meeting start time in the office's timezone. Format `H:i`.",
            "required": true
          },
          {
            "name": "end_time",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "10:00"
            },
            "description": "Meeting end time in the office's timezone. Format `H:i`.",
            "required": true
          },
          {
            "name": "selected_dates[]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "date"
              }
            },
            "description": "Dates the user has selected; passed to the availability rules."
          },
          {
            "name": "additional_rooms[]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Other rooms the meeting will also occupy."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "string",
                        "format": "date"
                      },
                      "availability": {
                        "$ref": "#/components/schemas/RoomAvailability"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/rooms/check-time-availability": {
      "get": {
        "summary": "Check which rooms are free",
        "description": "Return the rooms from `room_id` that have no meeting overlapping the given time. Times are read in the timezone of the first room's office. Returns an empty body if `end_time` is not after `start_time`. Requires the `meetings.manage` scope.",
        "operationId": "get-rooms-check-time-availability",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "room_id[]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "The rooms to check.",
            "required": true
          },
          {
            "name": "start_time",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2025-05-02 09:00"
            },
            "description": "Start of the time range, parsed in the office's timezone.",
            "required": true
          },
          {
            "name": "end_time",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2025-05-02 10:00"
            },
            "description": "End of the time range, parsed in the office's timezone.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The rooms that are free. Empty body if `end_time` is not after `start_time`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoomModel"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "No rooms found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/rooms/rules": {
      "get": {
        "summary": "Get organisation room rules",
        "description": "Get the organisation-wide room rules, or the defaults if none have been saved. Requires one of these scopes: `settings.edit`, `meetings.read`, `reports.view`.",
        "operationId": "get-rooms-rules",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomRules"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update organisation room rules",
        "description": "Create or update the organisation-wide room rules. Fields you leave out fall back to the defaults, not the saved values. Returns an empty body. Requires the `settings.edit` scope.",
        "operationId": "put-rooms-rules",
        "tags": [
          "Rooms"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "restrict_to_working_hours": {
                    "type": "boolean"
                  },
                  "hide_room_meetings_from_office_attendance": {
                    "type": "boolean"
                  },
                  "restrict_future_bookings": {
                    "type": "boolean"
                  },
                  "max_future_days_bookable": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "max_future_days_bookable_exclude_weekends": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "confirm_meetings": {
                    "type": "boolean"
                  },
                  "delete_unconfirmed_meetings": {
                    "type": "boolean",
                    "description": "Cannot be `true` when `confirm_meetings` is `false`."
                  },
                  "confirm_before_minutes": {
                    "type": "integer"
                  },
                  "delete_after_minutes": {
                    "type": "integer"
                  },
                  "restrict_booking_length": {
                    "type": "boolean"
                  },
                  "max_bookable_length": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1440,
                    "description": "Maximum length in minutes."
                  },
                  "max_bookable_length_hours": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 24,
                    "description": "If given with `max_bookable_length_minutes`, overrides `max_bookable_length`."
                  },
                  "max_bookable_length_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 59
                  },
                  "usage_limit_enabled": {
                    "type": "boolean"
                  },
                  "usage_limit_amount": {
                    "type": "integer"
                  },
                  "usage_limit_period": {
                    "type": "string",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "buffer_times_enabled": {
                    "type": "boolean"
                  },
                  "minutes_before_meetings": {
                    "type": "integer"
                  },
                  "minutes_after_meetings": {
                    "type": "integer"
                  },
                  "repeat_meetings_enabled": {
                    "type": "boolean"
                  },
                  "multiple_dates_enabled": {
                    "type": "boolean"
                  },
                  "max_repeat_meeting_weeks": {
                    "type": "integer"
                  },
                  "disable_parallel_bookings": {
                    "type": "boolean"
                  },
                  "max_parallel_bookings": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "exceptions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "parent_id": {
                          "type": "string",
                          "description": "ID of the team, role or user the exception applies to."
                        },
                        "parent_type": {
                          "type": "string",
                          "description": "Required unless `days` is given."
                        },
                        "rule": {
                          "type": "string",
                          "description": "The rule being relaxed. Required unless `days` is given."
                        },
                        "period_amount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 365,
                          "description": "Required unless `days` is given."
                        },
                        "period_type": {
                          "type": "string",
                          "enum": [
                            "days",
                            "hours",
                            "weeks",
                            "months"
                          ],
                          "description": "Required unless `days` is given. `day`, `week` and `month` are also accepted."
                        },
                        "days": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 365,
                          "description": "Required unless `rule` is given."
                        }
                      },
                      "required": [
                        "parent_id"
                      ]
                    },
                    "description": "Replaces the rule exceptions. Exceptions not in the list are deleted."
                  },
                  "allow_attendees": {
                    "type": "boolean",
                    "description": "If `false`, roll calls and attendee capacity limits are turned off."
                  },
                  "out_of_hours_emails_enabled": {
                    "type": "boolean"
                  },
                  "out_of_hours_email_recipients": {
                    "type": "string",
                    "description": "Comma-separated email addresses. Required if `out_of_hours_emails_enabled` is `true`."
                  },
                  "out_of_hours_exceptions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "room_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "recipients": {
                          "type": "string",
                          "description": "Comma-separated email addresses. Required if `enabled` is `true`."
                        }
                      },
                      "required": [
                        "room_id",
                        "enabled"
                      ]
                    },
                    "description": "Per-room out-of-hours overrides. Ones not in the list are deleted."
                  },
                  "validation_failure_action": {
                    "type": "string",
                    "enum": [
                      "decline_immediately",
                      "decline_after_minutes",
                      "notify_user"
                    ]
                  },
                  "decline_after_minutes": {
                    "type": "integer"
                  },
                  "validation_failed_aditional_recipients": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Comma-separated email addresses."
                  },
                  "calendar_providers": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {}
                  },
                  "online_meeting_enabled_by_default": {
                    "type": "boolean"
                  },
                  "meeting_default_duration": {
                    "type": "integer"
                  },
                  "minimum_booking_notice_enabled": {
                    "type": "boolean"
                  },
                  "minimum_booking_notice_minutes": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "description": "Only saved when `minimum_booking_notice_enabled` is `true`."
                  },
                  "default_meeting_privacy": {
                    "type": "boolean"
                  },
                  "hide_meeting_title": {
                    "type": "boolean"
                  },
                  "hide_meeting_description": {
                    "type": "boolean"
                  },
                  "enforce_meeting_privacy_for_admins": {
                    "type": "boolean"
                  },
                  "hide_all_meeting_details": {
                    "type": "boolean",
                    "description": "Legacy flag. Sets both `hide_meeting_title` and `hide_meeting_description` when they are not given."
                  },
                  "hide_attendees_on_private_meetings": {
                    "type": "boolean"
                  },
                  "attendee_count_mode": {
                    "type": "string",
                    "enum": [
                      "hidden",
                      "optional",
                      "required"
                    ]
                  },
                  "allow_do_not_notify": {
                    "type": "boolean"
                  },
                  "enable_roll_calls": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "enable_roll_calls_before_meeting": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "limit_attendees_to_capacity": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "anticipated_location": {
                    "type": "string",
                    "description": "Read by the controller but not validated."
                  },
                  "allow_cross_day_bookings": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "allow_multiple_rooms_per_meeting": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "restrict_multiroom_meetings_to_linked_rooms": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "allow_gaps_in_linked_rooms": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "hide_restricted_rooms_from_view": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "setup_and_cleanup_times_enabled": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  }
                },
                "required": [
                  "restrict_to_working_hours",
                  "hide_room_meetings_from_office_attendance"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "restrict_to_working_hours": true,
                    "hide_room_meetings_from_office_attendance": false,
                    "restrict_future_bookings": true,
                    "max_future_days_bookable": 60,
                    "confirm_meetings": true,
                    "delete_unconfirmed_meetings": true,
                    "confirm_before_minutes": 10,
                    "delete_after_minutes": 15,
                    "usage_limit_enabled": true,
                    "usage_limit_amount": 5,
                    "usage_limit_period": "week",
                    "exceptions": [
                      {
                        "parent_id": "3f1c2b7a-8d4e-4a6b-9c1d-2e5f7a8b9c0d",
                        "parent_type": "App\\Team",
                        "rule": "max_future_days_bookable",
                        "period_amount": 90,
                        "period_type": "days"
                      }
                    ],
                    "attendee_count_mode": "optional"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK (empty body)"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/rooms/{roomId}/linked-rooms": {
      "get": {
        "summary": "Get a room's linked rooms",
        "description": "List the rooms linked to this room, which can be booked together with it. Requires the `read` scope. The room must belong to your organisation.",
        "operationId": "get-rooms-roomId-linked-rooms",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachable_rooms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Room"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/rooms/{roomId}/rules": {
      "get": {
        "summary": "Get a room's own rules",
        "description": "Get the rules saved for this room only. Returns an empty array if the room has no rules of its own. Requires the `settings.edit` scope.",
        "operationId": "get-rooms-roomId-rules",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RoomRules"
                    },
                    {
                      "type": "array",
                      "items": {},
                      "maxItems": 0
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "put": {
        "summary": "Update a room's rules",
        "description": "Create or update rules that override the organisation's rules for this room. Only the fields listed are saved; other organisation rule fields are validated but ignored. Requires the `settings.edit` scope.",
        "operationId": "put-rooms-roomId-rules",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "restrict_to_working_hours": {
                    "type": "boolean"
                  },
                  "hide_room_meetings_from_office_attendance": {
                    "type": "boolean"
                  },
                  "restrict_future_bookings": {
                    "type": "boolean"
                  },
                  "max_future_days_bookable": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "confirm_meetings": {
                    "type": "boolean"
                  },
                  "delete_unconfirmed_meetings": {
                    "type": "boolean",
                    "description": "Cannot be `true` when `confirm_meetings` is `false`."
                  },
                  "confirm_before_minutes": {
                    "type": "integer"
                  },
                  "delete_after_minutes": {
                    "type": "integer"
                  },
                  "allow_attendees": {
                    "type": "boolean",
                    "description": "If `false`, roll calls and attendee capacity limits are turned off."
                  },
                  "attendee_count_mode": {
                    "type": "string",
                    "enum": [
                      "hidden",
                      "optional",
                      "required"
                    ]
                  },
                  "allow_do_not_notify": {
                    "type": "boolean"
                  },
                  "exceptions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "parent_id": {
                          "type": "string",
                          "description": "ID of the team, role or user the exception applies to."
                        },
                        "parent_type": {
                          "type": "string",
                          "description": "Required unless `days` is given."
                        },
                        "rule": {
                          "type": "string",
                          "description": "The rule being relaxed. Required unless `days` is given."
                        },
                        "period_amount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 365,
                          "description": "Required unless `days` is given."
                        },
                        "period_type": {
                          "type": "string",
                          "enum": [
                            "days",
                            "hours",
                            "weeks",
                            "months"
                          ],
                          "description": "Required unless `days` is given. `day`, `week` and `month` are also accepted."
                        },
                        "days": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 365,
                          "description": "Required unless `rule` is given."
                        }
                      },
                      "required": [
                        "parent_id"
                      ]
                    },
                    "description": "Replaces the rule exceptions. Exceptions not in the list are deleted."
                  },
                  "enable_roll_calls": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "limit_attendees_to_capacity": {
                    "type": "boolean",
                    "description": "Read by the controller but not validated."
                  },
                  "disable_all_meeting_emails": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Defaults to `false`."
                  },
                  "disable_organizer_emails": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Defaults to `false`."
                  },
                  "disable_attendee_emails": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Defaults to `false`."
                  },
                  "disable_approval_emails": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Defaults to `false`."
                  }
                },
                "required": [
                  "restrict_to_working_hours",
                  "hide_room_meetings_from_office_attendance"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "restrict_to_working_hours": true,
                    "hide_room_meetings_from_office_attendance": false,
                    "confirm_meetings": true,
                    "delete_unconfirmed_meetings": false,
                    "confirm_before_minutes": 10,
                    "allow_attendees": true,
                    "attendee_count_mode": "required",
                    "disable_attendee_emails": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomRules"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a room's rules",
        "description": "Remove this room's own rules so the organisation's rules apply again. Auto-cancel times on its meetings are recalculated. Requires the `settings.edit` scope.",
        "operationId": "delete-rooms-roomId-rules",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/rooms/{roomId}/rules/active": {
      "get": {
        "summary": "Get a room's active rules",
        "description": "Get the rules that apply to this room: its own rules if it has any, otherwise the organisation's. Requires the `read` scope.",
        "operationId": "get-rooms-roomId-rules-active",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomRules"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/rooms/{roomId}/resources/{roomResourceId}": {
      "put": {
        "summary": "Attach a resource to a room",
        "description": "Attach a room resource, e.g. a screen, to the room. Attaching one that is already attached has no effect. Requires the `settings.edit` scope.",
        "operationId": "put-rooms-roomId-resources-roomResourceId",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room."
          },
          {
            "name": "roomResourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room resource."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "delete": {
        "summary": "Detach a resource from a room",
        "description": "Remove a room resource from the room. Requires the `settings.edit` scope.",
        "operationId": "delete-rooms-roomId-resources-roomResourceId",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room."
          },
          {
            "name": "roomResourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room resource."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/meetings/{meetingId}": {
      "get": {
        "summary": "Get a meeting",
        "description": "Get a single meeting. Send the `minimised` header for a smaller response. Requires the `meetings.read` scope. The meeting's room must belong to your organisation.",
        "operationId": "get-meetings-meetingId",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the meeting."
          },
          {
            "$ref": "#/components/parameters/minimised"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Meeting"
                    },
                    {
                      "$ref": "#/components/schemas/MinimisedMeeting"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update a meeting",
        "description": "Update a meeting, its rooms, attendees, services and custom fields. Changes sync to the room's calendar where it is integrated. Requires one of these scopes: `meetings.manage`, `meetings.manage.team`. You must be allowed to edit the meeting, e.g. as its organiser or with `meetings.write.others`.",
        "operationId": "put-meetings-meetingId",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the meeting."
          },
          {
            "$ref": "#/components/parameters/minimised"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required in practice: the request fails with a validation error if it is empty, unless you can't edit the meeting details."
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000
                  },
                  "description_html": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000,
                    "description": "Defaults to `description` if left out."
                  },
                  "private": {
                    "type": "boolean"
                  },
                  "confirmed": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Confirm the meeting. If that is the only change allowed, the meeting is saved and returned straight away."
                  },
                  "early_finish": {
                    "type": "boolean",
                    "description": "Don't send attendee update emails."
                  },
                  "start_time": {
                    "type": "string",
                    "example": "2025-05-02 09:00",
                    "description": "Format `Y-m-d H:i`."
                  },
                  "end_time": {
                    "type": "string",
                    "example": "2025-05-02 10:00",
                    "description": "Format `Y-m-d H:i`. Must be after `start_time`."
                  },
                  "start_time_tz": {
                    "$ref": "#/components/schemas/Timezone"
                  },
                  "end_time_tz": {
                    "$ref": "#/components/schemas/Timezone"
                  },
                  "theme": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "logo_asset_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "room": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    ],
                    "description": "Room to set on the meeting, as an ID or an object with `id`."
                  },
                  "new_room": {
                    "type": "string",
                    "description": "ID of a room to move the meeting to. The string `null` means no change."
                  },
                  "rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Replaces the meeting's rooms. Each must belong to your organisation."
                  },
                  "additional_rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Linked rooms to add. Only accepted when the organisation allows multiple rooms per meeting."
                  },
                  "locations": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "description": "Replaces the meeting's locations."
                  },
                  "service_requests": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "service_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Must belong to your organisation and be usable in the room by the current user."
                        },
                        "room_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "One of the meeting's rooms."
                        },
                        "request_notes": {
                          "type": "string",
                          "maxLength": 1000
                        },
                        "purchase_order": {
                          "type": "string",
                          "maxLength": 50
                        },
                        "required_at": {
                          "type": "string",
                          "description": "When the service is needed. Must fall within the meeting and the service's cut-off."
                        },
                        "service_items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "service_item_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Must belong to the service."
                              },
                              "quantity": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Must be within the item's minimum and maximum quantity."
                              }
                            },
                            "required": [
                              "service_item_id"
                            ]
                          }
                        }
                      },
                      "required": [
                        "service_id",
                        "room_id",
                        "required_at",
                        "service_items"
                      ]
                    }
                  },
                  "attendees": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "external_contact_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "attendance_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "in_person",
                            "remote",
                            "unknown",
                            null
                          ]
                        },
                        "clearooms_only": {
                          "type": "boolean",
                          "description": "Don't send this attendee calendar emails. Only applied when the room rules allow it."
                        },
                        "visitor": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "An existing visitor."
                            },
                            "user_id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "Host user. Required with `visitor`."
                            },
                            "name": {
                              "type": "string",
                              "description": "Required with `visitor`."
                            },
                            "office_id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "Required with `visitor`."
                            },
                            "expected_arrival": {
                              "type": "string",
                              "description": "Required with `visitor`."
                            },
                            "dates": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "date"
                              },
                              "minItems": 1
                            },
                            "company": {
                              "type": "string",
                              "maxLength": 255,
                              "description": "Required with `visitor` unless the visitor rules make it optional."
                            },
                            "email": {
                              "type": "string",
                              "format": "email",
                              "description": "Required with `visitor` if the visitor rules make it mandatory."
                            },
                            "car_registration_number": {
                              "type": "string",
                              "maxLength": 255,
                              "description": "Required with `visitor` if the visitor rules make it mandatory."
                            },
                            "locale": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Required with `visitor` if the visitor rules make it mandatory."
                            },
                            "phone": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 40,
                              "description": "The visitor's phone number. Only applied when the attendee is newly registered as a visitor; ignored for attendees who already are one."
                            },
                            "visitor_type_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "An ArrivalsHQ visitor type in your organisation. Only applied when the attendee is newly registered as a visitor; ignored for attendees who already are one."
                            },
                            "send_invite": {
                              "type": "boolean",
                              "default": true,
                              "description": "Whether to email the visitor their invitation. Only applied when the attendee is newly registered as a visitor; ignored for attendees who already are one."
                            },
                            "booking_location_visible": {
                              "type": "boolean",
                              "default": true,
                              "description": "Whether the visitor is shown where their bookings are on the floor plan. Only applied when the attendee is newly registered as a visitor; ignored for attendees who already are one."
                            }
                          },
                          "description": "Register this attendee as a visitor."
                        }
                      }
                    }
                  },
                  "attendee_count": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "custom_fields": {
                    "type": "object",
                    "description": "Custom field values keyed by custom field ID. Required fields for the room must be present.",
                    "additionalProperties": true
                  },
                  "setup_time": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "Required with `setup_time_unit`."
                  },
                  "setup_time_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "minutes",
                      "hours",
                      null
                    ],
                    "description": "Required with `setup_time`."
                  },
                  "cleanup_time": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "Required with `cleanup_time_unit`."
                  },
                  "cleanup_time_unit": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "minutes",
                      "hours",
                      null
                    ],
                    "description": "Required with `cleanup_time`."
                  },
                  "organiser": {
                    "type": "string",
                    "format": "email",
                    "description": "Change the organiser. Needs the `meetings.create.others` scope. Read by the controller but not validated."
                  },
                  "organiser_name": {
                    "type": "string",
                    "description": "Read by the controller but not validated."
                  },
                  "brand_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Read by the controller but not validated."
                  },
                  "display_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Read by the controller but not validated."
                  },
                  "display_slogan": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Read by the controller but not validated."
                  },
                  "updated_via_portal": {
                    "type": "boolean",
                    "description": "Set by the web portal. Applies stricter permission checks and emails the organiser. Read by the controller but not validated."
                  }
                },
                "required": [
                  "private",
                  "start_time",
                  "end_time",
                  "start_time_tz",
                  "end_time_tz"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "subject": "Quarterly planning",
                    "private": false,
                    "start_time": "2025-05-02 09:00",
                    "end_time": "2025-05-02 10:30",
                    "start_time_tz": "Europe/London",
                    "end_time_tz": "Europe/London",
                    "attendees": [
                      {
                        "name": "Jane Doe",
                        "email": "jane.doe@example.com",
                        "required": true,
                        "attendance_type": "in_person"
                      }
                    ],
                    "service_requests": [
                      {
                        "service_id": "6b1e4c2a-1f3d-4e5a-8b7c-9d0e1f2a3b4c",
                        "room_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                        "required_at": "2025-05-02 09:00",
                        "service_items": [
                          {
                            "service_item_id": "0f9e8d7c-6b5a-4c3d-2e1f-0a9b8c7d6e5f",
                            "quantity": 6
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Meeting"
                    },
                    {
                      "$ref": "#/components/schemas/MinimisedMeeting"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a meeting",
        "description": "Delete a meeting and remove it from the room's calendar. The organiser is emailed if someone else deletes it. Requires one of these scopes: `meetings.manage`, `meetings.manage.team`. Deleting another user's meeting needs `meetings.write.others`, team management of the organiser, or delegate access.",
        "operationId": "delete-meetings-meetingId",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the meeting."
          },
          {
            "name": "confirmed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Send `false` to be warned with a 409 if the meeting spans linked rooms. Leave out to delete without the check."
          },
          {
            "name": "room_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional room ID; validated but not otherwise used."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "409": {
            "description": "The meeting has linked rooms and `confirmed` is `false`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/meetings/{meetingId}/future": {
      "put": {
        "summary": "Update this and future occurrences",
        "description": "Split a recurring series at this occurrence and apply the changes to it and every later occurrence. Fails for non-recurring meetings, edited occurrences and calendar-integrated rooms. Requires one of these scopes: `meetings.manage`, `meetings.manage.team`. You must be the organiser or be allowed to edit their meetings.",
        "operationId": "put-meetings-meetingId-future",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the meeting."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000
                  },
                  "description_html": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60000,
                    "description": "Defaults to `description` if left out."
                  },
                  "private": {
                    "type": "boolean"
                  },
                  "logo_asset_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "room_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Room for the updated occurrences. Neither this room nor the current room can be calendar-integrated."
                  },
                  "start_time": {
                    "type": "string",
                    "example": "09:00",
                    "description": "New start time for each occurrence. Format `H:i`."
                  },
                  "end_time": {
                    "type": "string",
                    "example": "10:00",
                    "description": "New end time for each occurrence. Format `H:i`."
                  },
                  "start_time_tz": {
                    "$ref": "#/components/schemas/Timezone",
                    "description": "Read by the controller but not validated."
                  },
                  "end_time_tz": {
                    "$ref": "#/components/schemas/Timezone",
                    "description": "Read by the controller but not validated."
                  },
                  "theme": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "update_services": {
                    "type": "boolean"
                  },
                  "attendee_count": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "service_requests": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "service_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Must belong to your organisation and be usable in the room by the current user."
                        },
                        "room_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "One of the meeting's rooms."
                        },
                        "request_notes": {
                          "type": "string",
                          "maxLength": 1000
                        },
                        "purchase_order": {
                          "type": "string",
                          "maxLength": 50
                        },
                        "required_at": {
                          "type": "string",
                          "description": "When the service is needed. Must fall within the meeting and the service's cut-off."
                        },
                        "service_items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "service_item_id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "Must belong to the service."
                              },
                              "quantity": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Must be within the item's minimum and maximum quantity."
                              }
                            },
                            "required": [
                              "service_item_id"
                            ]
                          }
                        }
                      },
                      "required": [
                        "service_id",
                        "room_id",
                        "required_at",
                        "service_items"
                      ]
                    }
                  },
                  "attendees": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "external_contact_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "attendance_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "in_person",
                            "remote",
                            "unknown",
                            null
                          ]
                        },
                        "clearooms_only": {
                          "type": "boolean",
                          "description": "Don't send this attendee calendar emails. Only applied when the room rules allow it."
                        },
                        "visitor": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "An existing visitor."
                            },
                            "user_id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "Host user. Required with `visitor`."
                            },
                            "name": {
                              "type": "string",
                              "description": "Required with `visitor`."
                            },
                            "office_id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "Required with `visitor`."
                            },
                            "expected_arrival": {
                              "type": "string",
                              "description": "Required with `visitor`."
                            },
                            "dates": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "date"
                              },
                              "minItems": 1
                            },
                            "company": {
                              "type": "string",
                              "maxLength": 255,
                              "description": "Required with `visitor` unless the visitor rules make it optional."
                            },
                            "email": {
                              "type": "string",
                              "format": "email",
                              "description": "Required with `visitor` if the visitor rules make it mandatory."
                            },
                            "car_registration_number": {
                              "type": "string",
                              "maxLength": 255,
                              "description": "Required with `visitor` if the visitor rules make it mandatory."
                            },
                            "locale": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Required with `visitor` if the visitor rules make it mandatory."
                            }
                          },
                          "description": "Register this attendee as a visitor."
                        }
                      }
                    },
                    "description": "Read by the controller but not validated."
                  },
                  "brand_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Read by the controller but not validated."
                  },
                  "display_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Read by the controller but not validated."
                  },
                  "display_slogan": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Read by the controller but not validated."
                  }
                },
                "required": [
                  "private",
                  "room_id",
                  "start_time",
                  "end_time",
                  "update_services"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "subject": "Weekly stand-up",
                    "private": false,
                    "room_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                    "start_time": "09:30",
                    "end_time": "09:45",
                    "start_time_tz": "Europe/London",
                    "end_time_tz": "Europe/London",
                    "update_services": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK, returns the first updated occurrence",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meeting"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete this and future occurrences",
        "description": "Delete this occurrence and every later one in its recurring series. Fails with a validation error for non-recurring meetings and edited occurrences. Requires one of these scopes: `meetings.manage`, `meetings.manage.team`. You must be the organiser or be allowed to edit their meetings.",
        "operationId": "delete-meetings-meetingId-future",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the meeting."
          },
          {
            "name": "confirmed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Send `false` to be warned with a 409 if the meeting spans linked rooms."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "409": {
            "description": "The meeting has linked rooms and `confirmed` is `false`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/users/me/meetings/{start}/{end}": {
      "get": {
        "summary": "Get my meetings",
        "description": "List the current user's meetings that start within the date range, excluding series masters. Results are cached for five minutes. Requires the `meetings.read` scope.",
        "operationId": "get-users-me-meetings-start-end",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "start",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date of the range, e.g. `2025-05-01`. Parsed to the start of that day."
          },
          {
            "name": "end",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "End date of the range, e.g. `2025-05-07`. Parsed to the end of that day."
          },
          {
            "$ref": "#/components/parameters/minimised"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Meeting"
                      },
                      {
                        "$ref": "#/components/schemas/MinimisedMeeting"
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/services/{serviceId}/documents": {
      "post": {
        "summary": "Upload service documents",
        "description": "Upload one or more documents, e.g. a menu, to a service. Requires the `settings.services.manage` scope.",
        "operationId": "post-services-serviceId-documents",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "serviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the service."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "documents[]": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "Files of up to 20 MB (20480 KB) each."
                  }
                },
                "required": [
                  "documents[]"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "documents[]": [
                      "menu.pdf"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "documents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceDocument"
                      },
                      "description": "All of the service's documents."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/services/{serviceId}/documents/{mediaId}": {
      "delete": {
        "summary": "Delete a service document",
        "description": "Delete a document from a service. Requires the `settings.services.manage` scope.",
        "operationId": "delete-services-serviceId-documents-mediaId",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "serviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the service."
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the uploaded document."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Service or document not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/services/available": {
      "post": {
        "summary": "Get available services",
        "description": "List the services the current user can order, filtered by the user's teams, roles and the meeting's rooms. Each service says whether it is available for the given time. No scope is required.",
        "operationId": "post-services-available",
        "tags": [
          "Meetings"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "meeting_room": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The meeting's room. Read by the controller but not validated."
                  },
                  "meeting_rooms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "All of the meeting's rooms. Read by the controller but not validated."
                  },
                  "start_time": {
                    "type": "string",
                    "description": "Meeting start, used to work out `available`. Read by the controller but not validated."
                  },
                  "end_time": {
                    "type": "string",
                    "description": "Meeting end, used to work out `available`. Read by the controller but not validated."
                  },
                  "timezone": {
                    "$ref": "#/components/schemas/Timezone",
                    "description": "Timezone of `start_time` and `end_time`. Read by the controller but not validated."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "meeting_room": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                    "start_time": "2025-05-02 09:00",
                    "end_time": "2025-05-02 10:00",
                    "timezone": "Europe/London"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Service"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/service-settings": {
      "get": {
        "summary": "Get service settings",
        "description": "Get your organisation's service settings. Returns 204 if none have been saved. Requires one of these scopes: `settings.services.manage`, `meetings.manage`.",
        "operationId": "get-service-settings",
        "tags": [
          "Meetings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceSettings"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Update service settings",
        "description": "Create or update your organisation's service settings. Fields you leave out keep their current value. Requires the `settings.services.manage` scope.",
        "operationId": "post-service-settings",
        "tags": [
          "Meetings"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mandatory_purchase_order_label": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "purchase_order_label": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "mandatory_purchase_order_label": true,
                    "purchase_order_label": "PO number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceSettings"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceSettings"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/service-requests": {
      "get": {
        "summary": "List service requests",
        "description": "List service requests for your organisation's services, ordered by required time. Paginated (5 per page) when `paginate` is true. Requires the `services.provider.read` scope.",
        "operationId": "get-service-requests",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start of the date range for `required_at`. Defaults to today."
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End of the date range for `required_at`. Defaults to today."
          },
          {
            "name": "include_cancelled_meetings",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Include requests whose meeting was deleted."
          },
          {
            "name": "paginate",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Return paginated results."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "closed"
              ]
            },
            "description": "Only used with `paginate`. `active` limits to upcoming, non-deleted requests; `closed` to past ones."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Page number when paginating."
          },
          {
            "name": "filter_service",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only requests for this service."
          },
          {
            "name": "filter_owner",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Only requests for services with this provider email."
          },
          {
            "name": "filter_office",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only requests in rooms in this office."
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search by order number."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ServiceRequestDashboard"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ServiceRequestDashboard"
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/service-requests/{serviceRequestId}": {
      "get": {
        "summary": "Get a service request",
        "description": "Get a single service request, including deleted ones. Requires the `services.provider.read` scope. The service must belong to your organisation.",
        "operationId": "get-service-requests-serviceRequestId",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "serviceRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the service request."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceRequestDashboard"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "put": {
        "summary": "Update a service request",
        "description": "Update a service request's status, notes, purchase order and items as the provider. Setting the status to `Cancelled by Organiser` deletes it; updating a deleted request restores it first. Requires the `services.provider.edit` scope. The service must belong to your organisation.",
        "operationId": "put-service-requests-serviceRequestId",
        "tags": [
          "Meetings"
        ],
        "parameters": [
          {
            "name": "serviceRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the service request."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "Accepted",
                      "Rejected",
                      "Requested",
                      "Cancelled by Organiser",
                      "Closed (Fulfilled)"
                    ]
                  },
                  "provider_notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "purchase_order": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50
                  },
                  "service_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "service_items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "service_item_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "quantity": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Must be within the item's minimum and maximum quantity."
                        }
                      },
                      "required": [
                        "service_item_id"
                      ]
                    }
                  }
                },
                "required": [
                  "status",
                  "service_id"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "status": "Accepted",
                    "provider_notes": "Delivered to reception",
                    "service_id": "6b1e4c2a-1f3d-4e5a-8b7c-9d0e1f2a3b4c",
                    "service_items": [
                      {
                        "service_item_id": "0f9e8d7c-6b5a-4c3d-2e1f-0a9b8c7d6e5f",
                        "quantity": 8
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceRequestDashboard"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/currencies": {
      "get": {
        "summary": "List currencies",
        "description": "List all currencies, ordered by name. No scope is required.",
        "operationId": "get-currencies",
        "tags": [
          "General"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Currency"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/currencies/accepted": {
      "get": {
        "summary": "List accepted currencies",
        "description": "List the currencies that services can be charged in, ordered by name. No scope is required.",
        "operationId": "get-currencies-accepted",
        "tags": [
          "General"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Currency"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/currencies/{currencyId}": {
      "get": {
        "summary": "Get a currency",
        "description": "Get a single currency. No scope is required.",
        "operationId": "get-currencies-currencyId",
        "tags": [
          "General"
        ],
        "parameters": [
          {
            "name": "currencyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the currency."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Currency"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/events": {
      "get": {
        "summary": "List events",
        "description": "List your organisation's events, ordered by date. Paginated (10 per page) when `paginate` is true. Requires the `events.read` scope.",
        "operationId": "get-events",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "description": "Start of the date range. Only applied together with `end_date`."
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "description": "End of the date range. Only applied together with `start_date`."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "active",
                "draft",
                "closed",
                null
              ]
            },
            "description": "Filter by status."
          },
          {
            "name": "office_id",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            },
            "description": "Filter to one office."
          },
          {
            "name": "paginate",
            "in": "query",
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "description": "Return paginated results."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Event"
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "post": {
        "summary": "Create an event",
        "description": "Create an event in one of your offices. Requires one of these scopes: `admin`, `events.manage`.",
        "operationId": "post-events",
        "tags": [
          "Events"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "office_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Must be an office in your organisation."
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "start_time": {
                    "type": "string",
                    "example": "18:00:00",
                    "description": "Format `H:i:s`."
                  },
                  "end_time": {
                    "type": "string",
                    "example": "21:00:00",
                    "description": "Format `H:i:s`. Must be after `start_time`."
                  },
                  "capacity": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "closed"
                    ]
                  }
                },
                "required": [
                  "name",
                  "office_id",
                  "date",
                  "start_time",
                  "end_time",
                  "capacity",
                  "status"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Summer social",
                    "description": "Drinks on the terrace.",
                    "office_id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
                    "date": "2025-07-18",
                    "start_time": "18:00:00",
                    "end_time": "21:00:00",
                    "capacity": 50,
                    "status": "active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/events/{eventId}": {
      "put": {
        "summary": "Update an event",
        "description": "Replace an event's details. Requires one of these scopes: `admin`, `events.manage`.",
        "operationId": "put-events-eventId",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the event."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "office_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Must be an office in your organisation."
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "start_time": {
                    "type": "string",
                    "example": "18:00:00",
                    "description": "Format `H:i:s`."
                  },
                  "end_time": {
                    "type": "string",
                    "example": "21:00:00",
                    "description": "Format `H:i:s`. Must be after `start_time`."
                  },
                  "capacity": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "closed"
                    ]
                  }
                },
                "required": [
                  "name",
                  "office_id",
                  "date",
                  "start_time",
                  "end_time",
                  "capacity",
                  "status"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Summer social",
                    "description": "Drinks on the terrace.",
                    "office_id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
                    "date": "2025-07-18",
                    "start_time": "18:00:00",
                    "end_time": "21:00:00",
                    "capacity": 50,
                    "status": "active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete an event",
        "description": "Close and delete an event. Requires one of these scopes: `admin`, `events.manage`.",
        "operationId": "delete-events-eventId",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the event."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/events/users": {
      "post": {
        "summary": "Book onto an event",
        "description": "Book the current user onto an event. Rebooking restores a cancelled booking. Fails with a validation error if the event is full. Requires the `events.read` scope.",
        "operationId": "post-events-users",
        "tags": [
          "Events"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "event_id"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "event_id": "4d3c2b1a-0f9e-4d8c-7b6a-5e4f3d2c1b0a"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/events/{eventId}/users": {
      "delete": {
        "summary": "Cancel my event booking",
        "description": "Cancel the current user's booking on an event. Requires the `events.read` scope.",
        "operationId": "delete-events-eventId-users",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the event."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/vehicles/{vehicleId}/set-default": {
      "put": {
        "summary": "Set default vehicle",
        "description": "Make the vehicle the authenticated user's default. Returns 404 if the vehicle is not linked to the user. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "put-vehicles-vehicleId-set-default",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the vehicle."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/vehicles": {
      "get": {
        "summary": "List my vehicles",
        "description": "List the authenticated user's vehicles. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-vehicles",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a vehicle",
        "description": "Add a vehicle for the authenticated user. If the user already has a vehicle with this registration it is updated instead; a registration already used by someone else in the organisation returns 422. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-vehicles",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "registration_number": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "make": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "model": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "fuel_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "year": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1900,
                    "description": "Between 1900 and next year."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  }
                },
                "required": [
                  "registration_number"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "registration_number": "AB12 CDE",
                    "make": "Ford",
                    "model": "Focus",
                    "color": "Blue",
                    "fuel_type": "Petrol",
                    "year": 2021,
                    "notes": "Usually parked on level 2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/vehicles/{vehicleId}": {
      "get": {
        "summary": "Get a vehicle",
        "description": "Get a vehicle the user owns, a pool car they can access, or any vehicle in the organisation if they can manage users. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-vehicles-vehicleId",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the vehicle."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update a vehicle",
        "description": "Update a vehicle. `make`, `model` and `color` can't change while an image is being generated. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "put-vehicles-vehicleId",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the vehicle."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "registration_number": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Sometimes: required if present."
                  },
                  "make": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "model": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "fuel_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "year": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1900,
                    "description": "Between 1900 and next year."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "registration_number": "AB12 CDE",
                    "make": "Ford",
                    "model": "Focus",
                    "color": "Blue",
                    "fuel_type": "Petrol",
                    "year": 2021,
                    "notes": "Usually parked on level 2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a vehicle",
        "description": "Remove the vehicle from the authenticated user. The vehicle is deleted if no other users are linked to it. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "delete-vehicles-vehicleId",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the vehicle."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/users/{userId}/vehicles/{vehicleId}": {
      "delete": {
        "summary": "Delete a vehicle for a user",
        "description": "Remove a vehicle from the given user in your organisation. Requires the `settings.users.manage` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "delete-users-userId-vehicles-vehicleId",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          },
          {
            "name": "vehicleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the vehicle."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/pool-cars": {
      "get": {
        "summary": "List pool cars",
        "description": "List the organisation's pool cars. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-pool-cars",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a pool car",
        "description": "Add a pool car to the organisation. Returns 422 if the registration is already used in the organisation. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-pool-cars",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "registration_number": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "make": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "model": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "fuel_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "year": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1900,
                    "description": "Between 1900 and next year."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  }
                },
                "required": [
                  "registration_number"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "registration_number": "AB12 CDE",
                    "make": "Ford",
                    "model": "Focus",
                    "color": "Blue",
                    "fuel_type": "Petrol",
                    "year": 2021,
                    "notes": "Usually parked on level 2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/pool-cars/{poolCarId}": {
      "get": {
        "summary": "Get a pool car",
        "description": "Get a pool car, including its allocations. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-pool-cars-poolCarId",
        "parameters": [
          {
            "name": "poolCarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the pool car."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "put": {
        "summary": "Update a pool car",
        "description": "Update a pool car. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "put-pool-cars-poolCarId",
        "parameters": [
          {
            "name": "poolCarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the pool car."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "registration_number": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Sometimes: only validated if present."
                  },
                  "make": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "model": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "fuel_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "year": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1900,
                    "description": "Between 1900 and next year."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "registration_number": "AB12 CDE",
                    "make": "Ford",
                    "model": "Focus",
                    "color": "Blue",
                    "fuel_type": "Petrol",
                    "year": 2021,
                    "notes": "Usually parked on level 2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a pool car",
        "description": "Delete a pool car. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "delete-pool-cars-poolCarId",
        "parameters": [
          {
            "name": "poolCarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the pool car."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/pool-cars/{poolCarId}/allocations": {
      "get": {
        "summary": "List pool car allocations",
        "description": "List the users, teams and roles a pool car is allocated to. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-pool-cars-poolCarId-allocations",
        "parameters": [
          {
            "name": "poolCarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the pool car."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoolCarAllocation"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "summary": "Allocate a pool car",
        "description": "Allocate a pool car to a user, team or role. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-pool-cars-poolCarId-allocations",
        "parameters": [
          {
            "name": "poolCarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the pool car."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allocatable_type": {
                    "type": "string",
                    "enum": [
                      "user",
                      "team",
                      "role"
                    ]
                  },
                  "allocatable_id": {
                    "type": "string",
                    "description": "The ID of the user, team or role."
                  }
                },
                "required": [
                  "allocatable_type",
                  "allocatable_id"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "allocatable_type": "team",
                    "allocatable_id": "3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The allocation already existed (firstOrCreate)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolCarAllocation"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolCarAllocation"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/pool-cars/{poolCarId}/allocations/{allocationId}": {
      "delete": {
        "summary": "Remove a pool car allocation",
        "description": "Remove an allocation from a pool car. Requires the `settings.edit` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "delete-pool-cars-poolCarId-allocations-allocationId",
        "parameters": [
          {
            "name": "poolCarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the pool car."
          },
          {
            "name": "allocationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the allocation."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/parking-permit-types": {
      "get": {
        "summary": "List parking permit types",
        "description": "List the available parking permit types. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-parking-permit-types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParkingPermitType"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/parking-permits/{parkingPermitId}/document": {
      "post": {
        "summary": "Replace a permit document",
        "description": "Upload a new document for a parking permit. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. The token also needs `parking.permits.manage.own` for your own permit, or `parking.permits.manage.others` for someone else's.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-parking-permits-parkingPermitId-document",
        "parameters": [
          {
            "name": "parkingPermitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the parking permit."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF, JPG or PNG, up to 10 MB."
                  }
                },
                "required": [
                  "document"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "document": "(binary)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParkingPermit"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/parking-permits/pending": {
      "get": {
        "summary": "List pending parking permits",
        "description": "List the organisation's parking permits awaiting approval, oldest first. Requires the `write` scope. Admins, or tokens with `parking.permits.manage.others`, only.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-parking-permits-pending",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParkingPermit"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/parking-permits/{parkingPermitId}/approve": {
      "post": {
        "summary": "Approve a parking permit",
        "description": "Approve a pending parking permit and email the permit holder. Returns 409 if it has already been decided. Requires the `write` scope. Admins, or tokens with `parking.permits.manage.others`, only.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-parking-permits-parkingPermitId-approve",
        "parameters": [
          {
            "name": "parkingPermitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the parking permit."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParkingPermit"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "409": {
            "description": "The permit has already been decided."
          }
        }
      }
    },
    "/parking-permits/{parkingPermitId}/reject": {
      "post": {
        "summary": "Reject a parking permit",
        "description": "Reject a pending parking permit and email the permit holder. Returns 409 if it has already been decided. Requires the `write` scope. Admins, or tokens with `parking.permits.manage.others`, only.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-parking-permits-parkingPermitId-reject",
        "parameters": [
          {
            "name": "parkingPermitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the parking permit."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rejection_reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "rejection_reason": "The document is illegible."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParkingPermit"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "409": {
            "description": "The permit has already been decided."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/parking-permits": {
      "get": {
        "summary": "List my parking permits",
        "description": "List the authenticated user's parking permits, newest first. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-parking-permits",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParkingPermit"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a parking permit",
        "description": "Upload a parking permit for the authenticated user. It is approved straight away if you can approve permits, otherwise it is pending. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. The token also needs one of `parking.permits.manage.own` or `parking.permits.manage.others`.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-parking-permits",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "parking_permit_type_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "display_name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "reference_number": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "issuer": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "expires_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Can't be in the past."
                  },
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF, JPG or PNG, up to 10 MB."
                  }
                },
                "required": [
                  "parking_permit_type_id",
                  "display_name",
                  "reference_number",
                  "issuer",
                  "document"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "parking_permit_type_id": "7c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
                    "display_name": "Residents permit",
                    "reference_number": "RP-104233",
                    "issuer": "Example Borough Council",
                    "expires_on": "2027-03-31",
                    "document": "(binary)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParkingPermit"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/parking-permits/{parkingPermitId}": {
      "get": {
        "summary": "Get a parking permit",
        "description": "Get a parking permit. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. For your own permit the token also needs one of `parking.permits.view.own` or `parking.permits.manage.own`; for someone else's, `parking.permits.manage.others` (or admin).",
        "tags": [
          "Parking"
        ],
        "operationId": "get-parking-permits-parkingPermitId",
        "parameters": [
          {
            "name": "parkingPermitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the parking permit."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParkingPermit"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update a parking permit",
        "description": "Update a parking permit. If the holder changes the permit type of their own permit, it goes back to pending approval. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. The token also needs `parking.permits.manage.own` for your own permit, or `parking.permits.manage.others` for someone else's.",
        "tags": [
          "Parking"
        ],
        "operationId": "put-parking-permits-parkingPermitId",
        "parameters": [
          {
            "name": "parkingPermitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the parking permit."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parking_permit_type_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Sometimes: required if present."
                  },
                  "display_name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Sometimes: required if present."
                  },
                  "reference_number": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Sometimes: required if present."
                  },
                  "issuer": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Sometimes: required if present."
                  },
                  "expires_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "display_name": "Residents permit 2027",
                    "expires_on": "2027-12-31"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParkingPermit"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a parking permit",
        "description": "Delete a parking permit. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. The token also needs `parking.permits.manage.own` for your own permit, or `parking.permits.manage.others` for someone else's.",
        "tags": [
          "Parking"
        ],
        "operationId": "delete-parking-permits-parkingPermitId",
        "parameters": [
          {
            "name": "parkingPermitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the parking permit."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/users/{userId}/parking-permits": {
      "get": {
        "summary": "List a user's parking permits",
        "description": "List a user's parking permits, newest first. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. For yourself the token also needs one of `parking.permits.view.own` or `parking.permits.manage.own`; for another user in your organisation, `parking.permits.manage.others`.",
        "tags": [
          "Parking"
        ],
        "operationId": "get-users-userId-parking-permits",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParkingPermit"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a parking permit for a user",
        "description": "Upload a parking permit on behalf of a user in your organisation. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. The token also needs `parking.permits.manage.others`.",
        "tags": [
          "Parking"
        ],
        "operationId": "post-users-userId-parking-permits",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "parking_permit_type_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "display_name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "reference_number": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "issuer": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "expires_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Can't be in the past."
                  },
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF, JPG or PNG, up to 10 MB."
                  }
                },
                "required": [
                  "parking_permit_type_id",
                  "display_name",
                  "reference_number",
                  "issuer",
                  "document"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "parking_permit_type_id": "7c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
                    "display_name": "Residents permit",
                    "reference_number": "RP-104233",
                    "issuer": "Example Borough Council",
                    "expires_on": "2027-03-31",
                    "document": "(binary)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParkingPermit"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/users/{userId}/parking-permits/{parkingPermitId}": {
      "delete": {
        "summary": "Delete a user's parking permit",
        "description": "Delete a parking permit belonging to a user in your organisation. Returns 403 if Parking Permits is disabled for the organisation. Requires the `write` scope. The token also needs `parking.permits.manage.others`.",
        "tags": [
          "Parking"
        ],
        "operationId": "delete-users-userId-parking-permits-parkingPermitId",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          },
          {
            "name": "parkingPermitId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the parking permit."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/reports/trace/{userId}/{from}/{to}": {
      "get": {
        "summary": "Get a trace report",
        "description": "List a user's bookings in the date range, each with the other bookings in the same office that day and their distance from the user's desk. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-trace-userId-from-to",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          },
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date, e.g. `2026-01-01`."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "End date, e.g. `2026-01-31`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BookingWithDesk"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "trace": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "desk_name": {
                                  "type": "string"
                                },
                                "user_name": {
                                  "type": "string"
                                },
                                "booked_by_user_name": {
                                  "type": "string",
                                  "description": "The name of the user who made the booking, or an empty string."
                                },
                                "reference_desk": {
                                  "type": "string",
                                  "description": "Name of the traced user's desk."
                                },
                                "distance": {
                                  "type": "string",
                                  "description": "Distance from the reference desk, e.g. `3.2m`, or `unknown` if the office has no scale."
                                },
                                "checkin_status": {
                                  "type": "string",
                                  "enum": [
                                    "attended",
                                    "cancelled",
                                    "not required",
                                    "pending",
                                    ""
                                  ],
                                  "description": "The check-in status, or an empty string if the booking does not require check-in."
                                },
                                "date": {
                                  "type": "string",
                                  "description": "Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
                                },
                                "end_date": {
                                  "type": "string",
                                  "description": "Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
                                },
                                "user": {
                                  "$ref": "#/components/schemas/User"
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Invalid dates provided"
          }
        }
      }
    },
    "/reports/statuses/{from}/{to}": {
      "get": {
        "summary": "Get a statuses report",
        "description": "List user statuses in the date range for your organisation. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-statuses-from-to",
        "parameters": [
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date, e.g. `2026-01-01`."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "End date, e.g. `2026-01-31`."
          },
          {
            "name": "paginate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "If present (any value), results are paginated 50 per page."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page number when `paginate` is set."
          },
          {
            "name": "users[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by user IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "teams[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by team IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "offices[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by office IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "buildings[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by building IDs.",
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "A bare array, or a paginated object (`data`, `links`, `meta`) when `paginate` is set.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "start_date": {
                            "type": "string",
                            "description": "Such as `2026-03-02 00:00:00`."
                          },
                          "end_date": {
                            "type": "string",
                            "description": "Such as `2026-03-06 23:59:59`."
                          },
                          "building": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "`N/A` if none."
                              }
                            }
                          },
                          "office": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "`N/A` if none."
                              }
                            }
                          },
                          "custom_status": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/CustomStatus"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The custom status name, or the legacy status."
                          },
                          "user_name": {
                            "type": "string"
                          },
                          "user_email": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "teams": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/RawTeamModel"
                            },
                            "description": "The user's user-facing teams."
                          },
                          "manager": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/RawUserModel"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The user's manager."
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "start_date": {
                                "type": "string",
                                "description": "Such as `2026-03-02 00:00:00`."
                              },
                              "end_date": {
                                "type": "string",
                                "description": "Such as `2026-03-06 23:59:59`."
                              },
                              "building": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "`N/A` if none."
                                  }
                                }
                              },
                              "office": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "`N/A` if none."
                                  }
                                }
                              },
                              "custom_status": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/CustomStatus"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The custom status name, or the legacy status."
                              },
                              "user_name": {
                                "type": "string"
                              },
                              "user_email": {
                                "type": "string"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "teams": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/RawTeamModel"
                                },
                                "description": "The user's user-facing teams."
                              },
                              "manager": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/RawUserModel"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The user's manager."
                              }
                            }
                          }
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "first": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "last": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "prev": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "next": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "properties": {
                            "current_page": {
                              "type": "integer"
                            },
                            "from": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last_page": {
                              "type": "integer"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "active": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "path": {
                              "type": "string"
                            },
                            "per_page": {
                              "type": "integer"
                            },
                            "to": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/reports/cancellations/{from}/{to}": {
      "get": {
        "summary": "Get a cancellations report",
        "description": "List cancelled bookings in the date range, 50 per page. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-cancellations-from-to",
        "parameters": [
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date, e.g. `2026-01-01`."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "End date, e.g. `2026-01-31`."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page number."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Booking type."
          },
          {
            "name": "users[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by user IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "teams[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by team IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "desks[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by desk IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "offices[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by office IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "buildings[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by building IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "cancellation_reasons[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by cancellation reason IDs, or `other` / `none`.",
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "date": {
                            "type": "string"
                          },
                          "end_date": {
                            "type": "string"
                          },
                          "all_day": {
                            "type": "boolean"
                          },
                          "booking_type": {
                            "type": "string"
                          },
                          "booking_type_label": {
                            "type": "string"
                          },
                          "type": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "desk",
                              "parking_space",
                              null
                            ]
                          },
                          "building": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          },
                          "office": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "timezone": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          },
                          "desk": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          },
                          "booked_for_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "booked_for_email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_guest": {
                            "type": "boolean"
                          },
                          "booked_by_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "cancelled_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "cancelled_by_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "cancelled_by_owner": {
                            "type": "boolean"
                          },
                          "cancellation_reason_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "cancellation_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "cancellation_note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/reports/meeting-bookings/{from}/{to}": {
      "get": {
        "summary": "Get a meeting bookings report",
        "description": "List meetings in the date range for your organisation, plus the meeting custom field labels. Results are paginated only if `page` is sent. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-meeting-bookings-from-to",
        "parameters": [
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date, e.g. `2026-01-01`."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "End date, e.g. `2026-01-31`."
          },
          {
            "name": "showCancelled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Include cancelled meetings."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Page number. Sending this turns on pagination."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Results per page."
          },
          {
            "name": "rooms[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by room IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "offices[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by office IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "buildings[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by building IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "users[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by the IDs of the users who created the meetings.",
            "style": "form",
            "explode": true
          },
          {
            "name": "organisers[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "email"
              }
            },
            "description": "Filter by organiser email.",
            "style": "form",
            "explode": true
          },
          {
            "name": "teams[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by the creator's team IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "organiserTeams[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "description": "Filter by the organiser's team IDs.",
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "custom_fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Labels of the organisation's meeting custom fields."
                    },
                    "booked_meetings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "start_date": {
                            "type": "string"
                          },
                          "start_date_tz": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "end_date": {
                            "type": "string"
                          },
                          "end_date_tz": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "building": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          },
                          "office": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "timezone": {
                                "type": "string"
                              }
                            }
                          },
                          "room": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              }
                            }
                          },
                          "organiser_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attendees": {
                            "type": "integer",
                            "description": "Number of attendee records."
                          },
                          "attendee_count": {
                            "type": "integer"
                          },
                          "organiser": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "duration": {
                            "type": "integer"
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Truncated to 150 characters."
                          },
                          "created_by_name": {
                            "type": "string",
                            "description": "`Guest` if not created by a user."
                          },
                          "user_attributes": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "$ref": "#/components/schemas/RawAttributeModel"
                            },
                            "description": "The creator's attributes, or `null` if not created by a user."
                          },
                          "user_teams": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "name": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "user_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user_email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "deleted_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deleted_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the user who cancelled the meeting."
                          },
                          "custom_fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "description": "One object per field, keyed by the field label."
                            }
                          },
                          "confirmed": {
                            "type": "boolean",
                            "description": "Only present when the organisation requires meetings to be confirmed."
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      },
                      "description": "Only present when `page` is sent."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/reports/meeting-attendance/{from}/{to}": {
      "get": {
        "summary": "Get a meeting attendance report",
        "description": "List attendees of meetings in your organisation's rooms in the date range. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-meeting-attendance-from-to",
        "parameters": [
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date, e.g. `2026-01-01`."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "End date, e.g. `2026-01-31`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "type": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "user": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/MinimisedUser"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "visitor": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/Visitor"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "attendance_type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "attendance_status": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "on_time": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "guest": {
                        "type": "boolean"
                      },
                      "company": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "external_contact_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "clearooms_only": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Invalid dates provided"
          }
        }
      }
    },
    "/reports/external-attendees": {
      "get": {
        "summary": "Get an external attendees report",
        "description": "List external meeting attendees in the date range, with headline counts and optional grouping. The range can be at most 366 days. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-external-attendees",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (`Y-m-d`)."
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (`Y-m-d`). On or after `from` and within 366 days of it."
          },
          {
            "name": "buildings[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by building IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "offices[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by office IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "rooms[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by room IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "hosts[]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by host user IDs.",
            "style": "form",
            "explode": true
          },
          {
            "name": "include_declined",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Include attendees who declined."
          },
          {
            "name": "when",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "upcoming",
                "past"
              ]
            },
            "description": "Filter by whether the meeting has ended."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Search attendee name, host and company."
          },
          {
            "name": "company",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Exact company name."
          },
          {
            "name": "meeting",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Limit to one meeting ID."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "date",
                "time",
                "host",
                "company",
                "email",
                "subject",
                "room",
                "building",
                "company_source",
                "response"
              ]
            },
            "description": "Sort field. Defaults to `date`."
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Sort direction. Defaults to `asc`."
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "date",
                "host",
                "company"
              ]
            },
            "description": "Grouping. Defaults to `none`."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Rows per page."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ]
            },
            "description": "Accepted but only used by the download endpoint."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kpis": {
                      "type": "object",
                      "properties": {
                        "attendees": {
                          "type": "integer"
                        },
                        "unique_visitors": {
                          "type": "integer"
                        },
                        "companies": {
                          "type": "integer"
                        },
                        "hosts": {
                          "type": "integer"
                        }
                      }
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          }
                        }
                      },
                      "description": "Empty when `group_by` is `none`."
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExternalAttendeeRow"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "last_page": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/reports/external-attendees/meetings/{meetingId}": {
      "get": {
        "summary": "Get external attendees for a meeting",
        "description": "Get a meeting's details and all its attendees, marking which are external. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-external-attendees-meetings-meetingId",
        "parameters": [
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the meeting."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "subject": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "time": {
                      "type": "string"
                    },
                    "host": {
                      "type": "string"
                    },
                    "room": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "building": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "attendees": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "organiser": {
                            "type": "boolean"
                          },
                          "external": {
                            "type": "boolean"
                          },
                          "company": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "company_source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "provided",
                              "derived",
                              "unknown",
                              null
                            ]
                          },
                          "response": {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "tentative",
                              "declined",
                              "none"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/reports/{reportId}/results": {
      "get": {
        "summary": "Get report results",
        "description": "Run a saved report for a date range and return it as CSV or JSON. External attendee reports are CSV only and limited to 365 days. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-reportId-results",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the report."
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (`Y-m-d`)."
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (`Y-m-d`)."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "json"
              ]
            },
            "description": "Output format."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Timezone for the results. Room reports also accept `office` to use each room's office timezone."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "description": "One object per booking or meeting, keyed by the report's selected `fields`.",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error, or JSON was requested for an external attendee report."
          }
        }
      }
    },
    "/reports/desk-efficiency": {
      "get": {
        "summary": "Get a desk efficiency report",
        "description": "Show how much of each time slot each desk was booked, averaged by weekday. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-desk-efficiency",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date, on or after `start_date`."
          },
          {
            "name": "start_time",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Day start time, format `H:i`."
          },
          {
            "name": "end_time",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Day end time, format `H:i`, on or after `start_time`."
          },
          {
            "name": "interval_minutes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "enum": [
                15,
                30,
                60,
                90,
                120
              ]
            },
            "description": "Slot length in minutes."
          },
          {
            "name": "exclude_weekends",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean"
            },
            "description": "Skip Saturdays and Sundays."
          },
          {
            "name": "office_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter by office."
          },
          {
            "name": "building_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter by building."
          },
          {
            "name": "desk_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by desk name."
          },
          {
            "name": "paginate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Paginate the desks, 20 per page."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Desk type. Omit to include both."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "office": {
                            "type": "string"
                          },
                          "building": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "day": {
                            "type": "string",
                            "description": "Weekday name, e.g. `Monday`."
                          },
                          "slots": {
                            "type": "object",
                            "description": "Keyed by slot start time.",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "slot_booked_minutes": {
                                  "type": "integer"
                                },
                                "booked_minutes": {
                                  "type": "integer"
                                },
                                "interval_minutes": {
                                  "type": "integer"
                                },
                                "booked_percentage": {
                                  "type": "number"
                                },
                                "number_of_days": {
                                  "type": "integer"
                                }
                              }
                            }
                          },
                          "total_booked_minutes": {
                            "type": "integer"
                          },
                          "utilisation_percent": {
                            "type": "number"
                          },
                          "user": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/RawUserModel"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The desk's assigned user, with `teams` loaded."
                          },
                          "team": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/RawTeamModel"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The desk's assigned team. No `pivot` key here."
                          },
                          "resources": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "name": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "user_allocations": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/DeskAllocation"
                            }
                          },
                          "team_allocations": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/DeskAllocation"
                            }
                          }
                        }
                      }
                    },
                    "time_slots": {
                      "type": "array",
                      "description": "The time slots for one day.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "start": {
                            "type": "string",
                            "description": "`H:i`."
                          },
                          "end": {
                            "type": "string",
                            "description": "`H:i`."
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "description": "Null unless the desks are paginated."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/reports/{reportId}/schedule": {
      "put": {
        "summary": "Update a report schedule",
        "description": "Set when a saved report is emailed. Sending `type` `no_schedule` removes the schedule and returns 204. Requires the `reports.manage` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "put-reports-reportId-schedule",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the report."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "day_of_week",
                      "first_of_month",
                      "27_of_month",
                      "day_of_month",
                      "daily",
                      "weekdays",
                      "no_schedule"
                    ]
                  },
                  "day_of_month": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 28
                  },
                  "day_of_week": {
                    "type": "integer",
                    "description": "Not validated. Defaults to 1."
                  },
                  "time_to_execute": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Time of day, e.g. `09:00`."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Not validated. Saved as the report's recipient."
                  }
                },
                "required": [
                  "type"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "type": "day_of_week",
                    "day_of_week": 1,
                    "time_to_execute": "09:00",
                    "email": "reports@example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSchedule"
                }
              }
            }
          },
          "204": {
            "description": "Schedule removed"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "get": {
        "summary": "Get a report schedule",
        "description": "Get the schedule of a saved report. Requires the `reports.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-reports-reportId-schedule",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the report."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSchedule"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/office/absence": {
      "get": {
        "summary": "List absent users",
        "description": "List users in your organisation who are not archived and have no desk booking or visitor record in the date range, with their statuses for that range. No specific scope is needed.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-office-absence",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date."
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date, on or after `start`."
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            },
            "description": "Users per page. Results are always paginated."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page number."
          },
          {
            "name": "teams",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated team IDs."
          },
          {
            "name": "users",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated user IDs."
          },
          {
            "name": "attributes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated attribute IDs."
          },
          {
            "name": "manager",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Match the manager's name or email."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only users with this custom status in the range."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "first_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "last_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "is_archived": {
                            "type": "boolean"
                          },
                          "is_admin": {
                            "type": "boolean"
                          },
                          "is_manager": {
                            "type": "boolean"
                          },
                          "organisation_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "office_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "role_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "role_name": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "teams": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/UsersTeams"
                            }
                          },
                          "external_user": {
                            "type": "boolean"
                          },
                          "external_avatar": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attributes": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/UserAttribute"
                            }
                          },
                          "manager": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          },
                          "avatar": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Asset"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "statuses": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/RawUserStatusModel"
                            },
                            "description": "The user's statuses that overlap the date range."
                          }
                        }
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/office/attendance/{start}/{end}": {
      "get": {
        "summary": "Get office attendance",
        "description": "List who is in the office between two dates: desk bookings, meeting attendance, visitors and presence records. Returns an empty array when desk privacy is on with no exempt offices; otherwise only exempt offices are included. Results are cached for five minutes. Requires the `office.attendance.view` scope.",
        "tags": [
          "Reports"
        ],
        "operationId": "get-office-attendance-start-end",
        "parameters": [
          {
            "name": "start",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date, e.g. `2026-01-01`."
          },
          {
            "name": "end",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "End date, e.g. `2026-01-07`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "Booking"
                          },
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "checkin_status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "stepped_out_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Format `Y-m-d H:i:s`, in the office's timezone."
                          },
                          "all_day": {
                            "type": "boolean"
                          },
                          "user": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/MinimisedUser"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "Guest"
                                  },
                                  "id": {
                                    "type": "null"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "email": {
                                    "type": "null"
                                  },
                                  "teams": {
                                    "type": "null"
                                  },
                                  "attributes": {
                                    "type": "null"
                                  },
                                  "avatar": {
                                    "type": "null"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "desk_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "desk_name": {
                            "type": "string"
                          },
                          "activities": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/RawActivityLogModel"
                            },
                            "description": "Activity log entries for the booking, newest first."
                          },
                          "office_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "office_name": {
                            "type": "string"
                          },
                          "start_time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "end_time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user_statuses": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/RawUserStatusModel"
                            },
                            "description": "The booker's statuses in the date range."
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "Meeting"
                          },
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The meeting ID."
                          },
                          "meeting_subject": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "organiser": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "User",
                                  "Guest",
                                  "Resource"
                                ]
                              },
                              "id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "email": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "teams": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "$ref": "#/components/schemas/UsersTeams"
                                }
                              },
                              "attributes": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "$ref": "#/components/schemas/UserAttribute"
                                }
                              },
                              "avatar_asset_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              }
                            }
                          },
                          "room_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "room_name": {
                            "type": "string"
                          },
                          "office_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "office_name": {
                            "type": "string"
                          },
                          "start_time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "end_time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "Visitor"
                          },
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "Visitor"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "visitor_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            }
                          },
                          "date": {
                            "type": "string",
                            "format": "date",
                            "description": "The check-in date."
                          },
                          "office_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "office_name": {
                            "type": "string"
                          },
                          "start_time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "end_time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "user_statuses": {
                            "type": "array",
                            "maxItems": 0,
                            "description": "Always empty."
                          }
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "Presence"
                          },
                          "id": {
                            "type": "string"
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "Presence"
                              },
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          },
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "office_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "office_name": {
                            "type": "string"
                          },
                          "start_time": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "end_time": {
                            "type": "null"
                          },
                          "user_statuses": {
                            "type": "array",
                            "maxItems": 0,
                            "description": "Always empty."
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/offices/{officeId}/visitors": {
      "get": {
        "summary": "List visitors for an office",
        "tags": [
          "Visitors"
        ],
        "operationId": "get-offices-officeId-visitors",
        "description": "List every visit to an office, not paginated. Cancelled visits are left out. If you can only read your own visitors or ones you created, you see only those. Unlike `GET /visitors`, this list fills in `id_verification.latest_document_id`. Returns an empty array if your organisation does not have visitor management. Requires one of these scopes: `visitors.read`, `read`, `visitors.read.own`, `visitors.read.created`.",
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Visitor"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the office belongs to another organisation."
          }
        }
      }
    },
    "/visitors/current": {
      "get": {
        "summary": "List my visitors",
        "tags": [
          "Visitors"
        ],
        "operationId": "get-visitors-current",
        "description": "List your visitors who signed in or are expected between two dates (inclusive, in your office's timezone), not paginated. You see visits where you are the host. If your only read scope is `visitors.read.created`, you see visits you created instead, and with both `visitors.read.own` and `visitors.read.created` (and not `visitors.read`) you see both. Results are cached for up to five minutes. Returns an empty array if your organisation does not have visitor management. Requires one of these scopes: `visitors.read`, `read`, `visitors.read.own`, `visitors.read.created`.",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (`Y-m-d`), on or before `end_date`."
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (`Y-m-d`)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Visitor"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/visitors/{visitorId}/check-out": {
      "post": {
        "summary": "Check out a visitor",
        "tags": [
          "Visitors"
        ],
        "operationId": "post-visitors-visitorId-check-out",
        "description": "Sign a visitor out. Send no body to use the current time (never earlier than the visitor's `time_in`), or send `time_out` to set it yourself. The host is emailed if sign-out notifications are on in your ArrivalsHQ notification settings. In this response, `time_out` is an ISO 8601 UTC timestamp. Requires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "parameters": [
          {
            "name": "visitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the visitor."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "time_out": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Any parseable date and time. Must not be before the visitor's `time_in` (or, if they have no `time_in`, before now). Defaults to now."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "time_out": "2026-11-02 17:30:00"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Visitor"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, the visitor belongs to another organisation, or you can only manage your own visitors (or ones you created) and this is not one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/visitors/{visitorId}/future": {
      "delete": {
        "summary": "Delete future visits",
        "tags": [
          "Visitors"
        ],
        "operationId": "delete-visitors-visitorId-future",
        "description": "Permanently delete this visit and every later visit in the same repeat booking. A one-off visit is just deleted. Cancelled visits in the series count as later visits too. Requires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "parameters": [
          {
            "name": "visitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the visitor."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or you can only manage your own visitors (or ones you created) and this is not one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The visitor does not exist or belongs to another organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/oauth/personal-access-tokens": {
      "get": {
        "summary": "List personal access tokens",
        "description": "List the current user's personal access tokens that have not been revoked. Requires the `settings.apps-integrations.manage` scope.",
        "operationId": "get-oauth-personal-access-tokens",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/PersonalAccessToken"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "client": {
                            "type": "object",
                            "description": "The OAuth client that issued the token. The client secret is hidden.",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "user_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "provider": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "redirect": {
                                "type": "string"
                              },
                              "personal_access_client": {
                                "type": "boolean"
                              },
                              "password_client": {
                                "type": "boolean"
                              },
                              "revoked": {
                                "type": "boolean"
                              },
                              "created_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              },
                              "updated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a personal access token",
        "description": "Create a personal access token for the current user. The token value is only returned in this response. Requires the `settings.apps-integrations.manage` scope.",
        "operationId": "post-oauth-personal-access-tokens",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 191,
                    "description": "A name to identify the token."
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Scope IDs to grant. Each must be a scope from `GET /available-scopes`. Defaults to none."
                  }
                },
                "required": [
                  "name"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "HR system sync",
                    "scopes": [
                      "read",
                      "write"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accessToken": {
                      "type": "string",
                      "description": "The bearer token. Store it securely; it cannot be retrieved again."
                    },
                    "token": {
                      "$ref": "#/components/schemas/PersonalAccessToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/oauth/personal-access-tokens/{tokenId}": {
      "delete": {
        "summary": "Revoke a personal access token",
        "description": "Revoke one of the current user's personal access tokens. Requires the `settings.apps-integrations.manage` scope.",
        "operationId": "delete-oauth-personal-access-tokens-tokenId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the personal access token."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/users/invitations": {
      "get": {
        "summary": "List invitations",
        "description": "List all invitations sent for your organisation. Requires the `settings.users.manage` scope.",
        "operationId": "get-users-invitations",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invitation"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Invite a user",
        "description": "Invite a person to join your organisation by email. The invitation expires after one week. If no roles are given, the organisation's default role is used. Requires the `settings.users.manage` scope.",
        "operationId": "post-users-invitations",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "description": "Must not belong to an existing user."
                  },
                  "team_id": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of teams in your organisation. Stored as the invitation's teams."
                  },
                  "teams": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of teams to join."
                  },
                  "office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Optional. An office in your organisation."
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of roles in your organisation."
                  },
                  "skip_sso": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "manager_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Optional. The ID of the user's manager."
                  }
                },
                "required": [
                  "email"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "email": "jane.doe@example.com",
                    "teams": [
                      "5b1f0c7e-2d3a-4e8f-9a6b-1c2d3e4f5a6b"
                    ],
                    "office_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "roles": [
                      "8f0bed6b-98fc-46c4-a4bb-23e868096605"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/users/invitations/{invitationId}/resend": {
      "get": {
        "summary": "Resend an invitation",
        "description": "Resend an expired invitation and extend its expiry by one week. Returns 403 if the invitation has not yet expired. Requires the `settings.users.manage` scope.",
        "operationId": "get-users-invitations-invitationId-resend",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the invitation."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/users/self-registration-links": {
      "get": {
        "summary": "List self-registration links",
        "description": "List your organisation's self-registration links, 15 per page. Requires the `settings.users.manage` scope.",
        "operationId": "get-users-self-registration-links",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page number."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SelfRegistrationLink"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a self-registration link",
        "description": "Create a link that people can use to register themselves into your organisation. Requires the `settings.users.manage` scope.",
        "operationId": "post-users-self-registration-links",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the link stops working. Null for no expiry."
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "A label to identify the link."
                  },
                  "skip_sso": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "roles": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of roles in your organisation given to people who register."
                  },
                  "teams": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of teams in your organisation that people who register join."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "label": "New starters",
                    "expires_at": "2026-12-31 23:59:59",
                    "roles": [
                      "8f0bed6b-98fc-46c4-a4bb-23e868096605"
                    ],
                    "teams": [
                      "5b1f0c7e-2d3a-4e8f-9a6b-1c2d3e4f5a6b"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelfRegistrationLink"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/users/self-registration-links/{selfRegistrationLinkId}": {
      "put": {
        "summary": "Update a self-registration link",
        "description": "Update a self-registration link. Requires the `settings.users.manage` scope.",
        "operationId": "put-users-self-registration-links-selfRegistrationLinkId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "selfRegistrationLinkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the self-registration link."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the link stops working. Null for no expiry."
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "A label to identify the link."
                  },
                  "skip_sso": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "roles": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of roles in your organisation given to people who register."
                  },
                  "teams": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of teams in your organisation that people who register join."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "label": "New starters",
                    "expires_at": "2026-12-31 23:59:59",
                    "roles": [
                      "8f0bed6b-98fc-46c4-a4bb-23e868096605"
                    ],
                    "teams": [
                      "5b1f0c7e-2d3a-4e8f-9a6b-1c2d3e4f5a6b"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelfRegistrationLink"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a self-registration link",
        "description": "Delete a self-registration link so it can no longer be used. Requires the `settings.users.manage` scope.",
        "operationId": "delete-users-self-registration-links-selfRegistrationLinkId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "selfRegistrationLinkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the self-registration link."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/users/me/scopes": {
      "get": {
        "summary": "Get my scopes",
        "description": "Get the scopes on the current access token, and whether they differ from the scopes the user's roles now grant. Requires an authenticated user; no specific scope is needed.",
        "operationId": "get-users-me-scopes",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "dirty": {
                      "type": "boolean",
                      "description": "True if the token's scopes no longer match the user's available scopes, so the user should sign in again."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/{userId}/password": {
      "put": {
        "summary": "Set a user's password",
        "description": "Set a new password for a user in your organisation. Use `me` as the user ID to change your own password. Requires the `write` scope; changing another user's password also needs `settings.users.manage`.",
        "operationId": "put-users-userId-password",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the user, or `me` for the current user."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string",
                    "description": "The new password. Must meet the password policy."
                  },
                  "password_confirmation": {
                    "type": "string",
                    "description": "Must match `password`."
                  }
                },
                "required": [
                  "password",
                  "password_confirmation"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "password": "Correct-Horse-42!",
                    "password_confirmation": "Correct-Horse-42!"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/users/me/avatar": {
      "put": {
        "summary": "Upload my avatar",
        "description": "Upload an avatar for the current user, replacing any existing one. Requires the `write` scope.",
        "operationId": "put-users-me-avatar",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "A name for the avatar asset."
                  },
                  "avatar": {
                    "type": "string",
                    "format": "binary",
                    "description": "A JPEG, PNG or TIFF image. It is cropped to 400 × 400 pixels."
                  }
                },
                "required": [
                  "name",
                  "avatar"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "profile.jpg",
                    "avatar": "<binary image file>"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete my avatar",
        "description": "Remove the current user's avatar. Requires the `write` scope.",
        "operationId": "delete-users-me-avatar",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/users/{userId}": {
      "get": {
        "summary": "Get a user",
        "description": "Get a user in your organisation. Requires the `settings.users.manage` scope.",
        "operationId": "get-users-userId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "put": {
        "summary": "Update a user",
        "description": "Update a user's details, roles, teams and attributes. Fields left out of `roles`, `teams` and `attributes` are cleared, and the organisation's default role is used if no roles are given. Requires the `settings.users.manage` scope.",
        "operationId": "put-users-userId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 255
                  },
                  "last_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 2,
                    "maxLength": 255,
                    "description": "Optional."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 255,
                    "description": "Must be unique."
                  },
                  "mobile_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 40,
                    "description": "The user's mobile number. Unchanged if omitted. Send `null` to clear it."
                  },
                  "roles": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "IDs of roles. You cannot remove the Admin role from yourself."
                  },
                  "is_manager": {
                    "type": "boolean",
                    "description": "Validated but ignored; use `roles`."
                  },
                  "is_archived": {
                    "type": "boolean",
                    "description": "The organisation owner cannot be archived."
                  },
                  "office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "An office in your organisation."
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "A single team. If sent, it replaces `teams`."
                  },
                  "attributes": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Optional. IDs of attributes in your organisation."
                  },
                  "teams": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "IDs of teams in your organisation. A user can be in only one OpenSpaces team."
                  },
                  "skip_sso": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "employeeNumber": {
                    "type": "string",
                    "description": "Optional. Ignored for users synced from a directory."
                  },
                  "manager_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Optional. Cannot be the user themselves. Ignored for users synced from a directory."
                  },
                  "notify_staff_desk_bookings": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "notify_staff_parking_bookings": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "notify_staff_meeting_bookings": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "notify_staff_cancelled_desk_bookings": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "notify_staff_cancelled_parking_bookings": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "notify_staff_cancelled_meeting_bookings": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "location_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "A location in your organisation."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "email": "jane.doe@example.com",
                    "mobile_number": "+44 7700 900456",
                    "roles": [
                      "8f0bed6b-98fc-46c4-a4bb-23e868096605"
                    ],
                    "teams": [
                      "5b1f0c7e-2d3a-4e8f-9a6b-1c2d3e4f5a6b"
                    ],
                    "office_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
                    "is_archived": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a user",
        "description": "Start deleting a user. Deletion runs in the background. The organisation owner cannot be deleted (422). Requires the `settings.users.manage` scope.",
        "operationId": "delete-users-userId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "The user is the organisation owner."
          }
        }
      }
    },
    "/users/{userId}/desk-allocations": {
      "get": {
        "summary": "List a user's desk allocations",
        "description": "List desks allocated to a user where desk restrictions to allocated users apply. Returns an empty array if global desk limits do not restrict allocated desks. Requires the `read` scope.",
        "operationId": "get-users-userId-desk-allocations",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Desk"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/users/{userId}/whereabouts/{start}/{end}": {
      "get": {
        "summary": "Get a user's whereabouts",
        "description": "Get a user's desk bookings and meetings over a date range of up to 62 days, limited to offices you can see and the organisation's desk privacy settings. Requires the `office.attendance.view` scope.",
        "operationId": "get-users-userId-whereabouts-start-end",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          },
          {
            "name": "start",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date, e.g. `2026-11-02`."
          },
          {
            "name": "end",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date, e.g. `2026-11-06`. Must not be before `start`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "user": {
                          "$ref": "#/components/schemas/MinimisedUser"
                        },
                        "bookings": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BookingAttendance"
                          }
                        },
                        "meetings": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MinimisedMeeting"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Invalid dates, or the range is not between 1 and 62 days."
          }
        }
      }
    },
    "/custom-fields/order": {
      "put": {
        "summary": "Reorder custom fields",
        "description": "Set the display order of custom fields. Requires the `settings.custom-fields.manage` scope.",
        "operationId": "put-custom-fields-order",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "custom_fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "order"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "A custom field in your organisation."
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                },
                "required": [
                  "custom_fields"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "custom_fields": [
                      {
                        "id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
                        "order": 0
                      },
                      {
                        "id": "7c6b5a4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
                        "order": 1
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/custom-fields": {
      "get": {
        "summary": "List custom fields",
        "description": "List the custom fields that apply in a given context, such as a room, office or visitor kiosk. Requires an authenticated user; no specific scope is needed.",
        "operationId": "get-custom-fields",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "fieldable_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only fields for this model, e.g. `App\\Visitor`."
          },
          {
            "name": "for_kiosk",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Only applied with `fieldable_type`. Limit to fields shown on a kiosk."
          },
          {
            "name": "desk_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Only fields for this desk type."
          },
          {
            "name": "office_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only fields that apply to this office."
          },
          {
            "name": "room_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only fields that apply to this room."
          },
          {
            "name": "organisation_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Validated but not used."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomField"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "post": {
        "summary": "Create a custom field",
        "description": "Create a custom field for your organisation. Requires the `settings.custom-fields.manage` scope.",
        "operationId": "post-custom-fields",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Must be unique within your organisation."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "Textbox",
                      "Checkbox",
                      "Yesno",
                      "Multiselect",
                      "Label",
                      "Link"
                    ]
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "label": {
                    "type": "string"
                  },
                  "options": {
                    "type": [
                      "array",
                      "object",
                      "null"
                    ],
                    "description": "A list of option strings. For a `Link` field, an object with `url` (a URL) and `openInNewTab` (boolean), both required."
                  },
                  "fieldable_type": {
                    "type": "string",
                    "description": "The model the field applies to, e.g. `App\\Visitor`."
                  },
                  "office_id": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "description": "Limit to these offices."
                  },
                  "room_id": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "description": "Limit to these rooms."
                  },
                  "desk_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "description": "Limit to these desks."
                  },
                  "desk_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "desk",
                      "parking_space",
                      null
                    ]
                  },
                  "restrict_by_value": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "restrict_by_value_required_value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if `restrict_by_value` is true."
                  },
                  "restrict_to_openspaces": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "show_on_visitor_entry": {
                    "type": "boolean",
                    "description": "Required if `fieldable_type` is `App\\Visitor`. This or `show_on_visitor_check_in` must be true."
                  },
                  "show_on_visitor_check_in": {
                    "type": "boolean",
                    "description": "Required if `fieldable_type` is `App\\Visitor`."
                  }
                },
                "required": [
                  "name",
                  "type",
                  "required",
                  "label",
                  "fieldable_type"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "dietary_requirements",
                    "type": "Multiselect",
                    "required": false,
                    "label": "Dietary requirements",
                    "options": [
                      "Vegetarian",
                      "Vegan",
                      "Gluten free"
                    ],
                    "fieldable_type": "App\\Visitor",
                    "show_on_visitor_entry": true,
                    "show_on_visitor_check_in": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/custom-fields/{customFieldId}": {
      "get": {
        "summary": "Get a custom field",
        "description": "Get a custom field in your organisation. Requires the `settings.custom-fields.manage` scope.",
        "operationId": "get-custom-fields-customFieldId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "customFieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom field."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update a custom field",
        "description": "Update a custom field in your organisation. Requires the `settings.custom-fields.manage` scope.",
        "operationId": "put-custom-fields-customFieldId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "customFieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom field."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Must be unique within your organisation."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "Textbox",
                      "Checkbox",
                      "Yesno",
                      "Multiselect",
                      "Label",
                      "Link"
                    ]
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "label": {
                    "type": "string"
                  },
                  "options": {
                    "type": [
                      "array",
                      "object",
                      "null"
                    ],
                    "description": "A list of option strings. For a `Link` field, an object with `url` (a URL) and `openInNewTab` (boolean), both required."
                  },
                  "fieldable_type": {
                    "type": "string",
                    "description": "The model the field applies to, e.g. `App\\Visitor`."
                  },
                  "office_id": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "description": "Limit to these offices."
                  },
                  "room_id": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "description": "Limit to these rooms."
                  },
                  "desk_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "description": "Limit to these desks."
                  },
                  "desk_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "desk",
                      "parking_space",
                      null
                    ]
                  },
                  "restrict_by_value": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "restrict_by_value_required_value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if `restrict_by_value` is true."
                  },
                  "restrict_to_openspaces": {
                    "type": "boolean",
                    "description": "Optional."
                  },
                  "organisation_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "show_on_visitor_entry": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "For visitor fields, this or `show_on_visitor_check_in` must stay true."
                  },
                  "show_on_visitor_check_in": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "type",
                  "required",
                  "label",
                  "fieldable_type",
                  "organisation_id"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "dietary_requirements",
                    "type": "Multiselect",
                    "required": false,
                    "label": "Dietary requirements",
                    "options": [
                      "Vegetarian",
                      "Vegan",
                      "Gluten free"
                    ],
                    "fieldable_type": "App\\Visitor",
                    "show_on_visitor_entry": true,
                    "show_on_visitor_check_in": false,
                    "organisation_id": "00000000-1111-2222-3333-444444444444"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomField"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a custom field",
        "description": "Delete a custom field in your organisation. Requires the `settings.custom-fields.manage` scope.",
        "operationId": "delete-custom-fields-customFieldId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "customFieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom field."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/custom-statuses": {
      "get": {
        "summary": "List custom statuses",
        "description": "List your organisation's custom statuses, ordered by name. Requires the `read` scope.",
        "operationId": "get-custom-statuses",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomStatus"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a custom status",
        "description": "Create a custom status that users can set on their calendar. Requires the `settings.custom-statuses.manage` scope.",
        "operationId": "post-custom-statuses",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "colour": {
                    "type": "string",
                    "maxLength": 7,
                    "description": "A hex colour, e.g. `#1E88E5`."
                  },
                  "allow_free_allocations": {
                    "type": "boolean"
                  },
                  "allow_office_selection": {
                    "type": "boolean"
                  },
                  "show_add_booking": {
                    "type": "boolean"
                  },
                  "allow_booking_removal": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "colour",
                  "allow_free_allocations",
                  "allow_office_selection",
                  "show_add_booking",
                  "allow_booking_removal"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Working from home",
                    "colour": "#1E88E5",
                    "allow_free_allocations": true,
                    "allow_office_selection": false,
                    "show_add_booking": false,
                    "allow_booking_removal": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomStatus"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/custom-statuses/{customStatusId}": {
      "put": {
        "summary": "Update a custom status",
        "description": "Update a custom status in your organisation. Requires the `settings.custom-statuses.manage` scope.",
        "operationId": "put-custom-statuses-customStatusId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "customStatusId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom status."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "colour": {
                    "type": "string",
                    "maxLength": 7,
                    "description": "A hex colour, e.g. `#1E88E5`."
                  },
                  "allow_free_allocations": {
                    "type": "boolean"
                  },
                  "allow_office_selection": {
                    "type": "boolean"
                  },
                  "show_add_booking": {
                    "type": "boolean"
                  },
                  "allow_booking_removal": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "colour",
                  "allow_free_allocations",
                  "allow_office_selection",
                  "show_add_booking",
                  "allow_booking_removal"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Working from home",
                    "colour": "#1E88E5",
                    "allow_free_allocations": true,
                    "allow_office_selection": false,
                    "show_add_booking": false,
                    "allow_booking_removal": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomStatus"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a custom status",
        "description": "Delete a custom status and every user status that uses it. Requires the `settings.custom-statuses.manage` scope.",
        "operationId": "delete-custom-statuses-customStatusId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "customStatusId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the custom status."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/locations": {
      "get": {
        "summary": "List locations",
        "description": "List your organisation's locations with a count of users at each. Locations created through SCIM are left out. Requires the `settings.users.manage` scope.",
        "operationId": "get-locations",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Location"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a location",
        "description": "Create a location that users can be assigned to. Requires the `settings.users.manage` scope.",
        "operationId": "post-locations",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Must be unique within your organisation."
                  },
                  "street_address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address_locality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address_region": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address_country": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "postal_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 20
                  }
                },
                "required": [
                  "name"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Main Office",
                    "street_address": "1 Example Street",
                    "address_locality": "Manchester",
                    "address_region": "Greater Manchester",
                    "address_country": "United Kingdom",
                    "postal_code": "M1 1AA"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/locations/{locationId}": {
      "put": {
        "summary": "Update a location",
        "description": "Update a location. Locations created through SCIM cannot be updated (403). Requires the `settings.users.manage` scope.",
        "operationId": "put-locations-locationId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the location."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Must be unique within your organisation."
                  },
                  "street_address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address_locality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address_region": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "address_country": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "postal_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 20
                  }
                },
                "required": [
                  "name"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Main Office",
                    "street_address": "1 Example Street",
                    "address_locality": "Manchester",
                    "address_region": "Greater Manchester",
                    "address_country": "United Kingdom",
                    "postal_code": "M1 1AA"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a location",
        "description": "Delete a location. Locations created through SCIM cannot be deleted (403). Requires the `settings.users.manage` scope.",
        "operationId": "delete-locations-locationId",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the location."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/teams/{teamId}/users": {
      "post": {
        "summary": "Add a user to a team",
        "description": "Add a user to a team. Requires the `admin` scope.",
        "operationId": "post-teams-teamId-users",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the team."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the user to add. Not validated."
                  }
                },
                "required": [
                  "user_id"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": "1ac5b55d-831a-4217-95b5-6562be99cd56"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/teams/{teamId}/users/{userId}": {
      "delete": {
        "summary": "Remove a user from teams",
        "description": "Remove a user from **all** of their teams, not only this one, and return this team. System teams cannot be used. Requires the `admin` scope.",
        "operationId": "delete-teams-teamId-users-userId",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the team."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/teams/{teamId}/desks": {
      "post": {
        "summary": "Assign a desk to a team",
        "description": "Assign a desk to a team. Requires the `admin` scope.",
        "operationId": "post-teams-teamId-desks",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the team."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "desk_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The ID of the desk to assign. Not validated."
                  }
                },
                "required": [
                  "desk_id"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "desk_id": "9d40b571-f169-4fca-b332-5bd597c0a928"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/teams/{teamId}/desks/{deskId}": {
      "delete": {
        "summary": "Unassign a desk from a team",
        "description": "Remove a desk's team assignment and return the team. System teams cannot be used. Requires the `admin` scope.",
        "operationId": "delete-teams-teamId-desks-deskId",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the team."
          },
          {
            "name": "deskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the desk."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/roles/default": {
      "patch": {
        "summary": "Set the default role",
        "description": "Set the role new users get when none is specified. Requires the `roles.manage` scope.",
        "operationId": "patch-roles-default",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roleId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "A role in your organisation or a built-in role."
                  }
                },
                "required": [
                  "roleId"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "roleId": "8f0bed6b-98fc-46c4-a4bb-23e868096605"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organisation"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/available-scopes": {
      "get": {
        "summary": "List available scopes",
        "description": "List the scopes that can be assigned to roles, grouped by their prefix (for example `settings`). The `arrivals` group (ArrivalsHQ admin scopes such as `arrivals.staff.view` and `arrivals.emergency.manage`) is left out unless the organisation has Visitor Management or AccessHQ. The `visitors.read`, `visitors.manage` and related `visitors.*` scopes are left out unless it has Visitor Management. Requires an authenticated user; no specific scope is needed.",
        "operationId": "get-available-scopes",
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Keys are scope groups.",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "requires": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Scopes this scope depends on."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example": {
                    "value": {
                      "arrivals": [
                        {
                          "id": "arrivals.staff.view",
                          "description": "View every staff member in the organisation and their attendance",
                          "requires": []
                        },
                        {
                          "id": "arrivals.staff.manage",
                          "description": "Update staff attendance and issue staff sign-in codes",
                          "requires": [
                            "arrivals.staff.view"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/settings/organisation": {
      "get": {
        "summary": "Get the organisation",
        "description": "Get the organisation of the authenticated user. Send the `minimised: true` header for a smaller response. No specific scope is required.",
        "operationId": "get-settings-organisation",
        "tags": [
          "Settings"
        ],
        "parameters": [
          {
            "name": "minimised",
            "in": "header",
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "description": "Send `true` to receive the minimised version of the response."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Organisation"
                    },
                    {
                      "$ref": "#/components/schemas/MinimisedOrganisation"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update the organisation",
        "description": "Update the authenticated user's organisation. Fields not marked optional are overwritten, so send the full set. Requires the `settings.edit` scope.",
        "operationId": "put-settings-organisation",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "number_of_employees",
                  "industry",
                  "country",
                  "phone_number",
                  "website"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "number_of_employees": {
                    "type": "string"
                  },
                  "industry": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "phone_number": {
                    "type": "string"
                  },
                  "website": {
                    "type": "string"
                  },
                  "brand_color": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "display_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "display_slogan": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "logo_asset_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The ID of the logo asset. If empty, the default Clearooms logo is used."
                  },
                  "onboarding_complete": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "If this is the only field sent, only the onboarding flag is updated and no other field is required."
                  },
                  "external_reference_label": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional; only updated when sent."
                  },
                  "enforces_mfa": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Optional. Turning it off clears `mfa_enforcement_date`."
                  },
                  "mfa_enforcement_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Optional. Must be in the future unless unchanged."
                  },
                  "mfa_enforcement_tz": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Optional. The timezone for `mfa_enforcement_date`. Defaults to UTC."
                  },
                  "avatars_enabled": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Optional. Turning it off deletes users' avatars and stops users uploading them."
                  },
                  "users_can_upload_avatars": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Optional. Ignored when `avatars_enabled` is false."
                  },
                  "token_duration_days": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Optional. Changing it revokes every user's tokens."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Example Ltd",
                    "number_of_employees": "10-49",
                    "industry": "Information Technology",
                    "country": "United Kingdom",
                    "phone_number": "+441234567890",
                    "website": "https://example.com",
                    "brand_color": "#0066cc",
                    "display_name": "Example",
                    "display_slogan": null,
                    "logo_asset_id": null,
                    "enforces_mfa": false
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organisation"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/settings/organisation/desk-limits": {
      "get": {
        "summary": "Get organisation desk limits",
        "description": "Get the organisation-wide booking limits for desks or parking spaces. Requires the `settings.edit` scope.",
        "operationId": "get-settings-organisation-desk-limits",
        "tags": [
          "Settings"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Which limits to return. Defaults to `desk`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskLimits"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update organisation desk limits",
        "description": "Update the organisation-wide booking limits for desks or parking spaces, and optionally turn global limits on or off. Requires the `settings.edit` scope.",
        "operationId": "put-settings-organisation-desk-limits",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "usage_limit_enabled",
                  "usage_limit",
                  "usage_limit_period",
                  "bookings_per_user_per_day_enabled",
                  "bookings_per_user_per_day",
                  "repeat_bookings_enabled",
                  "restrict_repeat_bookings",
                  "max_repeat_booking_weeks",
                  "hourly_bookings_enabled",
                  "minimum_hours_for_booking",
                  "maximum_hours_for_booking",
                  "all_day_bookings_enabled"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ],
                    "description": "Which limits to update. Defaults to `desk`."
                  },
                  "buffer_times_enabled": {
                    "type": "boolean"
                  },
                  "days_between_bookings": {
                    "type": "integer"
                  },
                  "usage_limit_enabled": {
                    "type": "boolean"
                  },
                  "usage_limit": {
                    "type": "integer"
                  },
                  "usage_limit_period": {
                    "type": "string",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "bookings_per_user_per_day_enabled": {
                    "type": "boolean"
                  },
                  "bookings_per_user_per_day": {
                    "type": "integer"
                  },
                  "repeat_bookings_enabled": {
                    "type": "boolean"
                  },
                  "restrict_repeat_bookings": {
                    "type": "boolean"
                  },
                  "max_repeat_booking_weeks": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "hourly_bookings_enabled": {
                    "type": "boolean",
                    "description": "At least one of `hourly_bookings_enabled`, `all_day_bookings_enabled`, `half_day_bookings_enabled` and `shift_bookings_enabled` must be true."
                  },
                  "minimum_hours_for_booking": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Must be less than or equal to `maximum_hours_for_booking`."
                  },
                  "maximum_hours_for_booking": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Must be greater than or equal to `minimum_hours_for_booking`."
                  },
                  "all_day_bookings_enabled": {
                    "type": "boolean"
                  },
                  "half_day_bookings_enabled": {
                    "type": "boolean"
                  },
                  "shift_bookings_enabled": {
                    "type": "boolean"
                  },
                  "cancellation_reason_enabled": {
                    "type": "boolean"
                  },
                  "cancellation_reason_required": {
                    "type": "boolean"
                  },
                  "am_start_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true."
                  },
                  "am_end_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true. Must be after `am_start_time` and no later than `pm_start_time`."
                  },
                  "pm_start_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true."
                  },
                  "pm_end_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true. Must be after `pm_start_time`."
                  },
                  "min_booking_distance_enabled": {
                    "type": "boolean"
                  },
                  "min_booking_distance": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "min_booking_units": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The unit for `min_booking_distance`, for example `m`, `inch` or `foot`."
                  },
                  "restrict_allocated_desks_to_users": {
                    "type": "boolean"
                  },
                  "restrict_allocated_desks_to_teams": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "restrict_allocated_desks_to_guests": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "restrict_neighbourhoods_to_teams": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "restrict_parking_spaces_by_permits": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "max_future_days_bookable": {
                    "type": "integer",
                    "maximum": 365
                  },
                  "max_future_days_bookable_exclude_weekends": {
                    "type": "boolean"
                  },
                  "max_future_days_bookable_includes_today": {
                    "type": "boolean"
                  },
                  "max_future_days_bookable_release_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`."
                  },
                  "restrict_future_bookings": {
                    "type": "boolean"
                  },
                  "restrict_same_day_bookings": {
                    "type": "boolean"
                  },
                  "multi_date_booking_enabled": {
                    "type": "boolean"
                  },
                  "booking_increment_minutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 1440,
                    "description": "Required when `hourly_bookings_enabled` is true."
                  },
                  "booking_cut_off_enabled": {
                    "type": "boolean"
                  },
                  "booking_cut_off_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `booking_cut_off_enabled` is true."
                  },
                  "booking_cut_off_days_before": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Required when `booking_cut_off_enabled` is true."
                  },
                  "car_parking_scope": {
                    "type": "string",
                    "enum": [
                      "current_office",
                      "same_building",
                      "organisation",
                      "specific_office"
                    ]
                  },
                  "car_parking_scope_office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Required when `car_parking_scope` is `specific_office`."
                  },
                  "retrospective_booking_disabled": {
                    "type": "boolean"
                  },
                  "retrospective_booking_type": {
                    "type": "string",
                    "enum": [
                      "date",
                      "time"
                    ]
                  },
                  "minimum_booking_notice_enabled": {
                    "type": "boolean"
                  },
                  "minimum_booking_notice_minutes": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "description": "Required when `minimum_booking_notice_enabled` is true."
                  },
                  "restrict_booking_creation_times_enabled": {
                    "type": "boolean"
                  },
                  "restrict_booking_creation_from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Required when `restrict_booking_creation_times_enabled` is true."
                  },
                  "restrict_booking_creation_to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Required when `restrict_booking_creation_times_enabled` is true."
                  },
                  "exclude_released_from_quota": {
                    "type": "boolean",
                    "description": "Cannot be true at the same time as `exclude_next_day_after_time_enabled`."
                  },
                  "exclude_next_day_after_time_enabled": {
                    "type": "boolean"
                  },
                  "exclude_next_day_after_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Required when `exclude_next_day_after_time_enabled` is true."
                  },
                  "exceptions": {
                    "type": "array",
                    "description": "Replaces the full list of exceptions. Exceptions not sent are deleted. For an exception that already exists (same `parent_id` and `rule`), only `period_amount` is updated.",
                    "items": {
                      "type": "object",
                      "required": [
                        "rule",
                        "parent_id",
                        "parent_type"
                      ],
                      "properties": {
                        "rule": {
                          "type": "string"
                        },
                        "parent_id": {
                          "type": "string"
                        },
                        "parent_type": {
                          "type": "string"
                        },
                        "period_amount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 1825
                        },
                        "period_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "day",
                            "week",
                            "month",
                            null
                          ]
                        }
                      }
                    }
                  },
                  "global_desk_limits_enabled": {
                    "type": "boolean",
                    "description": "Whether the organisation-wide desk limits apply to every office. Used when `type` is `desk`."
                  },
                  "global_parking_limits_enabled": {
                    "type": "boolean",
                    "description": "Whether the organisation-wide parking limits apply to every office. Used when `type` is `parking_space`."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "type": "desk",
                    "usage_limit_enabled": false,
                    "usage_limit": 1,
                    "usage_limit_period": "day",
                    "bookings_per_user_per_day_enabled": true,
                    "bookings_per_user_per_day": 1,
                    "repeat_bookings_enabled": true,
                    "restrict_repeat_bookings": false,
                    "max_repeat_booking_weeks": 4,
                    "hourly_bookings_enabled": true,
                    "booking_increment_minutes": 30,
                    "minimum_hours_for_booking": 1,
                    "maximum_hours_for_booking": 8,
                    "all_day_bookings_enabled": true,
                    "global_desk_limits_enabled": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskLimits"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/settings/workinghours": {
      "put": {
        "summary": "Update working hours settings",
        "description": "Turn organisation-wide working hours on or off. Requires the `settings.working-hours.edit` scope.",
        "operationId": "put-settings-workinghours",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "global_working_hours_enabled"
                ],
                "properties": {
                  "global_working_hours_enabled": {
                    "type": "boolean"
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "global_working_hours_enabled": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/settings/workinghours/weekdays": {
      "get": {
        "summary": "List organisation working hours",
        "description": "List the organisation's working hours for each day of the week. Returns defaults if none are set. Requires the `read` scope.",
        "operationId": "get-settings-workinghours-weekdays",
        "tags": [
          "Settings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkingHours"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/settings/workinghours/weekdays/{day}": {
      "get": {
        "summary": "Get organisation working hours for a day",
        "description": "Get the organisation's working hours for one day of the week. Returns the default if none are set. Requires the `read` scope.",
        "operationId": "get-settings-workinghours-weekdays-day",
        "tags": [
          "Settings"
        ],
        "parameters": [
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            },
            "description": "The day of the week, from 1 (Monday) to 7 (Sunday)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkingHours"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update organisation working hours for a day",
        "description": "Set the organisation's working hours for one day of the week. Setting `from` equal to `to` marks the day closed. Requires the `settings.working-hours.edit` scope.",
        "operationId": "put-settings-workinghours-weekdays-day",
        "tags": [
          "Settings"
        ],
        "parameters": [
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            },
            "description": "The day of the week, from 1 (Monday) to 7 (Sunday)."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Defaults to `00:00`. Cannot start before the previous day's end time if that day runs past midnight."
                  },
                  "to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Defaults to `00:00`. An earlier time than `from` runs past midnight, and must not overlap the next day's start time."
                  },
                  "all_day": {
                    "type": "boolean"
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "from": "09:00",
                    "to": "17:30",
                    "all_day": false
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkingHours"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/zones": {
      "get": {
        "summary": "List zones",
        "description": "List the organisation's zones, 50 per page by default. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "get-zones",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zone_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "meeting_room",
                "neighbourhood"
              ]
            },
            "description": "Only return zones of this type."
          },
          {
            "name": "office_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only return zones in this office."
          },
          {
            "name": "active_only",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Only return active zones."
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Number of zones per page. Defaults to 50."
          },
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Zone"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a zone",
        "description": "Create a zone on an office plan: either an outline around a room or desk, or a neighbourhood of desks. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "post-zones",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "office_id",
                  "points"
                ],
                "properties": {
                  "office_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "zone_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "meeting_room",
                      "neighbourhood",
                      null
                    ],
                    "description": "Defaults to `meeting_room`."
                  },
                  "zonable_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "room",
                      "desk",
                      null
                    ],
                    "description": "Required when `zone_type` is `meeting_room`."
                  },
                  "zonable_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The room or desk to outline. Required when `zone_type` is `meeting_room`. A room or desk can only have one zone."
                  },
                  "desk_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "description": "Neighbourhoods only. The desks in the neighbourhood. If omitted, the desks inside the polygon are used. Desks must be in the zone's office, must not be parking spaces and must not be in another neighbourhood.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Neighbourhoods are named `Neighbourhood <n>` if omitted."
                  },
                  "points": {
                    "type": "array",
                    "minItems": 3,
                    "description": "The polygon's vertices.",
                    "items": {
                      "type": "object",
                      "required": [
                        "x",
                        "y"
                      ],
                      "properties": {
                        "x": {
                          "type": "number"
                        },
                        "y": {
                          "type": "number"
                        }
                      }
                    }
                  },
                  "fill_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  },
                  "opacity": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1
                  },
                  "stroke_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  },
                  "stroke_width": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 10
                  },
                  "has_border": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "border_style": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "solid",
                      "dashed",
                      "dotted",
                      null
                    ]
                  },
                  "hide_room_icon": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_room_name": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_meeting_attendees": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "room_name_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  },
                  "font_size": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 200
                  },
                  "name_position": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "center",
                      "top-center",
                      "top-left",
                      "top-right",
                      "bottom-center",
                      "bottom-left",
                      "bottom-right",
                      null
                    ]
                  },
                  "name_in_front": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "rotation": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -360,
                    "maximum": 360
                  },
                  "scale_x": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0.1,
                    "maximum": 10
                  },
                  "scale_y": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0.1,
                    "maximum": 10
                  },
                  "position_x": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "position_y": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "is_active": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "metadata": {
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "office_id": "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c",
                    "zone_type": "neighbourhood",
                    "name": "Marketing",
                    "points": [
                      {
                        "x": 10,
                        "y": 10
                      },
                      {
                        "x": 40,
                        "y": 10
                      },
                      {
                        "x": 40,
                        "y": 30
                      },
                      {
                        "x": 10,
                        "y": 30
                      }
                    ],
                    "fill_color": "#0066CC",
                    "opacity": 0.3
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/zones/{zoneId}": {
      "get": {
        "summary": "Get a zone",
        "description": "Get the zone given by `{zoneId}`. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "get-zones-zoneId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the zone."
          },
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "put": {
        "summary": "Update a zone",
        "description": "Update the zone given by `{zoneId}`. Only the fields sent are changed. The zone type cannot be changed. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "put-zones-zoneId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the zone."
          },
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "points": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "minItems": 3,
                    "description": "The polygon's vertices.",
                    "items": {
                      "type": "object",
                      "required": [
                        "x",
                        "y"
                      ],
                      "properties": {
                        "x": {
                          "type": "number"
                        },
                        "y": {
                          "type": "number"
                        }
                      }
                    }
                  },
                  "fill_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  },
                  "opacity": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1
                  },
                  "stroke_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  },
                  "stroke_width": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 10
                  },
                  "has_border": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "border_style": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "solid",
                      "dashed",
                      "dotted",
                      null
                    ]
                  },
                  "hide_room_icon": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_room_name": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_meeting_attendees": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "room_name_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  },
                  "font_size": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 200
                  },
                  "name_position": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "center",
                      "top-center",
                      "top-left",
                      "top-right",
                      "bottom-center",
                      "bottom-left",
                      "bottom-right",
                      null
                    ]
                  },
                  "name_in_front": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "rotation": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -360,
                    "maximum": 360
                  },
                  "scale_x": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0.1,
                    "maximum": 10
                  },
                  "scale_y": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0.1,
                    "maximum": 10
                  },
                  "position_x": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "position_y": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "is_active": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "metadata": {
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "desk_ids": {
                    "type": "array",
                    "description": "Neighbourhoods only. Replaces the desks in the neighbourhood. If omitted but `points` is sent, the desks inside the new polygon are used.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Marketing and Sales",
                    "is_active": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a zone",
        "description": "Delete the zone given by `{zoneId}`. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "delete-zones-zoneId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the zone."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Zone deleted successfully"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/zones/{zoneId}/desks": {
      "put": {
        "summary": "Set a neighbourhood's desks",
        "description": "Replace the desks in the neighbourhood given by `{zoneId}`. Desks must be in the zone's office, must not be parking spaces and must not be in another neighbourhood. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "put-zones-zoneId-desks",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the zone."
          },
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "desk_ids"
                ],
                "properties": {
                  "desk_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "desk_ids": [
                      "8a7b6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/zones/{zoneId}/teams": {
      "put": {
        "summary": "Set a neighbourhood's teams",
        "description": "Replace the teams the neighbourhood given by `{zoneId}` is restricted to. Send either `teams` or `team_ids`. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "put-zones-zoneId-teams",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the zone."
          },
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "teams": {
                    "type": "array",
                    "description": "Required when `team_ids` is not sent.",
                    "items": {
                      "type": "object",
                      "required": [
                        "id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "locations": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "Location IDs that further limit the restriction.",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    }
                  },
                  "team_ids": {
                    "type": "array",
                    "description": "Required when `teams` is not sent. Teams are added without locations.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "team_ids": [
                      "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/zones/{zoneId}/users": {
      "put": {
        "summary": "Set a neighbourhood's users",
        "description": "Replace the users the neighbourhood given by `{zoneId}` is restricted to. Send an empty array to remove them all. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "put-zones-zoneId-users",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the zone."
          },
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_ids"
                ],
                "properties": {
                  "user_ids": {
                    "type": "array",
                    "description": "Must be present, but can be empty.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_ids": [
                      "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/zones/{zoneId}/reallocate-desks": {
      "post": {
        "summary": "Reallocate a neighbourhood's desks",
        "description": "Replace the desks in the neighbourhood given by `{zoneId}` with the desks inside its polygon, leaving out parking spaces and desks in other neighbourhoods. Requires one of these scopes: `settings.edit`, `settings.edit-office-plan`.",
        "operationId": "post-zones-zoneId-reallocate-desks",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "zoneId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the zone."
          },
          {
            "name": "detailed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Set to true to include the office, outlined space, transform, metadata, bounds and timestamps."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Zone"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Not a neighbourhood, or no available desks inside the zone"
          }
        }
      }
    },
    "/buildings": {
      "get": {
        "summary": "List buildings",
        "description": "List the organisation's buildings, sorted by `order`. Requires the `read` scope.",
        "operationId": "get-buildings",
        "tags": [
          "Offices"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Building"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "post": {
        "summary": "Create a building",
        "description": "Create a building and optionally assign offices and geofences to it. Requires the `settings.edit` scope.",
        "operationId": "post-buildings",
        "tags": [
          "Offices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "street_address",
                  "address_locality",
                  "address_region",
                  "address_country",
                  "postal_code"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "street_address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "address_locality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "address_region": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "address_country": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "postal_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "offices": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "description": "The offices in the building. An office already in another building is rejected.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "geofences": {
                    "type": "array",
                    "description": "The building's geofences.",
                    "items": {
                      "type": "object",
                      "required": [
                        "latitude",
                        "longitude",
                        "radius_metres"
                      ],
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Must not be set when creating a building."
                        },
                        "latitude": {
                          "type": "number",
                          "minimum": -90,
                          "maximum": 90
                        },
                        "longitude": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "radius_metres": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Riverside House",
                    "street_address": "1 Example Street",
                    "address_locality": "Southwark",
                    "address_region": "London",
                    "address_country": "United Kingdom",
                    "postal_code": "SE1 1AA",
                    "offices": [
                      "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c"
                    ],
                    "geofences": [
                      {
                        "latitude": 51.5045,
                        "longitude": -0.0865,
                        "radius_metres": 200
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Building"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "put": {
        "summary": "Reorder buildings",
        "description": "Set the display order of several buildings at once. Requires the `settings.edit` scope.",
        "operationId": "put-buildings",
        "tags": [
          "Offices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "buildings"
                ],
                "properties": {
                  "buildings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "order"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "order": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "buildings": [
                      {
                        "id": "b6059c31-0000-4751-aa97-141cbd75ea61",
                        "order": 0
                      },
                      {
                        "id": "c7160d42-1111-4862-bb08-252dce86fb72",
                        "order": 1
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/buildings/{buildingId}": {
      "get": {
        "summary": "Get a building",
        "description": "Get the building given by `{buildingId}`. Requires the `read` scope.",
        "operationId": "get-buildings-buildingId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "buildingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the building."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Building"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "put": {
        "summary": "Update a building",
        "description": "Update the building given by `{buildingId}`, including its offices and geofences. Requires the `settings.edit` scope.",
        "operationId": "put-buildings-buildingId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "buildingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the building."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "street_address",
                  "address_locality",
                  "address_region",
                  "address_country",
                  "postal_code"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "street_address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "address_locality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "address_region": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "address_country": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "postal_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Must be present, but can be null."
                  },
                  "offices": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "description": "The offices in the building. Offices left out are removed from it. An office already in another building is rejected.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "geofences": {
                    "type": "array",
                    "description": "The building's geofences.",
                    "items": {
                      "type": "object",
                      "required": [
                        "latitude",
                        "longitude",
                        "radius_metres"
                      ],
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "The ID of an existing geofence of this building to keep. Omit to create a new one."
                        },
                        "latitude": {
                          "type": "number",
                          "minimum": -90,
                          "maximum": 90
                        },
                        "longitude": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "radius_metres": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Riverside House",
                    "street_address": "1 Example Street",
                    "address_locality": "Southwark",
                    "address_region": "London",
                    "address_country": "United Kingdom",
                    "postal_code": "SE1 1AA",
                    "offices": [
                      "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c"
                    ],
                    "geofences": [
                      {
                        "latitude": 51.5045,
                        "longitude": -0.0865,
                        "radius_metres": 200
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Building"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a building",
        "description": "Delete the building given by `{buildingId}`. Its offices are kept but no longer belong to a building. Requires the `settings.edit` scope.",
        "operationId": "delete-buildings-buildingId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "buildingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the building."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/offices/{officeId}/users": {
      "get": {
        "summary": "List an office's users",
        "description": "List the users who can access the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "get-offices-officeId-users",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "summary": "Add a user to an office",
        "description": "Give a user access to the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "post-offices-officeId-users",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "A user in your organisation."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "patch": {
        "summary": "Set an office's users",
        "description": "Replace the list of users who can access the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "patch-offices-officeId-users",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "array",
                    "description": "The full list of users who can access the office. Users left out lose access. Must be present, but can be empty.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": [
                      "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a",
                      "7e6d5c4b-3a2f-4e1d-8c9b-6a5f4e3d2c1b"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/offices/{officeId}/users/{userId}": {
      "put": {
        "summary": "Set an office's users (alternative)",
        "description": "Does the same as `PATCH /offices/{officeId}/users`: replaces the whole list of users with access to the office. `{userId}` is ignored. No specific scope is required, but the office must be in your organisation.",
        "operationId": "put-offices-officeId-users-userId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Ignored."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "array",
                    "description": "The full list of users who can access the office. Users left out lose access. Must be present, but can be empty.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": [
                      "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a",
                      "7e6d5c4b-3a2f-4e1d-8c9b-6a5f4e3d2c1b"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Remove a user from an office",
        "description": "Remove the user given by `{userId}` from the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "delete-offices-officeId-users-userId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the user."
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/offices/{officeId}/teams": {
      "get": {
        "summary": "List an office's teams",
        "description": "List the teams who can access the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "get-offices-officeId-teams",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Team"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "summary": "Add a team to an office",
        "description": "Give a team access to the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "post-offices-officeId-teams",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "team_id"
                ],
                "properties": {
                  "team_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "A team in your organisation."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "team_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "patch": {
        "summary": "Set an office's teams",
        "description": "Replace the list of teams who can access the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "patch-offices-officeId-teams",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "array",
                    "description": "Despite its name, this holds **team** IDs: the full list of teams who can access the office. Teams left out lose access. Must be present, but can be empty.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": [
                      "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/offices/{officeId}/teams/{teamId}": {
      "put": {
        "summary": "Set an office's teams (alternative)",
        "description": "Does the same as `PATCH /offices/{officeId}/teams`: replaces the whole list of teams with access to the office. `{teamId}` is ignored. No specific scope is required, but the office must be in your organisation.",
        "operationId": "put-offices-officeId-teams-teamId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Ignored."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "array",
                    "description": "Despite its name, this holds **team** IDs: the full list of teams who can access the office. Teams left out lose access. Must be present, but can be empty.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": [
                      "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Remove a team from an office",
        "description": "Remove the team given by `{teamId}` from the restricted office given by `{officeId}`. No specific scope is required, but the office must be in your organisation.",
        "operationId": "delete-offices-officeId-teams-teamId",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the team."
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/offices/{officeId}/desk-limits": {
      "get": {
        "summary": "Get office desk limits",
        "description": "Get the booking limits for desks or parking spaces in the office given by `{officeId}`. Requires the `read` scope.",
        "operationId": "get-offices-officeId-desk-limits",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "Which limits to return. Defaults to `desk`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskLimits"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update office desk limits",
        "description": "Update the booking limits for desks or parking spaces in the office given by `{officeId}`. Requires the `settings.edit` scope.",
        "operationId": "put-offices-officeId-desk-limits",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "usage_limit_enabled",
                  "usage_limit",
                  "usage_limit_period",
                  "bookings_per_user_per_day_enabled",
                  "bookings_per_user_per_day",
                  "repeat_bookings_enabled",
                  "restrict_repeat_bookings",
                  "max_repeat_booking_weeks",
                  "hourly_bookings_enabled",
                  "minimum_hours_for_booking",
                  "maximum_hours_for_booking",
                  "all_day_bookings_enabled"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "desk",
                      "parking_space"
                    ],
                    "description": "Which limits to update. Defaults to `desk`."
                  },
                  "buffer_times_enabled": {
                    "type": "boolean"
                  },
                  "days_between_bookings": {
                    "type": "integer"
                  },
                  "usage_limit_enabled": {
                    "type": "boolean"
                  },
                  "usage_limit": {
                    "type": "integer"
                  },
                  "usage_limit_period": {
                    "type": "string",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "bookings_per_user_per_day_enabled": {
                    "type": "boolean"
                  },
                  "bookings_per_user_per_day": {
                    "type": "integer"
                  },
                  "repeat_bookings_enabled": {
                    "type": "boolean"
                  },
                  "restrict_repeat_bookings": {
                    "type": "boolean"
                  },
                  "max_repeat_booking_weeks": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "hourly_bookings_enabled": {
                    "type": "boolean",
                    "description": "At least one of `hourly_bookings_enabled`, `all_day_bookings_enabled`, `half_day_bookings_enabled` and `shift_bookings_enabled` must be true."
                  },
                  "minimum_hours_for_booking": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Must be less than or equal to `maximum_hours_for_booking`."
                  },
                  "maximum_hours_for_booking": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Must be greater than or equal to `minimum_hours_for_booking`."
                  },
                  "all_day_bookings_enabled": {
                    "type": "boolean"
                  },
                  "half_day_bookings_enabled": {
                    "type": "boolean"
                  },
                  "shift_bookings_enabled": {
                    "type": "boolean"
                  },
                  "cancellation_reason_enabled": {
                    "type": "boolean"
                  },
                  "cancellation_reason_required": {
                    "type": "boolean"
                  },
                  "am_start_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true."
                  },
                  "am_end_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true. Must be after `am_start_time` and no later than `pm_start_time`."
                  },
                  "pm_start_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true."
                  },
                  "pm_end_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `half_day_bookings_enabled` is true. Must be after `pm_start_time`."
                  },
                  "min_booking_distance_enabled": {
                    "type": "boolean"
                  },
                  "min_booking_distance": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "min_booking_units": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The unit for `min_booking_distance`, for example `m`, `inch` or `foot`."
                  },
                  "restrict_allocated_desks_to_users": {
                    "type": "boolean"
                  },
                  "restrict_allocated_desks_to_teams": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "restrict_allocated_desks_to_guests": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "restrict_neighbourhoods_to_teams": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "restrict_parking_spaces_by_permits": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "max_future_days_bookable": {
                    "type": "integer",
                    "maximum": 365
                  },
                  "max_future_days_bookable_exclude_weekends": {
                    "type": "boolean"
                  },
                  "max_future_days_bookable_includes_today": {
                    "type": "boolean"
                  },
                  "max_future_days_bookable_release_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`."
                  },
                  "restrict_future_bookings": {
                    "type": "boolean"
                  },
                  "restrict_same_day_bookings": {
                    "type": "boolean"
                  },
                  "multi_date_booking_enabled": {
                    "type": "boolean"
                  },
                  "booking_increment_minutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 1440,
                    "description": "Required when `hourly_bookings_enabled` is true."
                  },
                  "booking_cut_off_enabled": {
                    "type": "boolean"
                  },
                  "booking_cut_off_time": {
                    "type": "string",
                    "description": "Format `H:i`. Required when `booking_cut_off_enabled` is true."
                  },
                  "booking_cut_off_days_before": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Required when `booking_cut_off_enabled` is true."
                  },
                  "car_parking_scope": {
                    "type": "string",
                    "enum": [
                      "current_office",
                      "same_building",
                      "organisation",
                      "specific_office"
                    ]
                  },
                  "car_parking_scope_office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Required when `car_parking_scope` is `specific_office`."
                  },
                  "retrospective_booking_disabled": {
                    "type": "boolean"
                  },
                  "retrospective_booking_type": {
                    "type": "string",
                    "enum": [
                      "date",
                      "time"
                    ]
                  },
                  "minimum_booking_notice_enabled": {
                    "type": "boolean"
                  },
                  "minimum_booking_notice_minutes": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "description": "Required when `minimum_booking_notice_enabled` is true."
                  },
                  "restrict_booking_creation_times_enabled": {
                    "type": "boolean"
                  },
                  "restrict_booking_creation_from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Required when `restrict_booking_creation_times_enabled` is true."
                  },
                  "restrict_booking_creation_to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Required when `restrict_booking_creation_times_enabled` is true."
                  },
                  "exclude_released_from_quota": {
                    "type": "boolean",
                    "description": "Cannot be true at the same time as `exclude_next_day_after_time_enabled`."
                  },
                  "exclude_next_day_after_time_enabled": {
                    "type": "boolean"
                  },
                  "exclude_next_day_after_time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Required when `exclude_next_day_after_time_enabled` is true."
                  },
                  "exceptions": {
                    "type": "array",
                    "description": "Replaces the full list of exceptions. Exceptions not sent are deleted. For an exception that already exists (same `parent_id` and `rule`), only `period_amount` is updated.",
                    "items": {
                      "type": "object",
                      "required": [
                        "rule",
                        "parent_id",
                        "parent_type"
                      ],
                      "properties": {
                        "rule": {
                          "type": "string"
                        },
                        "parent_id": {
                          "type": "string"
                        },
                        "parent_type": {
                          "type": "string"
                        },
                        "period_amount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 1825
                        },
                        "period_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "day",
                            "week",
                            "month",
                            null
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "type": "desk",
                    "usage_limit_enabled": false,
                    "usage_limit": 1,
                    "usage_limit_period": "day",
                    "bookings_per_user_per_day_enabled": true,
                    "bookings_per_user_per_day": 1,
                    "repeat_bookings_enabled": true,
                    "restrict_repeat_bookings": false,
                    "max_repeat_booking_weeks": 4,
                    "hourly_bookings_enabled": true,
                    "booking_increment_minutes": 30,
                    "minimum_hours_for_booking": 1,
                    "maximum_hours_for_booking": 8,
                    "all_day_bookings_enabled": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskLimits"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/offices/{officeId}/workinghours/weekdays": {
      "get": {
        "summary": "List office working hours",
        "description": "List the working hours for each day of the week in the office given by `{officeId}`. Returns defaults if none are set. Requires the `read` scope.",
        "operationId": "get-offices-officeId-workinghours-weekdays",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkingHours"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/offices/{officeId}/workinghours/weekdays/{day}": {
      "get": {
        "summary": "Get office working hours for a day",
        "description": "Get the working hours for one day of the week in the office given by `{officeId}`. Returns the default if none are set. Requires the `read` scope.",
        "operationId": "get-offices-officeId-workinghours-weekdays-day",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          },
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            },
            "description": "The day of the week, from 1 (Monday) to 7 (Sunday)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkingHours"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      },
      "put": {
        "summary": "Update office working hours for a day",
        "description": "Set the working hours for one day of the week in the office given by `{officeId}`. Setting `from` equal to `to` marks the day closed. Requires the `settings.working-hours.edit` scope.",
        "operationId": "put-offices-officeId-workinghours-weekdays-day",
        "tags": [
          "Offices"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          },
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            },
            "description": "The day of the week, from 1 (Monday) to 7 (Sunday)."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Defaults to `00:00`. Cannot start before the previous day's end time if that day runs past midnight."
                  },
                  "to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Format `H:i`. Defaults to `00:00`. An earlier time than `from` runs past midnight, and must not overlap the next day's start time."
                  },
                  "all_day": {
                    "type": "boolean"
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "from": "09:00",
                    "to": "17:30",
                    "all_day": false
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkingHours"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/desks/availability/{deskId}/{from}/{to}": {
      "get": {
        "summary": "Get a desk's availability for a period",
        "description": "Get the desk given by `{deskId}` with its availability for each day from `{from}` to `{to}`, using the office's working hours. Requires the `bookings.view` scope.",
        "operationId": "get-desks-availability-deskId-from-to",
        "tags": [
          "Desks"
        ],
        "parameters": [
          {
            "name": "deskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the desk."
          },
          {
            "name": "from",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "2026-11-02 09:00"
            },
            "description": "The start of the period, in the format `Y-m-d H:i`."
          },
          {
            "name": "to",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "2026-11-06 17:00"
            },
            "description": "The end of the period, in the format `Y-m-d H:i`."
          },
          {
            "name": "user_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Check availability for this user in your organisation. Defaults to the authenticated user."
          },
          {
            "name": "selectedDates[]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "date"
              }
            },
            "description": "Specific dates to check."
          },
          {
            "name": "startTime",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "09:00"
            },
            "description": "Start time on each day, overriding the working hours."
          },
          {
            "name": "endTime",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "17:00"
            },
            "description": "End time on each day, overriding the working hours."
          },
          {
            "name": "minimised",
            "in": "header",
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "description": "Send `true` to receive the minimised version of the response."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/DeskWithAvailability"
                    },
                    {
                      "$ref": "#/components/schemas/MiniminsedDeskWithAvailability"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/desks/{deskId}/users": {
      "get": {
        "summary": "List users who can book a desk",
        "description": "List the users who can book the desk given by `{deskId}` on a date, 10 per page. Takes the desk's allocations and your own management scopes into account. Requires one of these scopes: `read`, `users.read`.",
        "operationId": "get-desks-deskId-users",
        "tags": [
          "Desks"
        ],
        "parameters": [
          {
            "name": "deskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the desk."
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "The date to check, in the format `Y-m-d`.",
            "required": true
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": "Filter by name or email."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MinimisedUser"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "prev": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "path": {
                          "type": "string"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/desk-resources/usage-report": {
      "get": {
        "summary": "Get desk resource usage",
        "description": "For each office in your organisation, count how many desks use each desk resource. Requires the `admin` scope.",
        "operationId": "get-desk-resources-usage-report",
        "tags": [
          "Desks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Keyed by office ID. Each value maps desk resource IDs to the number of desks in that office using the resource. An office with none is an empty array.",
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": "integer"
                        }
                      },
                      {
                        "type": "array",
                        "maxItems": 0
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/desk-resources/{deskResourceId}/attach-to-offices": {
      "post": {
        "summary": "Add a desk resource to offices",
        "description": "Add the desk resource given by `{deskResourceId}` to every desk of the matching type in the given offices. Requires the `settings.edit` scope.",
        "operationId": "post-desk-resources-deskResourceId-attach-to-offices",
        "tags": [
          "Desks"
        ],
        "parameters": [
          {
            "name": "deskResourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the desk resource."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "office_ids"
                ],
                "properties": {
                  "office_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "office_ids": [
                      "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/desk-resources/{deskResourceId}/detach-from-offices": {
      "post": {
        "summary": "Remove a desk resource from offices",
        "description": "Remove the desk resource given by `{deskResourceId}` from every desk of the matching type in the given offices. Requires the `settings.edit` scope.",
        "operationId": "post-desk-resources-deskResourceId-detach-from-offices",
        "tags": [
          "Desks"
        ],
        "parameters": [
          {
            "name": "deskResourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the desk resource."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "office_ids"
                ],
                "properties": {
                  "office_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "office_ids": [
                      "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/room-resources/usage-report": {
      "get": {
        "summary": "Get room resource usage",
        "description": "For each office in your organisation, count how many rooms use each room resource. Requires the `settings.edit` scope.",
        "operationId": "get-room-resources-usage-report",
        "tags": [
          "Rooms"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Keyed by office ID. Each value maps room resource IDs to the number of rooms in that office using the resource. An office with none is an empty array.",
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": "integer"
                        }
                      },
                      {
                        "type": "array",
                        "maxItems": 0
                      }
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          }
        }
      }
    },
    "/room-resources/{roomResourceId}/attach-to-offices": {
      "post": {
        "summary": "Add a room resource to offices",
        "description": "Add the room resource given by `{roomResourceId}` to every room in the given offices. Requires the `settings.edit` scope.",
        "operationId": "post-room-resources-roomResourceId-attach-to-offices",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomResourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room resource."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "office_ids"
                ],
                "properties": {
                  "office_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Offices in your organisation."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "office_ids": [
                      "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/room-resources/{roomResourceId}/detach-from-offices": {
      "post": {
        "summary": "Remove a room resource from offices",
        "description": "Remove the room resource given by `{roomResourceId}` from every room in the given offices. Requires the `settings.edit` scope.",
        "operationId": "post-room-resources-roomResourceId-detach-from-offices",
        "tags": [
          "Rooms"
        ],
        "parameters": [
          {
            "name": "roomResourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the room resource."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "office_ids"
                ],
                "properties": {
                  "office_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Offices in your organisation."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "office_ids": [
                      "3f1c2a7e-5b4d-4e8a-9c21-7d6e5f4a3b2c"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/settings/organisation/shift-model": {
      "put": {
        "summary": "Set the organisation shift model",
        "description": "Choose whether shift groups are shared across the whole organisation or defined per office. When enabled, every office uses the organisation's shift groups instead of its own. Requires the `settings.edit` scope.",
        "operationId": "put-settings-organisation-shift-model",
        "tags": [
          "Shifts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "global_shifts_enabled"
                ],
                "properties": {
                  "global_shifts_enabled": {
                    "type": "boolean",
                    "description": "`true` to use organisation-wide shift groups for all offices, `false` to use each office's own shift groups."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "global_shifts_enabled": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/settings/organisation/shift-groups": {
      "get": {
        "summary": "List organisation shift groups",
        "description": "List the organisation-wide shift groups, ordered by `sort_order`, each with its active shifts. These apply to every office when the organisation shift model is enabled. Requires the `read` scope.",
        "operationId": "get-settings-organisation-shift-groups",
        "tags": [
          "Shifts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShiftGroup"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      },
      "post": {
        "summary": "Create an organisation shift group",
        "description": "Create an organisation-wide shift group. Requires the `settings.edit` scope.",
        "operationId": "post-settings-organisation-shift-groups",
        "tags": [
          "Shifts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "label"
                ],
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Display label for the group, e.g. \"Day shifts\"."
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Optional (`sometimes`). Position of the group. Defaults to one after the current highest."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "label": "Day shifts"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShiftGroup"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/settings/organisation/shift-groups/reorder": {
      "put": {
        "summary": "Reorder organisation shift groups",
        "description": "Set the display order of the organisation-wide shift groups. Requires the `settings.edit` scope.",
        "operationId": "put-settings-organisation-shift-groups-reorder",
        "tags": [
          "Shifts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "description": "Shift group IDs in the desired order. Each ID's index becomes its `sort_order`; IDs not belonging to the organisation are ignored.",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Must be an existing shift group ID."
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "ids": [
                      "8f1c2a4e-3b5d-4c6e-9f70-1a2b3c4d5e6f",
                      "2d4e6f80-1a3b-4c5d-8e9f-0a1b2c3d4e5f"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/offices/{officeId}/shift-groups": {
      "get": {
        "summary": "List an office's shift groups",
        "description": "List the shift groups in effect for an office, each with its active shifts, ordered by `sort_order`. Returns the organisation's shift groups when the organisation shift model is enabled, otherwise the office's own. Requires the `read` scope.",
        "operationId": "get-offices-officeId-shift-groups",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShiftGroup"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "post": {
        "summary": "Create an office shift group",
        "description": "Create a shift group belonging to an office. Office shift groups are only used when the organisation shift model is disabled. Requires the `settings.edit` scope.",
        "operationId": "post-offices-officeId-shift-groups",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "label"
                ],
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Display label for the group, e.g. \"Day shifts\"."
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Optional (`sometimes`). Position of the group. Defaults to one after the current highest."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "label": "Day shifts"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShiftGroup"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/offices/{officeId}/shift-groups/reorder": {
      "put": {
        "summary": "Reorder an office's shift groups",
        "description": "Set the display order of an office's own shift groups. Requires the `settings.edit` scope.",
        "operationId": "put-offices-officeId-shift-groups-reorder",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the office."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "description": "Shift group IDs in the desired order. Each ID's index becomes its `sort_order`; IDs not belonging to the office are ignored. Not validated: if omitted, nothing changes.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "ids": [
                      "8f1c2a4e-3b5d-4c6e-9f70-1a2b3c4d5e6f",
                      "2d4e6f80-1a3b-4c5d-8e9f-0a1b2c3d4e5f"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/shift-groups/{shiftGroupId}": {
      "put": {
        "summary": "Update a shift group",
        "description": "Update a shift group's label or position. Works for both organisation and office shift groups. Requires the `settings.edit` scope.",
        "operationId": "put-shift-groups-shiftGroupId",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "shiftGroupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the shift group."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Optional (`sometimes`). Display label for the group."
                  },
                  "sort_order": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Optional (`sometimes`). Position of the group."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "label": "Weekday shifts"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShiftGroup"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a shift group",
        "description": "Delete a shift group. All its shifts are soft-deleted first. Requires the `settings.edit` scope.",
        "operationId": "delete-shift-groups-shiftGroupId",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "shiftGroupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the shift group."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/shift-groups/{shiftGroupId}/shifts": {
      "post": {
        "summary": "Create a shift",
        "description": "Add a shift to a shift group. It is placed after the group's existing shifts. Requires the `settings.edit` scope.",
        "operationId": "post-shift-groups-shiftGroupId-shifts",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "shiftGroupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the shift group."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "start_time",
                  "end_time"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Name of the shift, e.g. \"Morning\"."
                  },
                  "start_time": {
                    "type": "string",
                    "description": "Start time in `H:i` format (24-hour), e.g. `09:00`."
                  },
                  "end_time": {
                    "type": "string",
                    "description": "End time in `H:i` format (24-hour). An end time at or before the start time makes the shift cross midnight into the next day."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Morning",
                    "start_time": "08:00",
                    "end_time": "12:30"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shift"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/shift-groups/{shiftGroupId}/shifts/reorder": {
      "put": {
        "summary": "Reorder shifts in a group",
        "description": "Set the display order of the shifts in a shift group. Requires the `settings.edit` scope.",
        "operationId": "put-shift-groups-shiftGroupId-shifts-reorder",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "shiftGroupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the shift group."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "description": "Shift IDs in the desired order. Each ID's index becomes its `sort_order`; IDs not belonging to the shift group are ignored. Not validated: if omitted, nothing changes.",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "ids": [
                      "8f1c2a4e-3b5d-4c6e-9f70-1a2b3c4d5e6f",
                      "2d4e6f80-1a3b-4c5d-8e9f-0a1b2c3d4e5f"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/shifts/{shiftId}": {
      "put": {
        "summary": "Update a shift",
        "description": "Update a shift's name or times. Requires the `settings.edit` scope.",
        "operationId": "put-shifts-shiftId",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "shiftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the shift."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Optional (`sometimes`). Name of the shift."
                  },
                  "start_time": {
                    "type": "string",
                    "description": "Optional (`sometimes`). Start time in `H:i` format (24-hour)."
                  },
                  "end_time": {
                    "type": "string",
                    "description": "Optional (`sometimes`). End time in `H:i` format (24-hour). An end time at or before the start time makes the shift cross midnight."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Afternoon",
                    "start_time": "13:00",
                    "end_time": "17:30"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shift"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation error"
          }
        }
      },
      "delete": {
        "summary": "Delete a shift",
        "description": "Soft-delete a shift. It no longer appears in shift group listings. Requires the `settings.edit` scope.",
        "operationId": "delete-shifts-shiftId",
        "tags": [
          "Shifts"
        ],
        "parameters": [
          {
            "name": "shiftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the shift."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/staff": {
      "get": {
        "operationId": "listStaff",
        "summary": "List the staff directory",
        "tags": [
          "Staff sign-in"
        ],
        "description": "Lists the members the caller can see, with where each one is now (on site, off site or on break) according to their latest attendance event. Archived members are left out. Results are sorted by name.\n\nWho appears depends on the caller. With `settings.edit`, `arrivals.staff.view` or `arrivals.staff.manage`, it is everyone in the organisation. With only `arrivals.staff.manage.team`, it is the caller, their direct reports and the members of the teams they manage, including child teams.\n\nThe response is paged, but it is not a standard paginated response: there is no `links` object, and `meta.on_site` gives how many of the visible members are on site or on break. It also returns the statuses the caller can set, and the teams and offices that the visible members belong to, for use as filters.\n\nRequires one of these scopes: `settings.edit`, `arrivals.staff.view`, `arrivals.staff.manage`, `arrivals.staff.manage.team`.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search by name or email address. Partial matches count."
          },
          {
            "name": "presence",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "on_site",
                "off_site",
                "on_break"
              ]
            },
            "description": "Only members whose latest attendance event has this presence. Members with no attendance events are left out when this is set. Other values are not rejected and return no one."
          },
          {
            "name": "team",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only members of this team."
          },
          {
            "name": "office",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only members whose office is this one."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "The page to return."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 100,
              "default": 50
            },
            "description": "Members per page. Values outside 10 to 100 are clamped."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StaffDirectoryMember"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "current_page": {
                          "type": "integer"
                        },
                        "last_page": {
                          "type": "integer"
                        },
                        "on_site": {
                          "type": "integer",
                          "description": "How many visible members are on site or on break, across all pages and ignoring the filters."
                        }
                      }
                    },
                    "can_manage": {
                      "type": "boolean",
                      "description": "Whether the caller can manage anyone. Use each row's `can_manage` to decide what to offer for that person."
                    },
                    "can_manage_settings": {
                      "type": "boolean",
                      "description": "Whether the caller holds `settings.edit` or `arrivals.staff.manage`."
                    },
                    "statuses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StaffStatusOption"
                      },
                      "description": "The statuses that can be set with `POST /staff/{userId}/attendance`."
                    },
                    "teams": {
                      "type": "array",
                      "description": "Teams that at least one visible member belongs to.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "offices": {
                      "type": "array",
                      "description": "Offices that at least one visible member is in.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      }
    },
    "/staff/{userId}/attendance": {
      "post": {
        "operationId": "recordStaffAttendance",
        "summary": "Set a staff member's status",
        "tags": [
          "Staff sign-in"
        ],
        "description": "Records an attendance event for a member by setting one of the organisation's statuses. The status's presence (`on_site`, `off_site` or `on_break`) decides whether they count as in the building on an evacuation roll call. Any status with a presence can be used, including ones that are not offered on the kiosk. `GET /staff` lists them under `statuses`.\n\nThe event is recorded at the member's own office. On their timeline it shows as set by an admin, or as set in the portal if the caller sets their own status.\n\nWith `settings.edit` or `arrivals.staff.manage`, the caller can set the status of anyone in their organisation. With only `arrivals.staff.manage.team`, they can set it for their direct reports and the members of the teams they manage, but not for themselves. Anyone else, including a member of another organisation, gets `403`.\n\nRequires one of these scopes: `settings.edit`, `arrivals.staff.manage`, `arrivals.staff.manage.team`.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the staff member."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "custom_status_id"
                ],
                "properties": {
                  "custom_status_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "One of the organisation's statuses that has a presence."
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Shown on the member's timeline."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "custom_status_id": "6d1e8b3a-4c2f-4a9e-b7d0-3f5a1c9e2b84",
                    "notes": "Badge reader at the side entrance was down."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The ID of the attendance event."
                    },
                    "presence": {
                      "type": "string",
                      "enum": [
                        "on_site",
                        "off_site",
                        "on_break"
                      ]
                    },
                    "status_name": {
                      "type": "string"
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the caller cannot manage this member.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "You cannot update this staff member."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The user does not exist."
          },
          "422": {
            "description": "Validation error, or \"That status is not available.\" if the status is not one of the organisation's statuses with a presence.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "That status is not available."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/me/staff-presence/sign-in": {
      "post": {
        "operationId": "signInStaffPresence",
        "summary": "Sign yourself in",
        "tags": [
          "Staff sign-in"
        ],
        "description": "Signs the calling user in at an office, as the mobile app's sign-in button does. The office is the one the geofence covers: the user's own office if the geofence covers it, otherwise the first covered office by name.\n\nIf `latitude` and `longitude` are sent, the position must be inside the geofence. If they are left out, the position is not checked.\n\nIf `custom_status_id` is left out, the organisation's configured sign-in status is used. If the user is already on site at a different office, they are first signed out of that one. If they are already on site at the same office, nothing is recorded and the response is `200` with `recorded` set to `false`.\n\nStaff sign-in must be switched on for the organisation and included in its plan, or the call returns `403`.\n\nRequires the `read` scope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "geofence_id"
                ],
                "properties": {
                  "geofence_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "A geofence of the caller's organisation."
                  },
                  "custom_status_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The status to set. It must be enabled for ArrivalsHQ and have an `on_site` or `on_break` presence."
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -90,
                    "maximum": 90,
                    "description": "**Required if** `longitude` is given."
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -180,
                    "maximum": 180,
                    "description": "**Required if** `latitude` is given."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "geofence_id": "9e4b2c7a-1d3f-4a8e-b6c5-0f2d7a9e3b16",
                    "latitude": 51.5155,
                    "longitude": -0.0922
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Already on site at this office. Nothing was recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "recorded": {
                          "type": "boolean",
                          "description": "Whether a new attendance event was recorded."
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/StaffPresenceSummary"
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Signed in.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "recorded": {
                          "type": "boolean",
                          "description": "Whether a new attendance event was recorded."
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/StaffPresenceSummary"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or staff sign-in is not enabled for the organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Staff sign-in is not enabled for your organisation."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The status exists in the organisation but is not enabled for ArrivalsHQ or has no presence."
          },
          "422": {
            "description": "Validation error, or one of: the position is outside the geofence (\"You need to be at the office to sign in.\"), the geofence covers none of the organisation's offices, the status is an off-site one, or the organisation has no sign-in status set up.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "You need to be at the office to sign in."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/me/staff-presence/sign-out": {
      "post": {
        "operationId": "signOutStaffPresence",
        "summary": "Sign yourself out",
        "tags": [
          "Staff sign-in"
        ],
        "description": "Signs the calling user out, as the mobile app's sign-out button does. The position is not checked, so someone who forgot to sign out can do it later. The event is recorded at the office of their latest attendance event.\n\nIf `custom_status_id` is left out, the organisation's configured sign-out status is used. If the user is not on site, nothing is recorded and the response is `200` with `recorded` set to `false`.\n\nStaff sign-in must be switched on for the organisation and included in its plan, or the call returns `403`.\n\nRequires the `read` scope.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "custom_status_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The status to set. It must be enabled for ArrivalsHQ and have an `off_site` presence."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "custom_status_id": "2c8f5a1e-9b4d-4e7a-a3c6-8d0e1f2b5c97"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Not on site. Nothing was recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "recorded": {
                          "type": "boolean",
                          "description": "Whether a new attendance event was recorded."
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/StaffPresenceSummary"
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Signed out.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "recorded": {
                          "type": "boolean",
                          "description": "Whether a new attendance event was recorded."
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/StaffPresenceSummary"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or staff sign-in is not enabled for the organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Staff sign-in is not enabled for your organisation."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The status exists in the organisation but is not enabled for ArrivalsHQ or has no presence."
          },
          "422": {
            "description": "Validation error, or the status is an on-site or on-break one, or the organisation has no sign-out status set up.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "That status is not available."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/deliveries": {
      "post": {
        "operationId": "createDelivery",
        "summary": "Log a parcel",
        "tags": [
          "Deliveries"
        ],
        "description": "Logs a parcel at reception, waiting to be collected. If it is for a member (`recipient_user_id`), they are emailed unless the organisation has switched host emails off or they logged it themselves.\n\nAvailable on ArrivalsHQ plans that include deliveries.\n\nIDs in the body that are not in the organisation return `404`.\n\nRequires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "courier_name"
                ],
                "properties": {
                  "courier_name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "courier_company": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120
                  },
                  "recipient_user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The member the parcel is for. Their name is stored as `recipient_name`."
                  },
                  "recipient_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120,
                    "description": "**Required if** `recipient_user_id` is not given. Ignored if it is."
                  },
                  "package_count": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 99,
                    "default": 1
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The office where the parcel was received."
                  },
                  "drop_off_point_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "The delivery drop-off point where the parcel is kept."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "courier_name": "Jordan Blake",
                    "courier_company": "Example Couriers",
                    "recipient_user_id": "e7f3a1c9-2b5d-4e8a-a6f0-1c9d3b7e5a22",
                    "package_count": 2,
                    "notes": "One box is marked fragile.",
                    "office_id": "3f6c1a52-8d4e-4b7a-9c21-5e0f7a6b2d10"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. `collected_by_user` is not included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delivery"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Deliveries are switched off for this organisation."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The recipient, office or drop-off point is not in the organisation."
          },
          "422": {
            "description": "Validation error."
          }
        }
      }
    },
    "/deliveries/{deliveryId}/collect": {
      "post": {
        "operationId": "collectDelivery",
        "summary": "Mark a parcel collected",
        "tags": [
          "Deliveries"
        ],
        "description": "Records that a parcel has been collected, with the caller as the person who recorded it. Marking a parcel that is already collected changes nothing and returns it as it is.\n\nThe organisation's plan must include deliveries, or the call returns `403`. A parcel in another organisation returns `404`.\n\nRequires one of these scopes: `settings.edit`, `arrivals.deliveries.manage`.",
        "parameters": [
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the delivery."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "collected_by_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120,
                    "description": "Who took the parcel. Often not a user, so this is free text."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "collected_by_name": "Hannah Lloyd"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. `logged_by_user` is not included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delivery"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or the organisation's plan does not include deliveries. When the plan is the reason, `message` names the plan that includes the feature, or asks you to contact support if your plan should already include it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        }
      }
    },
    "/evacuations": {
      "post": {
        "operationId": "createEvacuation",
        "summary": "Start an evacuation",
        "tags": [
          "Evacuations"
        ],
        "description": "Starts an evacuation and opens its roll call, as when an admin starts one in the portal. Marshals are alerted, webhooks and announcements go out, and the roster is taken: every visitor signed in at a covered office, and the staff there.\n\nWhat it covers depends on the body:\n- `office_id`: that office.\n- `site_id`: every office on that site.\n- `reception_group_id`: a reception-wide evacuation of the group's offices, including tenants' offices. Only the organisation that owns the group can start one. Add `office_id` to narrow it to one office the group covers.\n- None of them: every office in the organisation.\n\n`site_id` cannot be combined with the other two.\n\nTwo evacuations in the same organisation cannot cover the same office, and the call returns `409` naming the one in the way. Running more than one evacuation at a time needs the emergency suite in the plan. Without it, starting a second one fails validation on `office_id`.\n\nThe organisation's plan must include roll call, or the call returns `403`.\n\nRequires one of these scopes: `settings.edit`, `arrivals.emergency.manage`.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "office_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "An office of the caller's organisation, or one the reception group covers."
                  },
                  "site_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "A site of the caller's organisation."
                  },
                  "reception_group_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "A reception group the caller's organisation owns."
                  },
                  "is_drill": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether this is a planned drill rather than a real alarm. Drills are logged as completed drills when they end."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "office_id": "3f6c1a52-8d4e-4b7a-9c21-5e0f7a6b2d10",
                    "is_drill": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvacuationRollCall"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, the plan does not include roll call, or the reception group is not the caller's. When the plan is the reason, `message` names the plan that includes the feature, or asks you to contact support if your plan should already include it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "An evacuation is already running for one of the offices.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "const": "evacuation_overlap"
                    },
                    "evacuation_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The evacuation already running for the area."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error."
          }
        }
      }
    },
    "/evacuations/{evacuationId}/end": {
      "post": {
        "operationId": "endEvacuation",
        "summary": "End an evacuation",
        "tags": [
          "Evacuations"
        ],
        "description": "Ends an evacuation and closes its roll call. It is logged to the organisation's drill history (as a drill or a real alarm), and webhooks and the all-clear announcement go out. Ending an evacuation that has already ended changes nothing and returns it as it is.\n\nIf the organisation exports the roster automatically when an evacuation ends (on by default), the response also has `csv_url`.\n\nAn evacuation in another organisation returns `404`.\n\nRequires one of these scopes: `settings.edit`, `arrivals.emergency.manage`.",
        "parameters": [
          {
            "name": "evacuationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the evacuation."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/EvacuationRollCall"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "csv_url": {
                          "type": "string",
                          "format": "uri",
                          "description": "A signed link to download the roster as CSV. It works without a token and expires after an hour. Only present if the roster is exported automatically."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/evacuations/active-list": {
      "get": {
        "operationId": "listActiveEvacuations",
        "summary": "List evacuations in progress",
        "tags": [
          "Evacuations"
        ],
        "description": "Lists the organisation's evacuations that have not ended, newest first, with their totals but not their rosters. Use `GET /evacuations/{evacuationId}` for a roster. The list is not paged.\n\nRequires one of these scopes: `settings.edit`, `visitors.read`, `arrivals.emergency.view`, `arrivals.emergency.manage`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvacuationSummary"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          }
        }
      }
    },
    "/evacuations/{evacuationId}": {
      "get": {
        "operationId": "getEvacuation",
        "summary": "Get an evacuation's roll call",
        "tags": [
          "Evacuations"
        ],
        "description": "Returns an evacuation with its roster: visitors, staff and walk-ins, each with the marshal's mark. For staff who share their location, it also says whether their phone is still on site. Phone numbers and email addresses are not included, only whether there is one on record. Works for evacuations that have ended too.\n\nAn evacuation in another organisation returns `404`.\n\nRequires one of these scopes: `settings.edit`, `visitors.read`, `arrivals.emergency.view`, `arrivals.emergency.manage`.",
        "parameters": [
          {
            "name": "evacuationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the evacuation."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvacuationRollCall"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "8b2e4d71-3c9a-4f60-9e15-2a7d6c0b5f34",
                      "office_id": "3f6c1a52-8d4e-4b7a-9c21-5e0f7a6b2d10",
                      "site_id": null,
                      "reception_group_id": null,
                      "assembly_point": null,
                      "triggered_by": "Priya Okafor",
                      "triggered_at": "2026-11-02T10:05:12+00:00",
                      "ended_at": null,
                      "roster": [
                        {
                          "type": "visitor",
                          "visitor_id": "c41d9e27-6a3b-4f18-b0e5-7d2a9c8f1e63",
                          "name": "Tomasz Wren",
                          "company": "Brightline Surveys",
                          "organisation_name": "Northwind Studios",
                          "office_name": "London HQ",
                          "building_name": "Tower A",
                          "time_in": "2026-11-02 09:14:00",
                          "status": "missing",
                          "needs_assistance": false,
                          "marked_by": null,
                          "marked_at": null,
                          "marked_safe_at": null,
                          "is_safe": false,
                          "has_phone": true,
                          "has_email": true,
                          "host_has_phone": true,
                          "host": "Hannah Lloyd"
                        },
                        {
                          "type": "staff",
                          "user_id": "e7f3a1c9-2b5d-4e8a-a6f0-1c9d3b7e5a22",
                          "name": "Hannah Lloyd",
                          "company": null,
                          "organisation_name": "Northwind Studios",
                          "office_name": "London HQ",
                          "building_name": "Tower A",
                          "left_at": null,
                          "status": "safe",
                          "needs_assistance": false,
                          "marked_by": "Sam Ortiz",
                          "marked_at": "2026-11-02 10:09:40",
                          "marked_safe_at": "2026-11-02 10:09:40",
                          "is_safe": true,
                          "location_status": "left_site",
                          "location_tracked": true,
                          "location_updated_at": "2026-11-02 10:07:02",
                          "self_reported_safe_at": null,
                          "has_phone": true,
                          "has_email": true,
                          "host_has_phone": false
                        },
                        {
                          "type": "walk_in",
                          "walk_in_id": "5a9c2e1f-7b3d-4c6a-8e0f-9d1b2a3c4e5f",
                          "name": "Leo Marsh",
                          "company": "Example Couriers",
                          "organisation_name": null,
                          "status": "safe",
                          "needs_assistance": false,
                          "marked_by": "Sam Ortiz",
                          "marked_at": "2026-11-02T10:11:03.000000Z",
                          "is_safe": true
                        }
                      ],
                      "counts": {
                        "total": 3,
                        "out": 2,
                        "missing": 1,
                        "being_helped": 0,
                        "needs_assistance": 0,
                        "not_in": 0,
                        "on_site": 2,
                        "marked_safe": 1,
                        "unaccounted": 1
                      },
                      "all_clear_reports": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or the caller's account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "Not found, or not in your organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/visitors/{visitorId}/visit": {
      "patch": {
        "operationId": "changeVisit",
        "summary": "Change an upcoming visit",
        "tags": [
          "Visitors"
        ],
        "description": "Change the host, office, expected arrival or visitor type of a pre-registered visit that has not started. Send only the fields you want to change.\n\nWhen the date or office changes, the desk, parking space and meeting room booked for the visit move with it. If any of them cannot move, the call returns 422 with `code` set to `booking_clash`, lists each clash, and changes nothing. A move or a new host re-sends the visitor's invitation (unless the visit is pending or declined approval) and emails the hosts involved, other than you. A visitor type change on its own emails no one. If nothing changes, the visit is returned as it was.\n\nRequires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "parameters": [
          {
            "name": "visitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the visitor (one visit)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VisitChangeRequest"
              },
              "examples": {
                "Example": {
                  "value": {
                    "user_id": "3f6c1a52-7d4e-4b8a-9c21-5e0f6a7b8c9d",
                    "expected_arrival": "2026-11-12 10:30"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Visitor"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope; it can only manage its own or created visitors and this visit is neither; or the chosen visitor type needs a higher ArrivalsHQ plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The visitor does not exist or belongs to another organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The visit has been cancelled, has already started, or was never pre-registered (it has no expected arrival).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error, or one of:\n\n - `booking_clash`: a booking cannot move with the visit (body below)\n - The host or office is not in your organisation\n - `expected_arrival` is before today in the office's time zone\n - The visitor type does not exist in your organisation or is disabled\n\nOnly the booking clash has the `code` and `clashes` fields; the others return `message` only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisitBookingClash"
                }
              }
            }
          }
        }
      }
    },
    "/visitors/{visitorId}/cancel": {
      "post": {
        "operationId": "cancelVisit",
        "summary": "Cancel an upcoming visit",
        "tags": [
          "Visitors"
        ],
        "description": "Cancel a pre-registered visit that has not started. The desk, parking space and meeting room booked for it are released, its scheduled invitation is dropped, the visitor is emailed if they would have received an invitation, and the host is emailed if host emails are on and you are not the host. The record is kept and can still be read, with `status` set to `cancelled`. Cancelling a visit that is already cancelled does nothing and still returns 204. Takes no request body. Requires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "parameters": [
          {
            "name": "visitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the visitor (one visit)."
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The visit is cancelled."
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope, or it can only manage its own or created visitors and this visit is neither.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The visitor does not exist or belongs to another organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The visit has already started, or was never pre-registered (it has no expected arrival).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/visitors/{visitorId}/sign-in": {
      "post": {
        "operationId": "signInVisitor",
        "summary": "Sign a visitor in",
        "tags": [
          "Visitors"
        ],
        "description": "Mark a visitor as on site now, without a kiosk. The server sets `time_in` to the current time and records the sign-in as a manual portal sign-in. The same follow-ups as a kiosk sign-in then run: the host is notified, integrations and webhooks fire, and the visitor appears on the evacuation roll call. A failed follow-up does not undo the sign-in. Takes no request body. Requires one of these scopes: `visitors.manage`, `visitors.manage.own`, `visitors.manage.created`.",
        "parameters": [
          {
            "name": "visitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the visitor (one visit)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Visitor"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope; the visitor belongs to another organisation; the token can only manage its own or created visitors and this visit is neither; or the visit is awaiting approval, was declined, or was refused at the door.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The visitor does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "The visit has been cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The visitor is already signed in, or has already signed out.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/visitors/{visitorId}/visits": {
      "get": {
        "operationId": "listVisitorVisits",
        "summary": "List a visitor's visits",
        "tags": [
          "Visitors"
        ],
        "description": "List every visit by the same person as the given visit, newest first, up to 50. There is no person ID: a person is matched by email address, or by name and company when the visit has no email (case and surrounding spaces are ignored). Cancelled visits are included, with `status` set to `cancelled`. The list is not paginated. Requires one of these scopes: `settings.edit`, `visitors.read`.",
        "parameters": [
          {
            "name": "visitorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the visitor (one visit)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "maxItems": 50,
                  "items": {
                    "$ref": "#/components/schemas/VisitHistoryEntry"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "404": {
            "description": "The visitor does not exist or belongs to another organisation."
          }
        }
      }
    },
    "/visitors/signed-in": {
      "get": {
        "operationId": "listSignedInVisitors",
        "summary": "List visitors on site",
        "tags": [
          "Visitors"
        ],
        "description": "List visitors at an office who have signed in and not yet signed out, most recent sign-in first, up to 100. Send `office_id`: without it the list is empty. Offices outside your organisation return an empty list. The list is not paginated. Requires one of these scopes: `visitors.read`, `read`.",
        "parameters": [
          {
            "name": "office_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The office to list."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Only visitors whose name contains this text."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "maxItems": 100,
                  "items": {
                    "$ref": "#/components/schemas/Visitor"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/visitors/expected": {
      "get": {
        "operationId": "listExpectedVisitors",
        "summary": "Find an expected visitor",
        "tags": [
          "Visitors"
        ],
        "description": "Find visitors expected today for a host who have not signed in yet, by a fuzzy match on name. Visits pending or declined approval are left out. Each result has a `match_score` from 0 to 1; only scores of 0.5 or more are returned, best first, up to 5. Send `office_id`: without it the list is empty. The list is not paginated. Requires one of these scopes: `visitors.read`, `read`, `visitors.read.own`, `visitors.read.created`.",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 255
            },
            "description": "The visitor's name as typed. Matched fuzzily."
          },
          {
            "name": "host_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The ID of the host user the visitor is here to see."
          },
          {
            "name": "office_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The office to search."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "maxItems": 5,
                  "items": {
                    "$ref": "#/components/schemas/ExpectedVisitorMatch"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated, or your account has been archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The token lacks the required scope."
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Activity": {
        "title": "Activity",
        "type": "object",
        "description": "A representation of an activity log item in Clearooms.",
        "properties": {
          "id": {
            "type": "integer"
          },
          "log_name": {
            "type": "string",
            "description": "The organisation ID."
          },
          "description": {
            "type": "string"
          },
          "event": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "subject_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full class name, such as `App\\Room`."
          },
          "subject_type_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Class base name, such as `Room`."
          },
          "subject_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActivityModelReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "causer_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "causer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "causer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActivityModelReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "properties": {
            "type": [
              "object",
              "array"
            ],
            "additionalProperties": true,
            "description": "Raw log properties. When the entry records changes, `old` and `attributes` hold the old and new values. Other keys, such as `extra` or `method`, may be present."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the change came from, taken from `properties.extra` or `properties.method`."
          },
          "changes": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "old": {
                "type": [
                  "object",
                  "array"
                ]
              },
              "new": {
                "type": [
                  "object",
                  "array"
                ]
              }
            },
            "description": "The old and new values, or `null` if the entry records no changes."
          }
        },
        "examples": [
          {
            "id": 1204,
            "log_name": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
            "description": "Room updated",
            "event": "updated",
            "created_at": "2026-03-04T10:08:06.000000Z",
            "updated_at": "2026-03-04T10:08:06.000000Z",
            "subject_type": "App\\Room",
            "subject_type_label": "Room",
            "subject_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
            "subject": {
              "id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
              "name": "Boardroom",
              "type": "Room"
            },
            "causer_type": "App\\User",
            "causer_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
            "causer": {
              "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
              "name": "Sam Example",
              "type": "User"
            },
            "properties": {
              "old": {
                "notes": null
              },
              "attributes": {
                "notes": "Projector out of order"
              }
            },
            "source": null,
            "changes": {
              "old": {
                "notes": null
              },
              "new": {
                "notes": "Projector out of order"
              }
            }
          }
        ]
      },
      "ActivityModelReference": {
        "title": "Activity Model Reference",
        "type": "object",
        "description": "A short reference to the subject or causer of an activity log entry.",
        "properties": {
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string",
            "description": "Class base name, such as `Room` or `User`."
          }
        }
      },
      "ApprovalAssignment": {
        "title": "Approval Assignment",
        "type": "object",
        "description": "An approval assignment that makes a user or team the approver for a desk or room.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "approvable_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the desk or room."
          },
          "approvable_type": {
            "type": "string",
            "enum": [
              "App\\Desk",
              "App\\Room"
            ],
            "description": "The type of resource that needs approval."
          },
          "approver_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the approving user or team."
          },
          "approver_type": {
            "type": "string",
            "enum": [
              "App\\User",
              "App\\Team"
            ],
            "description": "Whether the approver is a user or a team."
          },
          "approver_name": {
            "type": "string",
            "description": "The name of the approving user or team."
          }
        }
      },
      "ApprovalException": {
        "title": "Approval Exception",
        "type": "object",
        "description": "A user, team or role that is exempt from approval for a desk, room, or all of a type.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "approvable_type": {
            "type": "string",
            "description": "The model class the exception applies to, e.g. `App\\Desk` or `App\\Room`."
          },
          "approvable_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "`null` when the exception applies to every item of `approvable_type`."
          },
          "approvable_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": "string",
            "format": "uuid"
          },
          "parent_type": {
            "type": "string",
            "description": "The exempt model class: `App\\User`, `App\\Team` or `App\\Role`."
          },
          "parent_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ApprovalSetting": {
        "title": "Approval Setting",
        "type": "object",
        "description": "Automatic approval behaviour for bookings or meetings in an organisation.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Absent if the organisation has not saved a setting yet."
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "approvable_type": {
            "type": "string",
            "enum": [
              "App\\Booking",
              "App\\Meeting"
            ]
          },
          "auto_action": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "none"
            ]
          },
          "auto_action_minutes": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Absent if not saved yet."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Absent if not saved yet."
          }
        }
      },
      "ApprovalStatus": {
        "title": "Approval Status",
        "type": "object",
        "description": "The status of an approval.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The ID of the user who approved or declined, or `null` while pending."
          },
          "user_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of that user."
          },
          "status": {
            "type": "string",
            "enum": [
              "approved",
              "declined",
              "pending"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reason given for the decision."
          },
          "master_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "For a series, the ID of the approval status that the others follow."
          }
        }
      },
      "ArrivalsFeatureSlug": {
        "title": "ArrivalsHQ feature slug",
        "type": "string",
        "enum": [
          "arrivals-pre-registration",
          "arrivals-branding",
          "arrivals-custom-email-branding",
          "arrivals-multi-language",
          "arrivals-presence-detection",
          "arrivals-documents",
          "arrivals-roll-call",
          "arrivals-audit-export",
          "arrivals-teams-notifications",
          "arrivals-staff-signin",
          "arrivals-staff-pin",
          "arrivals-visitor-approvals",
          "arrivals-standard-visitor-types",
          "arrivals-visitor-types",
          "arrivals-deliveries",
          "arrivals-badge-printing",
          "arrivals-document-library",
          "arrivals-id-scanning",
          "arrivals-accessibility-capture",
          "arrivals-geofence-staff-signin",
          "arrivals-emergency-suite",
          "arrivals-compliance-dashboard",
          "arrivals-ai-assist",
          "arrivals-multi-tenant-reception",
          "arrivals-journey-builder",
          "arrivals-configurable-retention"
        ],
        "description": "An ArrivalsHQ plan feature. Each tier includes every feature of the tiers below it: Loyalty, Essentials, Plus, Professional."
      },
      "Asset": {
        "title": "Asset",
        "type": "object",
        "description": "An uploaded file, such as an office floor plan or an avatar.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "description": "Format `YYYY-MM-DD HH:mm:ss`, in UTC.",
            "example": "2026-03-12 09:41:07"
          },
          "last_accessed": {
            "type": [
              "string",
              "null"
            ],
            "description": "Format `YYYY-MM-DD HH:mm:ss`, in UTC.",
            "example": "2026-03-12 09:41:07"
          },
          "name": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "The storage key of the file."
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "width": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The image width in pixels. For a PDF, the width of the image it was converted to."
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The image height in pixels. For a PDF, the height of the image it was converted to."
          }
        }
      },
      "Attribute": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "Attribute",
        "description": "User-applicable attribute in Clearooms"
      },
      "BaseBooking": {
        "title": "Base Booking",
        "type": "object",
        "x-internal": false,
        "description": "Fields common to all types of booking resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The booking's identifier in the Clearooms system."
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MinimisedUser"
              },
              {
                "type": "null"
              }
            ],
            "description": "The user the booking is for. For a guest booking this is `null` in a Minimised Booking and left out of a Booking."
          },
          "date": {
            "type": "string",
            "description": "The start of the booking. Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`. For all-day bookings this is the start of the office's working hours.",
            "example": "2026-11-02 09:00:00"
          },
          "end_date": {
            "type": "string",
            "description": "The end of the booking. Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`. For all-day bookings this is the end of the office's working hours.",
            "example": "2026-11-02 17:30:00"
          },
          "guest_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "The name of the guest the booking is for, or `null` if it is for a user."
          },
          "requires_checkin": {
            "type": "boolean",
            "description": "Whether the booking requires a check-in."
          },
          "checkin_status": {
            "$ref": "#/components/schemas/BookingCheckinStatus"
          },
          "all_day": {
            "type": "boolean",
            "description": "Whether the booking lasts all day, as defined by the office's working hours."
          },
          "checked_out_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the booking was checked out, or `null`. Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
          },
          "booked_via_openspaces": {
            "type": "boolean",
            "description": "Whether the booking was made through an OpenSpaces widget."
          }
        }
      },
      "BaseDesk": {
        "title": "Base Desk",
        "type": "object",
        "description": "Fields common to all types of desk resource.",
        "x-internal": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "desk",
              "parking_space"
            ]
          },
          "position_x": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "The x-coordinate on the office's floor plan, as a percentage of its width."
          },
          "position_y": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "The y-coordinate on the office's floor plan, as a percentage of its height."
          },
          "absolute_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "absolute_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeskResource"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60000
          }
        }
      },
      "BaseMeeting": {
        "title": "Base Meeting",
        "type": "object",
        "x-internal": false,
        "description": "Fields common to all types of meeting resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "The meeting subject. If the subject is masked for you (the meeting is private, or the room rules hide meeting titles, and you are not exempt), it is replaced with `{organiser} - Private Meeting`, translated to your locale."
          },
          "description": {
            "type": "string",
            "description": "The plain-text description, with HTML tags stripped. Empty if the description is masked for you."
          },
          "private": {
            "type": "boolean",
            "description": "Whether the meeting is marked as private."
          },
          "start_time": {
            "type": "string",
            "example": "2025-05-02 09:00",
            "description": "Format `Y-m-d H:i`, in UTC."
          },
          "start_time_tz": {
            "$ref": "#/components/schemas/Timezone"
          },
          "end_time": {
            "type": "string",
            "example": "2025-05-02 10:00",
            "description": "Format `Y-m-d H:i`, in UTC."
          },
          "end_time_tz": {
            "$ref": "#/components/schemas/Timezone"
          },
          "organiser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The organiser's email address."
          },
          "booked_via_openspaces": {
            "type": "boolean",
            "description": "Whether the meeting was booked through OpenSpaces."
          }
        }
      },
      "BaseOffice": {
        "title": "BaseOffice",
        "type": "object",
        "description": "Fields common to all kinds of office resource.",
        "x-internal": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheme_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The ID of the asset used as the floor plan."
          },
          "hot_desks_desks_size": {
            "$ref": "#/components/schemas/DeskSize"
          },
          "plan_icon_sizes": {
            "$ref": "#/components/schemas/OfficePlanIconSizes"
          },
          "desks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Desk"
            }
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BasicRoom"
            }
          },
          "geofences": {
            "type": "array",
            "description": "The office's own geofences, or its building's if it has none.",
            "items": {
              "$ref": "#/components/schemas/Geofence"
            }
          },
          "default": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When listing offices, whether this is the authenticated user's own office."
          },
          "organisation_default": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this is the organisation's default office."
          },
          "timezone": {
            "$ref": "#/components/schemas/Timezone"
          },
          "plan_image": {
            "$ref": "#/components/schemas/OfficePlanImage"
          },
          "desk_limits": {
            "$ref": "#/components/schemas/OfficeDeskLimits"
          },
          "working_hours": {
            "type": "array",
            "description": "The organisation's working hours when global working hours are enabled, otherwise the office's. Defaults are returned when none are set.",
            "items": {
              "$ref": "#/components/schemas/WorkingHours"
            }
          },
          "building": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "external_system": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "renderer": {
            "type": "string",
            "enum": [
              "legacy",
              "v2"
            ],
            "description": "Which office plan renderer the office uses."
          },
          "allow_legacy_renderer": {
            "type": "boolean",
            "description": "Whether the organisation may use the legacy office plan renderer."
          },
          "office_notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60000
          }
        }
      },
      "BaseOrganisation": {
        "title": "Base Organisation",
        "type": "object",
        "x-internal": false,
        "description": "Fields common to all types of organisation resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "brand_color": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HexColour"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_slogan": {
            "type": [
              "string",
              "null"
            ]
          },
          "twelve_hour_time_format_enabled": {
            "type": "boolean"
          },
          "first_day_of_week": {
            "type": [
              "string",
              "null"
            ]
          },
          "manually_invoiced": {
            "type": "boolean"
          },
          "trial_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checkin_enabled": {
            "type": "boolean"
          },
          "early_checkin_enabled": {
            "type": "boolean"
          },
          "checkout_enabled": {
            "type": "boolean"
          },
          "custom_booking_fields_custom_message_enabled": {
            "type": "boolean"
          },
          "custom_booking_fields_custom_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "qr_checkin_required": {
            "type": "boolean"
          },
          "global_working_hours_enabled": {
            "type": "boolean"
          },
          "new_billing": {
            "type": "boolean"
          },
          "ignores_billing": {
            "type": "boolean"
          },
          "active_plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingPlan"
            },
            "description": "The current plan of each cost centre."
          },
          "subscription": {
            "type": [
              "object",
              "null"
            ],
            "description": "`null` when there are no active plans; otherwise these fixed values.",
            "properties": {
              "has_payment_method": {
                "type": "boolean"
              },
              "on_grace_period": {
                "type": "boolean"
              },
              "trial_ends_at": {
                "type": "null"
              },
              "stripe_status": {
                "type": "string",
                "enum": [
                  "active"
                ]
              }
            }
          },
          "favourites_enabled": {
            "type": "boolean"
          },
          "meeting_delegation_enabled": {
            "type": "boolean"
          },
          "has_desks": {
            "type": "boolean",
            "description": "Whether the organisation has any desks other than parking spaces."
          },
          "homepage_enabled": {
            "type": "boolean"
          },
          "terminology": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Custom terminology overrides."
          },
          "landing_page_preference": {
            "type": [
              "string",
              "null"
            ]
          },
          "allow_geofencing_checkin": {
            "type": "boolean"
          },
          "allow_geofencing_stepin_and_stepout": {
            "type": "boolean"
          },
          "allow_geofencing_arrivals": {
            "type": "boolean",
            "description": "Whether staff can be signed in and out automatically from the mobile app's office geofences. `true` only when staff sign-in and geofence sign-in are both turned on and the plan includes `arrivals-geofence-staff-signin`. Each user must also opt in."
          },
          "allow_geofencing_evacuation": {
            "type": "boolean",
            "description": "Whether the roll call shows staff members' geofence location during an evacuation. `true` only when it is turned on and the plan includes `arrivals-emergency-suite`. Each user must also opt in."
          },
          "arrivals_features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArrivalsFeatureSlug"
            },
            "description": "The ArrivalsHQ features the organisation's plan includes."
          }
        }
      },
      "BaseRoom": {
        "title": "Base Room",
        "type": "object",
        "x-internal": false,
        "description": "Fields common to all types of room resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "external_system": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          }
        }
      },
      "BaseUser": {
        "title": "Base User",
        "x-internal": false,
        "description": "Fields common to all types of user resource.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "avatar": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Asset"
              },
              {
                "type": "null"
              }
            ],
            "description": "The user's avatar, or `null` if they have none."
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserAttribute"
            },
            "description": "The attributes assigned to the user."
          }
        }
      },
      "BasicOffice": {
        "title": "Office (Basic)",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        },
        "description": "A basic version of the office resource."
      },
      "BasicRoom": {
        "title": "Room (Basic)",
        "description": "A basic version of the room resource.",
        "x-internal": false,
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "position_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Horizontal position on the office plan, as a percentage."
          },
          "position_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Vertical position on the office plan, as a percentage."
          },
          "absolute_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Horizontal position on the office plan, in plan coordinates."
          },
          "absolute_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Vertical position on the office plan, in plan coordinates."
          },
          "external_system": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BillingPlan": {
        "type": "object",
        "title": "Billing Plan",
        "description": "A billing plan assigned to a cost centre. Returned as the raw plan record.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "cost_centre_id": {
            "type": "string",
            "format": "uuid"
          },
          "price_book_id": {
            "type": "string",
            "format": "uuid"
          },
          "billing_interval": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "annually",
              "biennially"
            ]
          },
          "next_invoice_date": {
            "type": "string",
            "format": "date-time"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "trial_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "payment_upfront": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "auto_payment_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_method": {
            "type": "string",
            "enum": [
              "card",
              "invoice"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "last_invoice_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pause_dunning": {
            "type": "boolean"
          },
          "superseded_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The plan that replaced this one, if any."
          },
          "supersedes_plan": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The plan this one replaced, if any."
          },
          "cancellation_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "downgrade_reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Booking": {
        "title": "Booking",
        "description": "A desk or parking space booking.\n\nIf the request has an `expands` query parameter (a comma-separated list such as `booking.shift`), each named relation whose `<name>_id` is set is added to the response under `<name>`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseBooking"
          },
          {
            "type": "object",
            "properties": {
              "desk_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the booked desk or parking space."
              },
              "desk": {
                "type": "object",
                "description": "The booked desk or parking space.",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "desk",
                      "parking_space",
                      null
                    ]
                  },
                  "position_x": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                  },
                  "position_y": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "office": {
                "type": "object",
                "description": "The office the desk belongs to.",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scheme_asset_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "external_system": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The ID of the user the booking is for, or `null` for a guest booking."
              },
              "openspaces_details": {
                "$ref": "#/components/schemas/OpenSpacesBookingDetails",
                "description": "Only present if `booked_via_openspaces` is `true`."
              },
              "guest_email": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email",
                "description": "The email of the guest the booking is for, if any."
              },
              "duration": {
                "type": "integer",
                "description": "The length of the booking in minutes."
              },
              "booked_by_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The ID of the user who made the booking."
              },
              "repeat_booking": {
                "type": "boolean",
                "description": "Whether the booking is part of a repeating series."
              },
              "repeat_booking_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The ID of the series the booking belongs to, if any."
              },
              "shift_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The ID of the shift the booking was made for, if any. Shift bookings take their start and end times from the shift."
              },
              "checked_out_reason": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/BookingCheckOutReason"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellation_reason_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The ID of the cancellation reason chosen when the booking was cancelled. `null` if none was chosen or \"Other\" was chosen."
              },
              "cancellation_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The label of the cancellation reason at the time of cancellation."
              },
              "cancellation_note": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500,
                "description": "The note given when the booking was cancelled."
              },
              "cancellation_reason_policy": {
                "$ref": "#/components/schemas/BookingCancellationPolicy"
              },
              "vehicles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Vehicle"
                },
                "description": "The vehicles attached to the booking. Only present when loaded by the endpoint."
              },
              "parking_permits": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ParkingPermit"
                },
                "description": "The parking permits attached to the booking. Only present when loaded by the endpoint."
              },
              "activities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Activity"
                },
                "description": "The activity log for the booking."
              },
              "stepped_out_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the user stepped out, or `null`. Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
              },
              "step_out_expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the step-out ends and the booking is checked out, or `null`. Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
              },
              "approval_status": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApprovalStatus"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The approval status, if the desk requires approval."
              },
              "popups": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BookingPopup"
                },
                "description": "Messages from installed plugins. Only filled in on the first booking returned when creating bookings; otherwise empty."
              },
              "misuse_reporting": {
                "$ref": "#/components/schemas/BookingMisuseReporting",
                "description": "Only present for parking space bookings."
              },
              "booked_by_user": {
                "type": "object",
                "description": "The user who made the booking. Only present when loaded by the endpoint.",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "linked_bookings": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LinkedBooking"
                },
                "description": "Bookings linked to this one, such as a parking space booked with a desk. Only present if there are any."
              },
              "linked_booking": {
                "$ref": "#/components/schemas/LinkedBooking",
                "description": "The first entry of `linked_bookings`. Only present if there are any."
              }
            }
          }
        ]
      },
      "BookingAttendance": {
        "title": "BookingAttendance",
        "description": "A desk booking as shown in attendance and whereabouts views.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Booking"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "checkin_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "stepped_out_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Format `Y-m-d H:i:s` in the office timezone."
          },
          "all_day": {
            "type": "boolean"
          },
          "user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MinimisedUser"
              },
              {
                "type": "object",
                "description": "Returned for guest bookings.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "Guest"
                    ]
                  },
                  "id": {
                    "type": "null"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "null"
                  },
                  "teams": {
                    "type": "null"
                  },
                  "attributes": {
                    "type": "null"
                  },
                  "avatar": {
                    "type": "null"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "desk_id": {
            "type": "string",
            "format": "uuid"
          },
          "desk_name": {
            "type": "string"
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "office_name": {
            "type": "string"
          },
          "start_time": {
            "type": "string"
          },
          "end_time": {
            "type": "string"
          },
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Activity"
            },
            "description": "Activity log entries for the booking, newest first. Includes archived entries for older bookings. The `subject` and `causer` relations are not loaded."
          },
          "user_statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserStatusRecord"
            },
            "description": "The booking user's statuses. Only populated when statuses have been eager loaded; otherwise an empty array."
          }
        }
      },
      "BookingCancellationPolicy": {
        "title": "Booking Cancellation Policy",
        "type": "object",
        "description": "Whether the booking's office asks for a cancellation reason for this type of desk.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether a cancellation reason can be given."
          },
          "required": {
            "type": "boolean",
            "description": "Whether a cancellation reason must be given when cancelling."
          }
        }
      },
      "BookingCancellationReason": {
        "title": "Booking Cancellation Reason",
        "type": "object",
        "description": "An organisation-wide reason a user can give when cancelling a booking.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "maxLength": 60
          },
          "applies_to": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "desk",
                "parking_space"
              ]
            },
            "description": "The desk types this reason is offered for."
          },
          "requires_note": {
            "type": "boolean",
            "description": "Whether the user must add a note when choosing this reason."
          },
          "is_active": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "bookings_count": {
            "type": "integer",
            "description": "The number of bookings that recorded this reason."
          },
          "built_in": {
            "type": "boolean",
            "description": "Always `false` for organisation-defined reasons."
          }
        }
      },
      "BookingCancellationReasonOption": {
        "title": "Booking Cancellation Reason Option",
        "type": "object",
        "description": "A reason offered to a user cancelling a booking.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The reason ID, or `other` for the built-in \"Other\" option."
          },
          "label": {
            "type": "string"
          },
          "requires_note": {
            "type": "boolean"
          },
          "built_in": {
            "type": "boolean",
            "description": "`true` only for the built-in \"Other\" option."
          }
        }
      },
      "BookingCheckOutReason": {
        "title": "BookingCheckOutReason",
        "type": "string",
        "enum": [
          "AUTO_CHECKOUT"
        ],
        "description": "Why a booking was checked out. `AUTO_CHECKOUT` means the system checked it out automatically. Manual check-outs leave the reason as `null`."
      },
      "BookingCheckinStatus": {
        "title": "BookingCheckinStatus",
        "type": "string",
        "enum": [
          "attended",
          "cancelled",
          "not required",
          "pending"
        ],
        "description": "The check-in status of a booking.\n\n`attended` - The booking has been checked in.\n\n`cancelled` - The booking was cancelled, or was not checked in on time.\n\n`not required` - The organisation does not require bookings to be checked in, or the user has an exception.\n\n`pending` - The booking is awaiting check-in.",
        "x-internal": false
      },
      "BookingCustomField": {
        "title": "Booking Custom Field",
        "description": "A custom field to fill in when booking a particular desk. Covers both legacy custom booking fields (`options` is always empty) and newer custom fields.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomBookingField"
          },
          {
            "type": "object",
            "properties": {
              "options": {
                "type": [
                  "array",
                  "object",
                  "null"
                ],
                "description": "The choices for the field. Always empty for legacy custom booking fields."
              }
            }
          }
        ]
      },
      "BookingMisuseReporting": {
        "title": "Booking Misuse Reporting",
        "type": "object",
        "description": "Parking misuse reporting state for a parking space booking. Only returned for bookings of parking spaces.",
        "properties": {
          "can_report": {
            "type": "boolean",
            "description": "Whether the viewer can report misuse of this space now."
          },
          "active_report_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The open misuse report on this booking, if any."
          },
          "active_report_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "submitted",
              "under_review",
              "resolved",
              null
            ]
          },
          "latest_report_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The most recent misuse report on this booking, if any."
          },
          "latest_report_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "submitted",
              "under_review",
              "resolved",
              null
            ]
          },
          "max_photos": {
            "type": "integer",
            "description": "The most photos a report can include."
          },
          "vehicle_details_required": {
            "type": "boolean"
          },
          "note_required": {
            "type": "boolean"
          }
        }
      },
      "BookingPopup": {
        "title": "Booking Popup",
        "type": "object",
        "description": "A message from an installed plugin to show after a booking is created.",
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "INFO",
              "WARNING",
              "SUCCESS",
              "ERROR"
            ]
          }
        }
      },
      "BookingReport": {
        "title": "BookingReport",
        "type": "object",
        "description": "A row that forms a booking report.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Matches the ID of the booking."
          },
          "date": {
            "type": "string",
            "description": "Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
          },
          "end_date": {
            "type": "string",
            "description": "Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
          },
          "building": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "office": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            }
          },
          "desk": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomBookingFieldValue"
            }
          },
          "booked_by_name": {
            "type": "string",
            "description": "The name of the user who made the booking, falling back to the name of the user it is for. If neither exists, \"Deleted User\" in the language of the user making the request."
          },
          "user_attributes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "description": "The attributes of the user the booking is for, or `null` for a guest."
          },
          "user_teams": {
            "type": [
              "array",
              "null"
            ],
            "description": "The user's teams, excluding internal teams. `null` for a guest.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "user_permits": {
            "type": "array",
            "description": "The parking permits attached to the booking.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reference_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The name of the permit type."
                }
              }
            }
          },
          "user_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the user whom the booking is for. If the booking is for a guest, their name."
          },
          "user_email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "The email of the user whom the booking is for. If the booking is for a guest, their email."
          },
          "checkin_status": {
            "$ref": "#/components/schemas/BookingCheckinStatus"
          },
          "checked_out_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BookingCheckOutReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancellation_reason_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "cancellation_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "cancellation_note": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "If the booking has been deleted, when it was done, otherwise `null`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the booking was made, taken from its creation log: usually `portal`, `mobile`, `api`, `zapier`, `desk-qr` or `unknown`. Older or other channels give a lower-case token. `null` if there is no creation log."
          },
          "deleted_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "If the booking has been deleted, the name of the person who deleted it, otherwise `null`."
          },
          "vehicles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "registration_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "make": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "model": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "BookingWithDesk": {
        "title": "Booking With Desk",
        "description": "A Booking where `desk` and `office` are the full desk and office records rather than the summaries, plus `user_name`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Booking"
          },
          {
            "type": "object",
            "properties": {
              "desk": {
                "type": "object",
                "additionalProperties": true,
                "description": "The desk's full stored record (all columns, such as `office_id`, `type`, `position_x`, `position_y`, `created_at`)."
              },
              "office": {
                "type": "object",
                "additionalProperties": true,
                "description": "The office's full stored record (all columns, such as `organisation_id`, `timezone`, `created_at`)."
              },
              "user_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The user's name, or the guest's name for a guest booking."
              }
            }
          }
        ]
      },
      "Building": {
        "title": "Building",
        "type": "object",
        "description": "A building which contains offices.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "street_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "offices": {
            "type": "array",
            "description": "A list of the building's offices, ordered by the offices' `order` property.",
            "items": {
              "$ref": "#/components/schemas/BasicOffice"
            }
          },
          "geofences": {
            "type": "array",
            "description": "The building's geofences. Offices in the building without geofences of their own use these.",
            "items": {
              "$ref": "#/components/schemas/Geofence"
            }
          },
          "order": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CheckInException": {
        "title": "Check-in Exception",
        "type": "object",
        "description": "An exception to check-in rules.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the excepted office or team."
          },
          "type": {
            "type": "string",
            "description": "The model class of the excepted record, for example `App\\Office` or `App\\Team`."
          }
        }
      },
      "Currency": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "example": "Pound Sterling"
          },
          "code": {
            "type": "string",
            "maxLength": 50,
            "example": "GBP"
          },
          "symbol": {
            "type": "string",
            "example": "£"
          }
        },
        "title": "Currency",
        "description": "A currency that services can be charged in."
      },
      "CurrentUser": {
        "title": "Current User",
        "description": "The authenticated user. Extends `User` with fields that are only returned when a user requests their own record. If the caller authenticated with a one-time passcode, these extra fields are omitted.",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          },
          {
            "type": "object",
            "properties": {
              "ics_feed_url": {
                "type": "string",
                "format": "uri",
                "description": "Signed URL of the user's iCalendar feed."
              },
              "team": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The raw record of the user's legacy single team (`team_id`), or `null`.",
                "x-todo": "raw Team model attributes (not TeamResource); columns not enumerated"
              },
              "colours": {
                "$ref": "#/components/schemas/UserColours"
              },
              "admin_ics_feed_url": {
                "type": "string",
                "format": "uri",
                "description": "Signed URL of the organisation-wide iCalendar feed. Only returned to admins."
              },
              "arrivals": {
                "$ref": "#/components/schemas/UserArrivalsCapabilities"
              }
            }
          }
        ]
      },
      "CustomAvailabilityRule": {
        "title": "Custom Availability Rule",
        "type": "object",
        "description": "A rule that makes desks or rooms unavailable over a period, optionally only for some offices, desks, rooms, teams or days.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "maxLength": 255
          },
          "start_date": {
            "type": "string",
            "description": "When the rule starts, formatted `YYYY-MM-DD HH:MM:SS`.",
            "example": "2026-12-24 00:00:00"
          },
          "end_date": {
            "type": "string",
            "description": "When the rule ends, formatted `YYYY-MM-DD HH:MM:SS`.",
            "example": "2026-12-27 00:00:00"
          },
          "offices": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The offices the rule applies to. Empty means all offices."
          },
          "desks": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The desks the rule applies to. Empty means all desks."
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The teams the rule applies to. Empty means everyone."
          },
          "rooms": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The rooms the rule applies to."
          },
          "days": {
            "type": "array",
            "description": "The days of the week the rule applies on, as numbers from `0` (Sunday) to `6` (Saturday). Leave empty or omit for every day. The type of each entry is not validated; anything other than these numbers never matches.",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "availability_type": {
            "type": "string",
            "enum": [
              "desk",
              "room"
            ]
          },
          "desk_type": {
            "type": "string",
            "enum": [
              "desk",
              "parking_space"
            ]
          }
        }
      },
      "CustomBookingField": {
        "title": "Custom Booking Field",
        "type": "object",
        "description": "A legacy custom field that users fill in when booking a desk.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "The input type. Free text; not validated against a list."
          },
          "required": {
            "type": "boolean",
            "description": "Whether a value must be given when booking."
          },
          "label": {
            "type": "string"
          },
          "restrictByValue": {
            "type": "boolean",
            "description": "Whether bookings are only allowed when the value matches `restrictByValueRequiredValue`."
          },
          "restrictByValueRequiredValue": {
            "type": [
              "string",
              "null"
            ],
            "description": "The value a booking must give when `restrictByValue` is `true`. Compared without regard to case."
          },
          "restrict_to_openspaces": {
            "type": "boolean",
            "description": "Whether the field only applies to bookings made through an OpenSpaces widget."
          },
          "order": {
            "type": "integer"
          },
          "offices": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The offices the field applies to."
          },
          "desks": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The desks the field applies to."
          }
        }
      },
      "CustomBookingFieldRecord": {
        "title": "Custom Booking Field Record",
        "type": "object",
        "description": "A custom booking field as stored, returned without being passed through the Custom Booking Field resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "label": {
            "type": "string"
          },
          "restrictByValue": {
            "type": "boolean"
          },
          "restrictByValueRequiredValue": {
            "type": [
              "string",
              "null"
            ]
          },
          "restrict_to_openspaces": {
            "type": "boolean"
          },
          "order": {
            "type": "integer"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CustomBookingFieldValue": {
        "title": "CustomBookingFieldValue",
        "type": "object",
        "description": "A value given for a custom field on a booking.",
        "properties": {
          "field": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomBookingFieldRecord"
              },
              {
                "$ref": "#/components/schemas/CustomField"
              }
            ],
            "description": "The stored field record. A legacy custom booking field, or a newer custom field."
          },
          "field_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the field."
          },
          "value": {
            "description": "The value given. Always a string for legacy custom booking fields; any JSON value for newer custom fields."
          }
        }
      },
      "CustomField": {
        "title": "CustomField",
        "description": "A custom field configured for the organisation.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "Textbox",
              "Checkbox",
              "Yesno",
              "Multiselect",
              "Label",
              "Link"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "label": {
            "type": "string"
          },
          "options": {
            "type": [
              "array",
              "object",
              "null"
            ],
            "description": "A list of option strings, or `{url, openInNewTab}` for a `Link` field."
          },
          "fieldable_type": {
            "type": "string",
            "description": "The model the field applies to, e.g. `App\\Visitor`."
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Offices the field is limited to."
          },
          "room_id": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Rooms the field is limited to."
          },
          "desk_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Desks the field is limited to."
          },
          "desk_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "desk",
              "parking_space",
              null
            ]
          },
          "restrict_by_value": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "restrict_by_value_required_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "order": {
            "type": [
              "integer",
              "null"
            ]
          },
          "restrict_to_openspaces": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "show_on_visitor_entry": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Only present when `fieldable_type` is `App\\Visitor`."
          },
          "show_on_visitor_check_in": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Only present when `fieldable_type` is `App\\Visitor`."
          }
        }
      },
      "CustomStatus": {
        "title": "Custom Status",
        "type": "object",
        "description": "A custom status that can be applied to users",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "colour": {
            "$ref": "#/components/schemas/HexColour"
          },
          "allow_booking_removal": {
            "type": "boolean",
            "description": "Whether this status allows for the removal of existing bookings."
          },
          "allow_free_allocations": {
            "type": "boolean"
          },
          "allow_office_selection": {
            "type": "boolean",
            "description": "Whether the status can only apply to certain offices."
          },
          "show_add_booking": {
            "type": "boolean"
          }
        }
      },
      "CustomerSuccessManager": {
        "title": "Customer Success Manager",
        "type": "object",
        "description": "Details of an organisation's Customer Success Manager",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "calendly_link": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Delivery": {
        "title": "Delivery",
        "type": "object",
        "description": "A parcel logged at reception.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "courier_name": {
            "type": "string"
          },
          "courier_company": {
            "type": [
              "string",
              "null"
            ]
          },
          "recipient_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The member the parcel is for, if it was logged against a member."
          },
          "recipient_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member's name, or the free-text recipient name."
          },
          "package_count": {
            "type": "integer",
            "minimum": 1
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "photo_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "A link to the label photo, if one was taken. On private storage the link expires after 30 minutes."
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_collection",
              "collected"
            ]
          },
          "received_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "collected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "collected_by_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who took the parcel, as typed by the person who recorded the collection."
          },
          "collected_by_user": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the user who recorded the collection. Only present in the response to marking a parcel collected."
          },
          "reminded_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "reminder_count": {
            "type": "integer"
          },
          "logged_via": {
            "type": "string",
            "enum": [
              "kiosk",
              "portal"
            ],
            "description": "`kiosk` if logged by a kiosk, otherwise `portal` (this includes the API)."
          },
          "logged_by_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The user who logged it. `null` for kiosk logs."
          },
          "office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "office_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "drop_off_location": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the drop-off point, as it was when the parcel was logged."
          },
          "journey_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The kiosk journey the parcel was logged in, if any."
          },
          "visitor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The courier's visitor record, if the kiosk journey created one."
          }
        },
        "required": [
          "id",
          "courier_name",
          "status",
          "package_count",
          "reminder_count",
          "logged_via"
        ]
      },
      "Desk": {
        "title": "Desk",
        "description": "A desk or parking space in Clearooms.",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnminimisedDesk"
          },
          {
            "type": "object",
            "properties": {
              "office": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "user": {
                "description": "The user the desk is assigned to, if any.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/MinimisedUser"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_openspaces_configuration": {
                "type": "boolean",
                "description": "Whether the desk has an OpenSpaces configuration. Only returned when that relation has been loaded."
              }
            }
          }
        ]
      },
      "DeskAllocation": {
        "title": "Desk Allocation",
        "type": "object",
        "description": "A user or team allocated to a desk.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the user or team."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the user or team."
          },
          "avatar": {
            "description": "The user's avatar. Only set for user allocations when avatars have been loaded; otherwise `null`.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Asset"
              },
              {
                "type": "null"
              }
            ]
          },
          "days": {
            "type": "object",
            "description": "The weekdays the allocation applies on.",
            "properties": {
              "mon": {
                "type": "boolean"
              },
              "tue": {
                "type": "boolean"
              },
              "wed": {
                "type": "boolean"
              },
              "thu": {
                "type": "boolean"
              },
              "fri": {
                "type": "boolean"
              },
              "sat": {
                "type": "boolean"
              },
              "sun": {
                "type": "boolean"
              }
            }
          },
          "priority_settings": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DeskAllocationPrioritySetting"
            }
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "auto_book": {
            "description": "Auto-book settings. `null` for team allocations.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DeskAllocationAutoBook"
              },
              {
                "type": "null"
              }
            ]
          },
          "locations": {
            "type": "array",
            "description": "Team allocations only.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DeskAllocationAutoBook": {
        "title": "Desk Allocation Auto-Book",
        "type": "object",
        "description": "Auto-book settings for a user allocation. Auto-book can only be enabled when the desk has a single user allocation.",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "mode": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "fixed",
              "rolling",
              null
            ]
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "window_amount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "window_unit": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "week",
              "month",
              "year",
              null
            ]
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "horizon_cap_at_end_date": {
            "type": "boolean"
          },
          "respect_non_working_days": {
            "type": "boolean"
          },
          "conflict_strategy": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "skip",
              null
            ]
          },
          "last_extended_on": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "idle",
              "processing",
              "completed",
              "failed"
            ]
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "processed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "future_bookings_count": {
            "type": "integer",
            "description": "The number of future bookings auto-book has made for this user on this desk. Always `0` while auto-book is disabled."
          }
        }
      },
      "DeskAllocationPrioritySetting": {
        "title": "Desk Allocation Priority Setting",
        "type": "object",
        "description": "Releases an allocated desk to everyone a number of minutes before or after the office opens on the given weekday.",
        "properties": {
          "day": {
            "type": "string",
            "description": "The ISO weekday, from `\"1\"` (Monday) to `\"7\"` (Sunday)."
          },
          "mode": {
            "type": "string",
            "enum": [
              "before",
              "after"
            ]
          },
          "minutes": {
            "type": "integer"
          }
        }
      },
      "DeskAvailability": {
        "title": "Desk Availability",
        "type": "object",
        "x-internal": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "available_partially": {
            "type": "boolean",
            "description": "Whether part of the period can still be booked. Starts true when hourly or half-day bookings are enabled."
          },
          "status": {
            "type": "string",
            "description": "`AVAILABLE`, or the status of the first rule that failed."
          },
          "message": {
            "type": "string"
          },
          "can_be_overriden": {
            "type": "boolean"
          },
          "extra": {
            "type": "string",
            "description": "Extra detail from the failing rule, for example the name of the person who has booked the desk when desk privacy is off."
          },
          "available_rest_of_current_day": {
            "type": "boolean"
          },
          "failing_rule": {
            "type": "string",
            "description": "The class name of the rule that failed. Only returned when the desk is not available."
          }
        }
      },
      "DeskAvailabilityByDate": {
        "title": "Desk Availability By Date",
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "availability": {
            "$ref": "#/components/schemas/DeskAvailability"
          }
        }
      },
      "DeskGuestAllocation": {
        "title": "Desk Allocation (Guest)",
        "type": "object",
        "description": "Guests allocated to a desk.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "days": {
            "type": "object",
            "description": "The weekdays the allocation applies on.",
            "properties": {
              "mon": {
                "type": "boolean"
              },
              "tue": {
                "type": "boolean"
              },
              "wed": {
                "type": "boolean"
              },
              "thu": {
                "type": "boolean"
              },
              "fri": {
                "type": "boolean"
              },
              "sat": {
                "type": "boolean"
              },
              "sun": {
                "type": "boolean"
              }
            }
          },
          "priority_settings": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DeskAllocationPrioritySetting"
            }
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "DeskLimits": {
        "title": "Desk Limits",
        "type": "object",
        "description": "A set of booking limits for desks or parking spaces, belonging to an organisation or an office.",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "`null` when no limits have been saved and defaults are being returned."
          },
          "parent_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of either the office or organisation to which this set of desk limits belongs."
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "App\\Office",
              "App\\Organisation"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "desk",
              "parking_space"
            ],
            "description": "Whether these limits apply to desks or parking spaces."
          },
          "buffer_times_enabled": {
            "type": "boolean"
          },
          "days_between_bookings": {
            "type": "integer",
            "description": "The minimum number of days between bookings on a given desk."
          },
          "usage_limit_enabled": {
            "type": "boolean"
          },
          "usage_limit": {
            "type": "integer"
          },
          "usage_limit_period": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month"
            ]
          },
          "bookings_per_user_per_day_enabled": {
            "type": "boolean"
          },
          "bookings_per_user_per_day": {
            "type": "integer"
          },
          "repeat_bookings_enabled": {
            "type": "boolean"
          },
          "restrict_repeat_bookings": {
            "type": "boolean"
          },
          "max_repeat_booking_weeks": {
            "type": "integer",
            "minimum": 1
          },
          "hourly_bookings_enabled": {
            "type": "boolean"
          },
          "minimum_hours_for_booking": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "minimum_minutes_for_booking": {
            "type": "integer",
            "description": "`minimum_hours_for_booking` in whole minutes."
          },
          "maximum_hours_for_booking": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "maximum_minutes_for_booking": {
            "type": "integer",
            "description": "`maximum_hours_for_booking` in whole minutes."
          },
          "booking_increment_minutes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "all_day_bookings_enabled": {
            "type": "boolean"
          },
          "half_day_bookings_enabled": {
            "type": "boolean"
          },
          "shift_bookings_enabled": {
            "type": "boolean"
          },
          "cancellation_reason_enabled": {
            "type": "boolean"
          },
          "cancellation_reason_required": {
            "type": "boolean"
          },
          "am_start_time": {
            "type": "string",
            "description": "Format `HH:mm`."
          },
          "am_end_time": {
            "type": "string",
            "description": "Format `HH:mm`."
          },
          "pm_start_time": {
            "type": "string",
            "description": "Format `HH:mm`."
          },
          "pm_end_time": {
            "type": "string",
            "description": "Format `HH:mm`."
          },
          "min_booking_distance": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "min_booking_distance_cm": {
            "type": [
              "number",
              "null"
            ],
            "description": "`min_booking_distance` converted to centimetres."
          },
          "min_booking_units": {
            "type": "string",
            "description": "The unit for `min_booking_distance`: `cm`, `m`, `inch` or `foot`. Defaults to `m`.",
            "default": "m"
          },
          "min_booking_distance_enabled": {
            "type": "boolean"
          },
          "restrict_allocated_desks_to_users": {
            "type": "boolean"
          },
          "restrict_allocated_desks_to_teams": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "restrict_allocated_desks_to_guests": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "retrospective_booking_disabled": {
            "type": "boolean"
          },
          "retrospective_booking_type": {
            "type": "string",
            "enum": [
              "date",
              "time"
            ]
          },
          "restrict_future_bookings": {
            "type": "boolean"
          },
          "max_future_days_bookable": {
            "type": "integer",
            "maximum": 365
          },
          "max_future_days_bookable_exclude_weekends": {
            "type": "boolean"
          },
          "max_future_days_bookable_includes_today": {
            "type": "boolean"
          },
          "max_future_days_bookable_release_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "Format `HH:mm`."
          },
          "bookings_per_user_in_period_enabled": {
            "type": "boolean"
          },
          "bookings_per_user_in_period_type": {
            "type": "string",
            "description": "The period for `bookings_per_user_in_period_amount`, for example `week`."
          },
          "bookings_per_user_in_period_amount": {
            "type": "integer"
          },
          "exclude_released_from_quota": {
            "type": "boolean"
          },
          "exclude_next_day_after_time_enabled": {
            "type": "boolean"
          },
          "exclude_next_day_after_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "Format `HH:mm`."
          },
          "restrict_same_day_bookings": {
            "type": "boolean"
          },
          "multi_date_booking_enabled": {
            "type": "boolean"
          },
          "step_out_enabled": {
            "type": "boolean"
          },
          "step_out_time_out_enabled": {
            "type": "boolean"
          },
          "max_step_out_duration": {
            "type": "integer",
            "description": "In minutes."
          },
          "restrict_neighbourhoods_to_teams": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "restrict_parking_spaces_by_permits": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "booking_cut_off_enabled": {
            "type": "boolean"
          },
          "booking_cut_off_days_before": {
            "type": "integer"
          },
          "booking_cut_off_time": {
            "type": "string",
            "description": "Format `HH:mm`."
          },
          "car_parking_scope": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "current_office",
              "same_building",
              "organisation",
              "specific_office",
              null
            ]
          },
          "car_parking_scope_office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "minimum_booking_notice_enabled": {
            "type": "boolean"
          },
          "minimum_booking_notice_minutes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "restrict_booking_creation_times_enabled": {
            "type": "boolean"
          },
          "restrict_booking_creation_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "Format `HH:mm`."
          },
          "restrict_booking_creation_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Format `HH:mm`."
          },
          "exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeskLimitsException"
            }
          }
        }
      },
      "DeskLimitsException": {
        "title": "DeskLimitsException",
        "type": "object",
        "description": "An exception to one desk limits rule for a particular team or user.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "rule": {
            "type": "string",
            "description": "The rule the exception applies to."
          },
          "desk_limits_id": {
            "type": "string",
            "format": "uuid"
          },
          "parent_id": {
            "type": "string",
            "description": "The ID of the team or user the exception applies to."
          },
          "parent_type": {
            "type": "string"
          },
          "period_amount": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 1825
          },
          "period_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "day",
              "week",
              "month",
              null
            ]
          }
        }
      },
      "DeskRequiredParkingPermitType": {
        "title": "Desk Required Parking Permit Type",
        "type": "object",
        "description": "A parking permit type a user must hold to book this parking space.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DeskResource": {
        "title": "Desk Resource",
        "type": "object",
        "description": "A resource that can be attached to desks or parking spaces, for example monitors, mice, standing desks or electric vehicle chargers.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the resource."
          },
          "name": {
            "type": "string",
            "description": "The name of the resource."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "desk",
              "parking_space",
              null
            ],
            "description": "The kind of desk the resource can be attached to."
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the organisation to which this resource belongs."
          },
          "desks_using_count": {
            "type": "integer",
            "description": "The number of desks to which this resource is attached. Only returned when the count has been loaded."
          }
        }
      },
      "DeskSize": {
        "title": "Desk Size",
        "type": "integer",
        "minimum": 10,
        "maximum": 60,
        "description": "How large the desk icons are on the floor plan, from 10 to 60. Defaults to 33.",
        "x-internal": false
      },
      "DeskWithAvailability": {
        "title": "Desk With Availability",
        "allOf": [
          {
            "$ref": "#/components/schemas/UnminimisedDesk"
          },
          {
            "type": "object",
            "properties": {
              "availability": {
                "$ref": "#/components/schemas/DeskAvailability"
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CustomBookingField"
                }
              },
              "user": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The user the desk is assigned to, if any. Unlike `Desk`, this is the full user record.",
                "x-todo": "The raw User model is serialised here; its visible keys were not mapped."
              },
              "bookings": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Booking"
                },
                "description": "Bookings on the desk on `date`. Only returned when `expands` includes `bookings`."
              }
            }
          }
        ],
        "description": "A desk with its availability. `required_parking_permit_types` is only returned when loaded, and is empty unless the office enforces parking permits. Any other name in `expands` adds that relation when the desk has a matching `{name}_id`."
      },
      "Device": {
        "title": "Device",
        "type": "object",
        "description": "A device running the Clearooms Room Display App.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "device_identifier": {
            "type": "string"
          },
          "room_id": {
            "type": "string",
            "format": "uuid"
          },
          "settings": {
            "$ref": "#/components/schemas/DeviceSettings",
            "description": "The settings in force for this device: its own, otherwise its room's, otherwise the organisation's."
          },
          "manufacturer": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_seen": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "app_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DeviceSettings": {
        "title": "DeviceSettings",
        "type": "object",
        "properties": {
          "allow_end_meetings": {
            "type": "boolean"
          },
          "allow_walk_in": {
            "type": "boolean"
          },
          "background_image_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only valid on devices with at least version 3.0.0 of the Display App installed, and `interface_version` set to 2 or 3."
          },
          "brand_color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Resolved per field through device, room and organisation device settings, then the room's and organisation's own branding."
          },
          "confirm_meetings": {
            "type": "boolean"
          },
          "contactless_walk_in": {
            "type": "boolean"
          },
          "device_background_color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only valid on devices with at least version 3.0.0 of the Display App installed, and `interface_version` set to 2 or 3."
          },
          "device_background_image_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Only valid on devices with at least version 3.0.0 of the Display App installed, and `interface_version` set to 2 or 3."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Resolved per field through device, room and organisation device settings, then the room's and organisation's own branding."
          },
          "display_slogan": {
            "type": [
              "string",
              "null"
            ],
            "description": "Resolved per field through device, room and organisation device settings, then the room's and organisation's own branding."
          },
          "display_app_logo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Resolved per field through device, room and organisation device settings, then the room's and organisation's own branding."
          },
          "display_app_logo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the logo given by `display_app_logo_asset_id`."
          },
          "display_mode_only": {
            "type": "boolean"
          },
          "eco_mode": {
            "type": "boolean",
            "description": "When `eco_mode` is `true`, the device will dim the screen outside working hours and, if the device has LEDs, turn them off."
          },
          "font_color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only valid on devices with at least version 3.0.0 of the Display App installed, and `interface_version` set to 2 or 3."
          },
          "gilt_accent": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "hide_description": {
            "type": "boolean"
          },
          "hide_organiser": {
            "type": "boolean"
          },
          "hide_subject": {
            "type": "boolean"
          },
          "interface_version": {
            "type": "integer",
            "minimum": 1,
            "description": "Only valid on devices with at least version 3.0.0 of the Display App installed."
          },
          "logo_letter": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 3
          },
          "logo_style": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "monogram",
              "shield",
              "pillar",
              "eclipse",
              "upload",
              null
            ]
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "App\\Device",
              "App\\Organisation",
              "App\\Room"
            ]
          },
          "parent_id": {
            "type": "string",
            "format": "uuid"
          },
          "pin": {
            "type": [
              "string",
              "null"
            ],
            "example": "1234",
            "pattern": "^\\d{4}$"
          },
          "qr_room_photo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "qr_room_photo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "qr_accent_color": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "show_clearooms_branding": {
            "type": "boolean"
          },
          "qr_footer_text": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "qr_expiry_amount": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 999
          },
          "qr_expiry_unit": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "days",
              "weeks",
              "months",
              "years",
              null
            ]
          },
          "slack_integration_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "deprecated": true
          },
          "status_style": {
            "type": "string",
            "enum": [
              "bold",
              "max",
              "subtle"
            ]
          },
          "wordmark_company": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "wordmark_tagline": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          }
        }
      },
      "DisplayAppMeeting": {
        "title": "Display App Meeting",
        "description": "A version of the meeting resource for the Clearooms Display App. Privacy masking is applied as for the least privileged viewer.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMeeting"
          },
          {
            "type": "object",
            "properties": {
              "attendees": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    }
                  }
                },
                "description": "Only the attendees' names."
              },
              "confirmed": {
                "type": "boolean"
              },
              "brand_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_slogan": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "logo_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "room": {
                "type": "string",
                "format": "uuid",
                "deprecated": true,
                "description": "The ID of the meeting's first room."
              },
              "organiser_name": {
                "type": "string",
                "description": "The organiser's name, falling back to the organiser attendee's name and then the organiser's email."
              },
              "extending_meeting_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "rooms": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "capacity": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "office": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "building": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/Building"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Serialised from the model rather than an API resource."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "DisplayAppRoom": {
        "title": "Room (Display App)",
        "description": "A version of the room resource for the Clearooms Display App.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "logo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Display App logo asset. Taken from device settings (room, then organisation) if set, otherwise the room's logo, otherwise the organisation's."
          },
          "brand_color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App brand colour, with the same fallback as `logo_asset_id`."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App display name, with the same fallback as `logo_asset_id`."
          },
          "display_slogan": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App slogan, with the same fallback as `logo_asset_id`."
          },
          "rules": {
            "$ref": "#/components/schemas/RoomRules"
          },
          "restricted_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomRestrictedTime"
            }
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "order": {
            "type": "integer",
            "minimum": 0
          },
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "logo_asset": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Asset"
              },
              {
                "type": "null"
              }
            ]
          },
          "asset": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Asset"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EvacuationCounts": {
        "title": "Evacuation Counts",
        "type": "object",
        "description": "Roll-call totals over the visitors and staff on the roster, plus walk-ins.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Everyone on the roster except those marked `not_in`, plus walk-ins."
          },
          "out": {
            "type": "integer",
            "description": "Marked `safe` or `safe_phone`, plus walk-ins."
          },
          "missing": {
            "type": "integer",
            "description": "Marked `missing` (shown as \"Not seen\"), the default."
          },
          "being_helped": {
            "type": "integer"
          },
          "needs_assistance": {
            "type": "integer",
            "description": "Flagged as needing assistance, whatever their status."
          },
          "not_in": {
            "type": "integer",
            "description": "Marked as not in the building."
          },
          "on_site": {
            "type": "integer",
            "description": "Visitors and staff on the roster, without walk-ins."
          },
          "marked_safe": {
            "type": "integer",
            "description": "Visitors and staff marked `safe` or `safe_phone`, without walk-ins."
          },
          "unaccounted": {
            "type": "integer",
            "description": "`on_site` minus `marked_safe`."
          }
        }
      },
      "EvacuationRollCall": {
        "title": "Evacuation Roll Call",
        "type": "object",
        "description": "An evacuation with its full roster. The roster is a snapshot taken when the evacuation started, so people who sign out afterwards stay on it. Phone numbers and email addresses are not included.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "site_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "reception_group_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "assembly_point": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only set on older evacuations."
          },
          "triggered_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "triggered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "`null` while the evacuation is in progress."
          },
          "roster": {
            "type": "array",
            "description": "Visitors first, then staff, then walk-ins.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/EvacuationRosterVisitor"
                },
                {
                  "$ref": "#/components/schemas/EvacuationRosterStaff"
                },
                {
                  "$ref": "#/components/schemas/EvacuationRosterWalkIn"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "visitor": "#/components/schemas/EvacuationRosterVisitor",
                  "staff": "#/components/schemas/EvacuationRosterStaff",
                  "walk_in": "#/components/schemas/EvacuationRosterWalkIn"
                }
              }
            }
          },
          "counts": {
            "$ref": "#/components/schemas/EvacuationCounts"
          },
          "all_clear_reports": {
            "type": "array",
            "description": "All-clear reports from marshals, oldest first.",
            "items": {
              "type": "object",
              "properties": {
                "scope_label": {
                  "type": "string",
                  "description": "The area the report covers."
                },
                "by": {
                  "type": "string",
                  "description": "The name of the marshal or user who reported it."
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "EvacuationRosterStaff": {
        "title": "Evacuation Roster Staff",
        "type": "object",
        "description": "A staff member who was in a covered office when the evacuation started, including anyone who had signed out earlier that day.",
        "properties": {
          "type": {
            "type": "string",
            "const": "staff"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company": {
            "type": "null"
          },
          "organisation_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "office_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "building_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "left_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set if they had signed out of the office before the evacuation started. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "status": {
            "type": "string",
            "enum": [
              "safe",
              "safe_phone",
              "being_helped",
              "missing",
              "not_in"
            ],
            "description": "The marshal's mark. `safe` and `safe_phone` count as out. `missing` is the default and is shown as \"Not seen\"."
          },
          "needs_assistance": {
            "type": "boolean"
          },
          "marked_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "marked_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When they were last marked. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "marked_safe_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When they were marked safe. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "is_safe": {
            "type": "boolean"
          },
          "location_status": {
            "type": "string",
            "enum": [
              "on_site",
              "left_site",
              "unknown"
            ],
            "description": "Where their phone is relative to the site, for staff who share their location. `left_site` means the phone left the geofence. It does not mean they are safe."
          },
          "location_tracked": {
            "type": "boolean",
            "description": "Whether their phone has reported a location for this evacuation."
          },
          "location_updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When their phone last reported. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "self_reported_safe_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When they reported themselves safe in the app. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "has_phone": {
            "type": "boolean"
          },
          "has_email": {
            "type": "boolean"
          },
          "host_has_phone": {
            "type": "boolean",
            "const": false
          }
        }
      },
      "EvacuationRosterVisitor": {
        "title": "Evacuation Roster Visitor",
        "type": "object",
        "description": "A visitor who was signed in at a covered office when the evacuation started.",
        "properties": {
          "type": {
            "type": "string",
            "const": "visitor"
          },
          "visitor_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "organisation_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The organisation that owns the visitor's office. On a shared reception this can be a tenant."
          },
          "office_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "building_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "time_in": {
            "type": [
              "string",
              "null"
            ],
            "description": "When they signed in. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "status": {
            "type": "string",
            "enum": [
              "safe",
              "safe_phone",
              "being_helped",
              "missing",
              "not_in"
            ],
            "description": "The marshal's mark. `safe` and `safe_phone` count as out. `missing` is the default and is shown as \"Not seen\"."
          },
          "needs_assistance": {
            "type": "boolean"
          },
          "marked_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "The marshal or user who last marked them."
          },
          "marked_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When they were last marked. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "marked_safe_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When they were marked safe. Returned as stored, for example `2026-11-02 09:14:00`, not in ISO 8601 format."
          },
          "is_safe": {
            "type": "boolean",
            "description": "`true` if `status` is `safe` or `safe_phone`."
          },
          "has_phone": {
            "type": "boolean",
            "description": "Whether a phone number is on record. The number itself is not returned."
          },
          "has_email": {
            "type": "boolean",
            "description": "Whether an email address is on record. The address itself is not returned."
          },
          "host_has_phone": {
            "type": "boolean",
            "description": "Whether their host has a mobile number on record."
          },
          "host": {
            "type": [
              "string",
              "null"
            ],
            "description": "The host's name."
          }
        }
      },
      "EvacuationRosterWalkIn": {
        "title": "Evacuation Roster Walk-in",
        "type": "object",
        "description": "Someone logged at the assembly point who was not on the roster when the evacuation started. Walk-ins are always safe.",
        "properties": {
          "type": {
            "type": "string",
            "const": "walk_in"
          },
          "walk_in_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "organisation_name": {
            "type": "null"
          },
          "status": {
            "type": "string",
            "const": "safe"
          },
          "needs_assistance": {
            "type": "boolean",
            "const": false
          },
          "marked_by": {
            "type": "string",
            "description": "Who logged the walk-in."
          },
          "marked_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the walk-in was logged."
          },
          "is_safe": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "EvacuationSummary": {
        "title": "Evacuation Summary",
        "type": "object",
        "description": "An evacuation in progress, without its roster.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "office_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "site_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "site_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "reception_group_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "group_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the reception group, for a reception-wide evacuation."
          },
          "assembly_point": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only set on older evacuations: the assembly point is no longer chosen when an evacuation starts."
          },
          "triggered_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the user who started it."
          },
          "triggered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "counts": {
            "$ref": "#/components/schemas/EvacuationCounts"
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the event's office."
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "street_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": "string",
            "description": "Date of the event."
          },
          "start_time": {
            "type": "string",
            "description": "Format `H:i:s`."
          },
          "end_time": {
            "type": "string",
            "description": "Format `H:i:s`."
          },
          "capacity": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "closed"
            ]
          },
          "booked_count": {
            "type": "integer",
            "description": "Number of confirmed bookings."
          },
          "has_booked": {
            "type": "boolean",
            "description": "Whether the current user has booked this event."
          },
          "bookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventBooking"
            }
          }
        },
        "title": "Event",
        "description": "An office event that users can book onto."
      },
      "EventBooking": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "description": "Name of the user who booked."
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "status": {
            "type": "string",
            "enum": [
              "Booked",
              "Cancelled"
            ]
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "title": "Event Booking",
        "description": "A user's booking on an event."
      },
      "ExpectedVisitorMatch": {
        "title": "Expected visitor match",
        "x-tags": [
          "Visitors"
        ],
        "description": "A visitor record with how closely its name matched the search.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Visitor"
          },
          {
            "type": "object",
            "properties": {
              "match_score": {
                "type": "number",
                "minimum": 0.5,
                "maximum": 1,
                "description": "Name similarity, rounded to 3 decimal places."
              }
            },
            "required": [
              "match_score"
            ]
          }
        ]
      },
      "ExternalAttendeeRow": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Meeting ID and attendee ID joined with `#`."
          },
          "meeting_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "time": {
            "type": "string",
            "description": "Time range in the organisation's time format, or \"All day\"."
          },
          "all_day": {
            "type": "boolean"
          },
          "host_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "host": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "company_source": {
            "type": "string",
            "enum": [
              "provided",
              "derived",
              "unknown"
            ]
          },
          "subject": {
            "type": "string"
          },
          "room": {
            "type": [
              "string",
              "null"
            ]
          },
          "building": {
            "type": [
              "string",
              "null"
            ]
          },
          "response": {
            "type": "string",
            "enum": [
              "accepted",
              "tentative",
              "declined",
              "none"
            ]
          }
        },
        "title": "External Attendee Row"
      },
      "Geofence": {
        "title": "Geofence",
        "type": "object",
        "description": "A circular area around an office or building, used to check that a user is on site.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "parent_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the office or building the geofence belongs to."
          },
          "parent_type": {
            "type": "string",
            "enum": [
              "office",
              "building"
            ]
          },
          "latitude": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "longitude": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "radius_metres": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "HexColour": {
        "title": "HexColour",
        "type": "string",
        "pattern": "^#(?:[0-9a-fA-F]{6})$",
        "description": "A hexadecimal colour code in the format #RRGGBB.",
        "x-internal": false
      },
      "Invitation": {
        "title": "Invitation",
        "description": "An invitation for a person to join the organisation.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invited_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the user who sent the invitation."
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "organisation_name": {
            "type": "string"
          },
          "is_expired": {
            "type": "boolean"
          },
          "role_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "roles": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "IDs of the roles the user will be given."
          },
          "teams": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "IDs of the teams the user will join."
          },
          "office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "skip_sso": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "manager_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "LinkedBooking": {
        "title": "Linked Booking",
        "type": "object",
        "description": "A booking linked to another, such as the parking space booked alongside a desk.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "desk_id": {
            "type": "string",
            "format": "uuid"
          },
          "desk_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "desk_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "desk",
              "parking_space",
              null
            ]
          },
          "office_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "checkin_status": {
            "$ref": "#/components/schemas/BookingCheckinStatus"
          },
          "all_day": {
            "type": "boolean"
          },
          "date": {
            "type": "string",
            "description": "Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
          },
          "end_date": {
            "type": "string",
            "description": "Local date and time in the office's timezone, formatted `YYYY-MM-DD HH:MM:SS`."
          },
          "vehicles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Vehicle"
            },
            "description": "Only present if the linked booking has vehicles."
          },
          "parking_permits": {
            "type": "array",
            "description": "Only present if the linked booking has parking permits.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reference_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "type": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Location": {
        "title": "Location",
        "description": "A work location that users can be assigned to.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "street_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_via_scim": {
            "type": "boolean"
          },
          "users_count": {
            "type": "integer",
            "description": "Number of users at this location. Only returned when listing locations."
          }
        }
      },
      "Meeting": {
        "title": "Meeting",
        "description": "A meeting in Clearooms.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMeeting"
          },
          {
            "type": "object",
            "properties": {
              "description_html": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The HTML description. Empty if the description is masked for you."
              },
              "fields_masked": {
                "type": "boolean",
                "description": "Whether any field has been masked for you because of meeting privacy."
              },
              "title_masked": {
                "type": "boolean",
                "description": "Whether `subject` has been masked."
              },
              "description_masked": {
                "type": "boolean",
                "description": "Whether `description` and `description_html` have been masked."
              },
              "confirmed": {
                "type": "boolean"
              },
              "brand_color": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display App brand colour, falling back to the room's and then the organisation's."
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display App display name, falling back to the room's and then the organisation's."
              },
              "display_slogan": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display App slogan, falling back to the room's and then the organisation's."
              },
              "logo_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Display App logo asset, falling back to the room's and then the organisation's."
              },
              "room": {
                "type": "string",
                "format": "uuid",
                "deprecated": true,
                "description": "The ID of the meeting's first room. Use `room_id` instead."
              },
              "rooms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MeetingRoom"
                },
                "description": "The rooms where the meeting is held."
              },
              "room_id": {
                "type": "string",
                "format": "uuid",
                "description": "The ID of the meeting's first room."
              },
              "room_name": {
                "type": "string",
                "description": "The name of the meeting's first room."
              },
              "office": {
                "type": "object",
                "description": "The office of the meeting's first room.",
                "properties": {
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "timezone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "IANA timezone of the office."
                  }
                }
              },
              "created_externally": {
                "type": "boolean",
                "deprecated": true,
                "description": "Always `false`. Kept for backwards compatibility."
              },
              "extending_meeting_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "If this meeting extends an existing meeting, the ID of that meeting."
              },
              "organiser_user": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/MinimisedUser"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The Clearooms user who organised the meeting. `null` if there is no organiser or no matching user."
              },
              "master": {
                "type": "boolean",
                "description": "Whether this meeting has no series master, that is, it is a single meeting or itself a series master."
              },
              "organiser_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "attendees": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MeetingAttendee"
                },
                "description": "Empty if fields are masked for you and the organisation is set to hide attendees on private meetings."
              },
              "attendee_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "description": "The number of people attending, if given."
              },
              "online_meeting": {
                "type": "boolean"
              },
              "online_meeting_provider": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "user": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/MinimisedUser"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The user who created the meeting in Clearooms."
              },
              "service_requests": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ServiceRequest"
                }
              },
              "is_occurence": {
                "type": "boolean",
                "description": "Whether the meeting is an occurrence of a recurring series."
              },
              "recurrence_description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A human-readable description of the recurrence rule, or `null` if the meeting does not recur."
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The calendar event type, for example `singleInstance`, `occurrence`, `exception` or `seriesMaster`."
              },
              "sync_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "office_timezone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The timezone of the meeting's primary room's office."
              },
              "resource_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The calendar provider's URL for the event, for integrated rooms."
              },
              "cancelled": {
                "type": "boolean",
                "description": "Whether the meeting has been deleted."
              },
              "auto_cancel_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When an unconfirmed meeting will be cancelled automatically. Format `Y-m-d H:i`, in UTC."
              },
              "popups": {
                "type": "array",
                "description": "Pop-ups from installed plugins. Only filled in on the meetings returned when a meeting is created; otherwise empty.",
                "items": {
                  "type": "object",
                  "x-todo": "shape comes from the external ProvidesMeetingPopup plugin contract, which is not in this repository"
                }
              },
              "roll_call_completed": {
                "type": "boolean"
              },
              "roll_call_notes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 1000
              },
              "custom_fields": {
                "type": [
                  "object",
                  "array"
                ],
                "description": "The meeting's custom field values, keyed by custom field ID. An empty array (`[]`) when there are none.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The custom field ID."
                    },
                    "type": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "value": {
                      "description": "The value entered for this field."
                    }
                  }
                },
                "items": {}
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "approval_status": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ApprovalStatus"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The meeting's approval status, or `null` if it has none."
              },
              "locations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MeetingLocation"
                }
              },
              "setup_time": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "cleanup_time": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "setup_time_unit": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "minutes",
                  "hours",
                  null
                ]
              },
              "cleanup_time_unit": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "minutes",
                  "hours",
                  null
                ]
              },
              "openspaces_details": {
                "$ref": "#/components/schemas/OpenSpacesBookingDetails",
                "description": "Only present if `booked_via_openspaces` is `true`."
              }
            }
          }
        ]
      },
      "MeetingApprovalStatus": {
        "title": "Meeting Approval Status",
        "type": "object",
        "description": "A meeting awaiting or having received approval.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "subject": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "description_html": {
            "type": [
              "string",
              "null"
            ]
          },
          "private": {
            "type": "boolean"
          },
          "start_time": {
            "type": "string",
            "description": "Format `Y-m-d H:i`."
          },
          "start_time_tz": {
            "type": "string"
          },
          "end_time": {
            "type": "string",
            "description": "Format `Y-m-d H:i`."
          },
          "end_time_tz": {
            "type": "string"
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingRoom"
            }
          },
          "office_timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "organiser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The organiser, usually an email address."
          },
          "attendees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingAttendee"
            }
          },
          "recurrence_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "service_requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceRequest"
            }
          },
          "online_meeting": {
            "type": "boolean"
          },
          "online_meeting_provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "approval_status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "master_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "MeetingAttendee": {
        "title": "Meeting Attendee",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "type": {
            "type": "string",
            "description": "The attendee type, for example `ORGANISER`."
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "description": "The attendee's response state, for example `NONE`."
          },
          "user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MinimisedUser"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Clearooms user with this attendee's email, if there is one."
          },
          "required": {
            "type": "boolean"
          },
          "visitor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Visitor"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visitor record, if this attendee is a visitor."
          },
          "attendance_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the attendee intends to attend: `in_person`, `remote` or `unknown`."
          },
          "attendance_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "in_person",
              "remote",
              "did_not_attend",
              null
            ],
            "description": "How the attendee actually attended."
          },
          "on_time": {
            "type": "boolean"
          },
          "guest": {
            "type": "boolean"
          },
          "company": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company of the linked external contact, if any."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The phone number of the linked external contact, if any."
          },
          "external_contact_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The linked external contact, if any."
          },
          "clearooms_only": {
            "type": "boolean",
            "description": "Whether the attendee is recorded in Clearooms only and not sent a calendar invitation."
          }
        }
      },
      "MeetingLocation": {
        "title": "Meeting Location",
        "type": "object",
        "description": "A free-text location attached to a meeting.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "location": {
            "type": "string",
            "maxLength": 255
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "MeetingRoom": {
        "title": "Meeting Room",
        "description": "A version of the room resource used inside meeting resources.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "office": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "building": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Building"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The office's building, serialised from the model rather than an API resource. `null` if the office has no building."
              }
            }
          },
          "order": {
            "type": "integer"
          },
          "is_a_linked_room": {
            "type": "boolean",
            "description": "Whether this room is linked to at least one other room."
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The calendar resource identifier (for example, a room mailbox address) if the room is integrated with a calendar."
          }
        }
      },
      "MiniminsedDeskWithAvailability": {
        "title": "Minimised Desk With Availability",
        "description": "A minimised desk with its availability, returned when the `minimised` header is `true`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDesk"
          },
          {
            "type": "object",
            "properties": {
              "office": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "availability": {
                "$ref": "#/components/schemas/DeskAvailability"
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CustomBookingField"
                }
              }
            }
          }
        ]
      },
      "MinimisedBooking": {
        "title": "Minimised Booking",
        "description": "A minimised version of the Booking resource.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseBooking"
          },
          {
            "type": "object",
            "properties": {
              "desk": {
                "type": "object",
                "description": "The booked desk or parking space.",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "desk",
                      "parking_space",
                      null
                    ]
                  }
                }
              },
              "office": {
                "type": "object",
                "description": "The office the desk belongs to.",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "vehicles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Vehicle"
                },
                "description": "The vehicles attached to the booking."
              },
              "misuse_reporting": {
                "$ref": "#/components/schemas/BookingMisuseReporting",
                "description": "Only present for parking space bookings."
              }
            }
          }
        ]
      },
      "MinimisedCurrentUser": {
        "title": "Minimised Current User",
        "description": "A minimised version of the current user resource, returned when the `minimised` header is `true`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseUser"
          },
          {
            "type": "object",
            "properties": {
              "mobile_number": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40,
                "description": "The user's mobile number."
              },
              "office_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "custom_colours_enabled": {
                "type": "boolean"
              },
              "colours": {
                "$ref": "#/components/schemas/UserColours"
              },
              "locale": {
                "$ref": "#/components/schemas/UserLocale"
              },
              "teams": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "The IDs of the teams to which the user belongs."
              },
              "arrivals": {
                "$ref": "#/components/schemas/UserArrivalsCapabilities"
              }
            }
          }
        ]
      },
      "MinimisedMeeting": {
        "title": "Minimised Meeting",
        "description": "A minimised version of the meeting resource. Returned when the `minimised` header is `true`, or to the Clearooms Desk Booking App.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseMeeting"
          },
          {
            "type": "object",
            "properties": {
              "description_html": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The HTML description. Empty if the description is masked for you."
              },
              "fields_masked": {
                "type": "boolean",
                "description": "Whether any field has been masked for you because of meeting privacy."
              },
              "title_masked": {
                "type": "boolean",
                "description": "Whether `subject` has been masked."
              },
              "description_masked": {
                "type": "boolean",
                "description": "Whether `description` and `description_html` have been masked."
              },
              "room": {
                "type": "object",
                "description": "The meeting's primary room.",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "rooms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MeetingRoom"
                }
              },
              "office": {
                "type": "object",
                "description": "The office of the meeting's primary room.",
                "properties": {
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "timezone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "IANA timezone of the office."
                  }
                }
              },
              "attendees": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MeetingAttendee"
                },
                "description": "Empty if fields are masked for you and the organisation is set to hide attendees on private meetings."
              },
              "recurrence_description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A human-readable description of the recurrence rule, or `null` if the meeting does not recur."
              },
              "service_requests": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ServiceRequest"
                }
              },
              "online_meeting": {
                "type": "boolean"
              },
              "online_meeting_provider": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Will be `null` if `online_meeting` is `false`."
              },
              "custom_fields": {
                "type": [
                  "object",
                  "array"
                ],
                "description": "The meeting's custom field values, keyed by custom field ID. An empty array (`[]`) when there are none.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The custom field ID."
                    },
                    "type": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "value": {
                      "description": "The value entered for this field."
                    }
                  }
                },
                "items": {}
              }
            }
          }
        ]
      },
      "MinimisedOffice": {
        "$ref": "#/components/schemas/BaseOffice",
        "title": "Minimised Office",
        "description": "A minimised version of the office resource."
      },
      "MinimisedOrganisation": {
        "title": "Minimised Organisation",
        "description": "A minimised version of the organisation resource. Check-in fields follow the `checkin_type` query parameter (desks by default).",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseOrganisation"
          },
          {
            "type": "object",
            "properties": {
              "is_suspended": {
                "type": "boolean",
                "description": "Whether any of the organisation's cost centres are suspended."
              }
            }
          }
        ]
      },
      "MinimisedRoomWithAvailability": {
        "title": "Minimised Room With Availability",
        "description": "A minimised version of the Room With Availability resource. Returned by `GET /rooms` when `date` is given and the `minimised` header is `true`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "office": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "order": {
            "type": "integer"
          },
          "position_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Horizontal position on the office plan, as a percentage."
          },
          "position_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Vertical position on the office plan, as a percentage."
          },
          "absolute_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Horizontal position on the office plan, in plan coordinates."
          },
          "absolute_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Vertical position on the office plan, in plan coordinates."
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The calendar resource identifier (for example, a room mailbox address) if the room is integrated with a calendar."
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomResource"
            }
          },
          "integration_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The slug of the calendar provider, for example `office365` or `google`, if the room is integrated with a calendar."
          },
          "availability": {
            "$ref": "#/components/schemas/RoomAvailability"
          },
          "rules": {
            "$ref": "#/components/schemas/RoomRules"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60000
          },
          "restricted_users": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "restricted_teams": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "MinimisedUser": {
        "title": "Minimised User",
        "description": "A minimised version of the User resource.",
        "x-internal": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseUser"
          },
          {
            "type": "object",
            "properties": {
              "manager": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "first_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "teams": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "The IDs of the teams to which the user belongs."
              },
              "external_avatar": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri"
                  }
                },
                "description": "Avatar from the user's linked external account, if any."
              },
              "is_external": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "NullableAsset": {
        "x-internal": true,
        "title": "Asset (Nullable)",
        "description": "A nullable version of Asset",
        "oneOf": [
          {
            "$ref": "#/components/schemas/Asset"
          },
          {
            "type": "null"
          }
        ]
      },
      "Office": {
        "title": "Office",
        "description": "An office belonging to an organisation.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseOffice"
          },
          {
            "type": "object",
            "properties": {
              "building_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "building_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "site_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The ArrivalsHQ site the office is on, or `null`."
              },
              "site_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The name of the site, or `null`."
              },
              "hot_desks_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "desk_count": {
                "type": "integer",
                "description": "The number of desks, not counting parking spaces."
              },
              "car_park_count": {
                "type": "integer",
                "description": "The number of parking spaces."
              },
              "room_count": {
                "type": "integer"
              },
              "booking_color": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A hex colour code."
              },
              "scale_x": {
                "type": [
                  "string",
                  "integer"
                ],
                "description": "A decimal string, or `10` when not set."
              },
              "scale_y": {
                "type": [
                  "string",
                  "integer"
                ],
                "description": "A decimal string, or `10` when not set."
              },
              "unit_system": {
                "type": "string",
                "description": "`metric` or `imperial`. Defaults to `metric`."
              },
              "enabled": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "restricted": {
                "type": "boolean"
              },
              "ip_addresses": {
                "type": "array",
                "description": "IPv4 or IPv6 addresses or CIDR ranges.",
                "items": {
                  "type": "string"
                }
              },
              "street_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_locality": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_country": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order": {
                "type": "integer"
              },
              "cost_centre_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The ID of the cost centre to which the office belongs."
              },
              "is_demo": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "desk_privacy_exempt": {
                "type": "boolean"
              },
              "cost_centre_suspended": {
                "type": "boolean"
              },
              "plan_max_desks": {
                "type": "integer",
                "description": "The number of desks the plan allows. Only returned when the organisation is on new billing."
              },
              "plan_max_rooms": {
                "type": "integer",
                "description": "The number of meeting rooms the plan allows. Only returned when the organisation is on new billing."
              },
              "current_room_usage": {
                "type": "integer",
                "description": "The number of meeting rooms in the office's cost centre. Only returned when the organisation is on new billing."
              },
              "plan_max_parking_spaces": {
                "type": "integer",
                "description": "The number of parking spaces the plan allows. Only returned when the organisation is on new billing."
              },
              "current_parking_usage": {
                "type": "integer",
                "description": "The number of parking spaces in the office's cost centre. Only returned when the organisation is on new billing."
              }
            }
          }
        ]
      },
      "OfficeDeskLimits": {
        "title": "Office Desk Limits",
        "type": "object",
        "description": "The booking limits in force for the office, one set per desk type. Each set is the organisation-wide one when global limits are enabled for that type, otherwise the office's own; defaults are returned when none have been saved.",
        "properties": {
          "desk": {
            "$ref": "#/components/schemas/DeskLimits"
          },
          "parking_space": {
            "$ref": "#/components/schemas/DeskLimits"
          }
        }
      },
      "OfficePlanIconSizes": {
        "title": "Office Plan Icon Sizes",
        "type": "object",
        "description": "The size of each kind of icon on the office plan. Each value is clamped to between 10 and 60, and falls back to `hot_desks_desks_size` when not set.",
        "properties": {
          "desks": {
            "$ref": "#/components/schemas/DeskSize"
          },
          "rooms": {
            "$ref": "#/components/schemas/DeskSize"
          },
          "parking_spaces": {
            "$ref": "#/components/schemas/DeskSize"
          }
        }
      },
      "OfficePlanImage": {
        "title": "Office Plan Image",
        "description": "The image used as the office's floor plan, or `null` if none is set.",
        "x-internal": false,
        "oneOf": [
          {
            "$ref": "#/components/schemas/Asset"
          },
          {
            "type": "null"
          }
        ]
      },
      "OpenSpacesBookingDetails": {
        "title": "OpenSpaces Booking Details",
        "type": "object",
        "description": "Details of the OpenSpaces booking behind a meeting or booking.",
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "The currency code of the OpenSpaces widget."
          },
          "total_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The total price of the OpenSpaces booking."
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "organisation": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the booking session was paid for, if it was."
          },
          "recurring_bookings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start_time": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "ISO 8601."
                },
                "end_time": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "ISO 8601."
                }
              }
            },
            "description": "The other bookings in the same recurring group."
          }
        }
      },
      "Organisation": {
        "title": "Organisation",
        "description": "An organisation whose users have access to Clearooms. Check-in fields follow the `checkin_type` query parameter (desks by default).",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseOrganisation"
          },
          {
            "type": "object",
            "properties": {
              "number_of_employees": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "industry": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "logo_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "display_app_logo_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "dark_logo_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The logo used on the kiosk in dark mode."
              },
              "kiosk_welcome_line": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255,
                "description": "The kiosk welcome screen's headline."
              },
              "kiosk_welcome_subline": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              },
              "kiosk_default_locale": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 10,
                "description": "The kiosk's default language."
              },
              "kiosk_theme_mode": {
                "type": "string",
                "enum": [
                  "light",
                  "dark",
                  "scheduled"
                ],
                "default": "dark",
                "description": "`scheduled` switches to dark mode between `kiosk_dark_from` and `kiosk_dark_until`."
              },
              "kiosk_dark_from": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "description": "`HH:MM`, 24-hour."
              },
              "kiosk_dark_until": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "description": "`HH:MM`, 24-hour."
              },
              "dark_brand_color": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$",
                "description": "The accent colour in dark mode."
              },
              "dark_background_color": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$",
                "description": "The kiosk background colour in dark mode."
              },
              "background_color": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$",
                "description": "The kiosk background colour in light mode."
              },
              "kiosk_background_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "An uploaded background image for the kiosk welcome screen."
              },
              "kiosk_welcome": {
                "type": "object",
                "description": "Kiosk welcome screen options. Stored values are merged over the defaults, so every key is always present.",
                "properties": {
                  "show_qr": {
                    "type": "boolean",
                    "default": true
                  },
                  "show_courier": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the kiosk offers deliveries. The plan must also include `arrivals-deliveries`."
                  },
                  "show_language": {
                    "type": "boolean",
                    "default": true
                  },
                  "show_sign_out": {
                    "type": "boolean",
                    "default": true,
                    "description": "The visitor sign-out option."
                  },
                  "show_staff_sign_out": {
                    "type": "boolean",
                    "default": true
                  },
                  "show_office_date": {
                    "type": "boolean",
                    "default": true
                  },
                  "show_time": {
                    "type": "boolean",
                    "default": true
                  },
                  "background_image_url": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "description": "Legacy background image URL. `kiosk_background_asset_id` is used for new uploads."
                  },
                  "background_dim": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 90,
                    "default": 40,
                    "description": "How much to darken a background image, as a percentage."
                  },
                  "status_light": {
                    "type": "string",
                    "enum": [
                      "off",
                      "available",
                      "brand",
                      "custom"
                    ],
                    "default": "off",
                    "description": "The colour of the tablet's status light, on panels that have one."
                  },
                  "status_light_color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$",
                    "description": "Used when `status_light` is `custom`."
                  }
                }
              },
              "badge_fields": {
                "type": "object",
                "description": "What visitor badges show. Defaults to `photo`, `visitor_type_host` and `signin_qr` on and `wifi_password` off. If a value has been saved, it is returned as stored and not merged with these defaults.",
                "properties": {
                  "photo": {
                    "type": "boolean"
                  },
                  "visitor_type_host": {
                    "type": "boolean"
                  },
                  "signin_qr": {
                    "type": "boolean"
                  },
                  "wifi_password": {
                    "type": "boolean"
                  }
                }
              },
              "send_booking_confirmation_emails": {
                "type": "boolean"
              },
              "onboarding_complete": {
                "type": "boolean"
              },
              "resold": {
                "type": "boolean",
                "description": "Whether the organisation was sold through a reseller."
              },
              "number_of_devices": {
                "type": "integer"
              },
              "global_desk_limits_enabled": {
                "type": "boolean"
              },
              "global_parking_limits_enabled": {
                "type": "boolean"
              },
              "global_shifts_enabled": {
                "type": "boolean"
              },
              "desk_privacy": {
                "type": "boolean"
              },
              "office_desk_privacy_exemption_id": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "IDs of offices exempt from desk privacy."
              },
              "desk_list_mode_enabled": {
                "type": "boolean"
              },
              "token_duration_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "creator_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "description": "Formatted as `Y-m-d H:i:s`."
              },
              "is_verified": {
                "type": "boolean",
                "description": "Whether the organisation's creator has verified their email address."
              },
              "checkin_exceptions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CheckInException"
                },
                "description": "Offices that are exempt from check-in."
              },
              "team_checkin_exceptions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CheckInException"
                },
                "description": "Teams that are exempt from check-in."
              },
              "geofencing_checkin_exceptions": {
                "type": "array",
                "items": {}
              },
              "send_checkin_reminder_emails": {
                "type": "boolean"
              },
              "checkout_cancellation_warning_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "booking_reminder_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "booking_reminder_type": {
                "type": [
                  "string",
                  "null"
                ],
                "examples": [
                  "before",
                  "after"
                ]
              },
              "auto_checkout_after_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "custom_booking_fields_email_enabled": {
                "type": "boolean"
              },
              "custom_booking_fields_email_address": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email"
              },
              "ip_checkin_required": {
                "type": "boolean"
              },
              "ip_checkin_use_client_ips": {
                "type": "boolean"
              },
              "ip_checkin_custom_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_qr_kiosks": {
                "type": "boolean"
              },
              "features": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "is_trial": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "experimental_features": {
                "type": [
                  "array",
                  "string"
                ],
                "description": "An empty array, or the organisation's experimental features string if it has one."
              },
              "custom_email_settings_enabled": {
                "type": "boolean"
              },
              "default_role": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The role given to new users by default."
              },
              "office_plan_size": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_reference_label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sso_provider": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cost_centres": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "suspended": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "csm": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CustomerSuccessManager"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "enforces_mfa": {
                "type": "boolean",
                "description": "Whether or not the organisation's users must have multi-factor authentication enabled."
              },
              "mfa_enforcement_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The scheduled date for enforcement of multi-factor authentication. Formatted as `Y-m-d H:i:s`."
              },
              "avatars_enabled": {
                "type": "boolean",
                "description": "Whether an organisation's users can have avatars.\n\n**N.B.** For admins this property is ignored and always treated as `true`."
              },
              "users_can_upload_avatars": {
                "type": "boolean",
                "description": "Whether an organisation's users can upload their own avatars.\n\n**N.B.** For admins this property is ignored and always treated as `true`."
              },
              "book_page_enabled": {
                "type": "boolean"
              },
              "global_search_enabled": {
                "type": "boolean"
              },
              "show_development_features": {
                "type": "boolean"
              },
              "allows_legacy_office_renderer": {
                "type": "boolean"
              },
              "workspace_terminology_enabled": {
                "type": "boolean"
              },
              "openspaces_enabled": {
                "type": "boolean"
              },
              "parking_spaces_enabled": {
                "type": "boolean"
              },
              "parking_spaces_active": {
                "type": "boolean"
              },
              "parking_permits_enabled": {
                "type": "boolean"
              },
              "is_trialing": {
                "type": "boolean"
              },
              "arrivals_tier": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "loyalty",
                  "essentials",
                  "plus",
                  "professional",
                  null
                ],
                "description": "The organisation's ArrivalsHQ plan tier, or `null` if it has no ArrivalsHQ plan."
              },
              "arrivals_tier_key": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "loyalty",
                  "essentials",
                  "plus",
                  "professional",
                  null
                ],
                "description": "The same value as `arrivals_tier`."
              },
              "arrivals_access": {
                "type": "boolean",
                "description": "Whether the organisation has ArrivalsHQ at all: on a plan of any tier, on a trial, or not billed."
              },
              "nfc_cards_enabled": {
                "type": "boolean",
                "description": "Whether staff NFC cards are available. Set by Clearooms."
              },
              "face_signin_available": {
                "type": "boolean",
                "description": "Whether staff face sign-in is available on this Clearooms environment."
              },
              "arrivals_settings": {
                "$ref": "#/components/schemas/OrganisationArrivalsSettings"
              },
              "arrivals_reception": {
                "type": "object",
                "description": "The organisation's part in shared receptions.",
                "properties": {
                  "is_host": {
                    "type": "boolean",
                    "description": "Whether the organisation runs at least one shared reception."
                  },
                  "is_tenant": {
                    "type": "boolean",
                    "description": "Whether the organisation is an active tenant at another organisation's shared reception."
                  }
                }
              },
              "active_features": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                }
              },
              "skip_feature_checks": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "OrganisationArrivalsSettings": {
        "title": "Organisation ArrivalsHQ settings",
        "type": "object",
        "description": "The organisation's ArrivalsHQ settings. Stored values are merged over the defaults, so every key is always present. Retention values are capped to the plan's default unless the plan includes `arrivals-configurable-retention`.",
        "properties": {
          "pilot": {
            "type": "object",
            "properties": {
              "site": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 120
              },
              "tablets": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 120
              },
              "workflows": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 160
              },
              "feedback_weeks": {
                "type": "integer",
                "enum": [
                  4,
                  6,
                  8
                ],
                "default": 6
              },
              "multi_org_enabled": {
                "type": "boolean",
                "default": false
              },
              "weekly_feedback": {
                "type": "boolean",
                "default": false
              }
            }
          },
          "emergency": {
            "type": "object",
            "properties": {
              "alert_title": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 80,
                "description": "The alert title shown on displays during an evacuation. `null` uses the built-in wording."
              },
              "alert_message": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500,
                "description": "The alert message. `{assembly_point}` is replaced with the primary assembly point's name."
              },
              "alert_translations": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "description": "Set by the server: the alert translated, keyed by locale."
              },
              "show_company_host": {
                "type": "boolean",
                "default": true
              },
              "auto_export_csv": {
                "type": "boolean",
                "default": true
              },
              "notify_marshals_email": {
                "type": "boolean",
                "default": true
              },
              "slack_webhook_enabled": {
                "type": "boolean",
                "default": false
              },
              "slack_webhook_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "slack_notify_start": {
                "type": "boolean",
                "default": true
              },
              "slack_notify_end": {
                "type": "boolean",
                "default": true
              },
              "teams_webhook_enabled": {
                "type": "boolean",
                "default": false
              },
              "teams_webhook_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "teams_notify_start": {
                "type": "boolean",
                "default": true
              },
              "teams_notify_end": {
                "type": "boolean",
                "default": true
              },
              "location_enabled": {
                "type": "boolean",
                "default": false,
                "description": "Show staff members' geofence location on the roll call. Each member must also opt in."
              }
            }
          },
          "compliance": {
            "type": "object",
            "properties": {
              "dpia_reviewer": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 120
              },
              "next_review_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "distribute_pack": {
                "type": "boolean",
                "default": false
              },
              "track_actions": {
                "type": "boolean",
                "default": false
              }
            },
            "description": "Unused. Nothing reads these values."
          },
          "retention": {
            "type": "object",
            "properties": {
              "visitor_records_months": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Defaults to the plan's retention period: 12 months on Loyalty and Essentials, 24 on Plus, 36 on Professional."
              },
              "acknowledgements_months": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "One of 12, 24, 36 or 84. Defaults to the plan's retention period."
              },
              "id_scans_months": {
                "type": "integer",
                "default": 12
              },
              "deliveries_months": {
                "type": [
                  "integer",
                  "null"
                ],
                "default": 12,
                "description": "`null` keeps delivery records forever."
              },
              "staff_attendance_months": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Organisation-wide fallback for staff sign-in movements. `null` keeps them forever."
              }
            }
          },
          "deliveries": {
            "type": "object",
            "properties": {
              "reminder_hours": {
                "type": "integer",
                "default": 0,
                "description": "Remind recipients of uncollected parcels after this many hours. `0` turns reminders off."
              }
            }
          },
          "notifications": {
            "type": "object",
            "properties": {
              "host_email_enabled": {
                "type": "boolean",
                "default": true
              },
              "notify_on_checkout": {
                "type": "boolean",
                "default": false
              },
              "late_visitor_alert_minutes": {
                "type": "integer",
                "default": 0
              },
              "daily_digest_time": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "`HH:MM`."
              },
              "slack_webhook_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "slack_webhook_enabled": {
                "type": "boolean",
                "default": false
              },
              "teams_webhook_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "teams_webhook_enabled": {
                "type": "boolean",
                "default": false
              }
            }
          },
          "presence": {
            "type": "object",
            "properties": {
              "auto_checkout_enabled": {
                "type": "boolean",
                "default": true
              },
              "auto_checkout_hours": {
                "type": "integer",
                "default": 24
              },
              "sleep_enabled": {
                "type": "boolean",
                "default": false
              },
              "sleep_after_minutes": {
                "type": "integer",
                "default": 5
              },
              "sleep_mode": {
                "type": "string",
                "enum": [
                  "dark",
                  "image"
                ],
                "default": "dark"
              },
              "sleep_image_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "sleep_image_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "wake_on_presence": {
                "type": "boolean",
                "default": false
              },
              "night_sleep_enabled": {
                "type": "boolean",
                "default": false
              },
              "night_sleep_from": {
                "type": "string",
                "default": "19:00",
                "description": "`HH:MM`, in the tablet's local time."
              },
              "night_sleep_until": {
                "type": "string",
                "default": "07:00",
                "description": "`HH:MM`, in the tablet's local time."
              },
              "night_screen_off": {
                "type": "boolean",
                "default": true
              }
            }
          },
          "entitlements": {
            "type": "object",
            "properties": {
              "font_customisation": {
                "type": "boolean",
                "default": true
              }
            },
            "description": "Contract switches set by Clearooms."
          }
        }
      },
      "OutOfHoursException": {
        "title": "Out Of Hours Exception",
        "type": "object",
        "description": "A per-room override of the out-of-hours email settings.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "room_id": {
            "type": "string",
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether out-of-hours emails are enabled for this room."
          },
          "recipients": {
            "type": [
              "string",
              "null"
            ],
            "description": "Comma-separated email addresses."
          }
        }
      },
      "ParkingPermit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string"
          },
          "reference_number": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "expires_on": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expired"
            ]
          },
          "is_expired": {
            "type": "boolean"
          },
          "is_expiring_soon": {
            "type": "boolean",
            "description": "True when the permit is active and expires within 30 days."
          },
          "expired_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "approval_status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected"
            ]
          },
          "is_approved": {
            "type": "boolean"
          },
          "is_pending_approval": {
            "type": "boolean"
          },
          "is_rejected": {
            "type": "boolean"
          },
          "approval_decided_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "approval_decided_by_user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rejection_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ParkingPermitType"
          },
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string",
                "format": "email"
              }
            },
            "description": "Only present when the user relation is loaded."
          },
          "document": {
            "type": "object",
            "properties": {
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mime": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "size": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "thumbnail_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Signed URL for image documents; null for PDFs."
              }
            }
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "title": "Parking Permit"
      },
      "ParkingPermitType": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "sort_order": {
            "type": "integer"
          }
        },
        "title": "Parking Permit Type"
      },
      "PersonalAccessToken": {
        "title": "PersonalAccessToken",
        "description": "A personal access token belonging to the current user.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 100
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "client_id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revoked": {
            "type": "boolean"
          },
          "needs_force_refreshing": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "PoolCarAllocation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "allocatable_type": {
            "type": "string",
            "enum": [
              "user",
              "team",
              "role",
              "unknown"
            ],
            "description": "The kind of entity the pool car is allocated to."
          },
          "allocatable_id": {
            "type": "string",
            "description": "The ID of the user, team or role."
          },
          "allocatable": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "Only present when the allocatable relation is loaded."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "Pool Car Allocation",
        "description": "Grants a user, team or role access to a pool car."
      },
      "RawActivityLogModel": {
        "title": "Activity log entry (raw model)",
        "type": "object",
        "additionalProperties": true,
        "description": "An activity log model serialised directly, without `ActivityResource`. Archived entries may also be included.",
        "properties": {
          "id": {
            "type": "integer"
          },
          "log_name": {
            "type": "string",
            "description": "The organisation ID."
          },
          "description": {
            "type": "string"
          },
          "subject_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "event": {
            "type": [
              "string",
              "null"
            ]
          },
          "causer_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "causer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "properties": {
            "type": [
              "object",
              "array"
            ],
            "description": "Raw change data, usually with `old` and `attributes` keys."
          },
          "batch_uuid": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "RawAttributeModel": {
        "title": "Attribute (raw model)",
        "type": "object",
        "description": "A user `Attribute` model serialised directly, without an API Resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pivot": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "attribute_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "RawTeamModel": {
        "title": "Team (raw model)",
        "type": "object",
        "additionalProperties": true,
        "description": "A `Team` model serialised directly, without an API Resource. Only user-facing teams are returned here, so `open_spaces_pricing_package` is always `null`.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "is_system": {
            "type": "boolean"
          },
          "is_hidden": {
            "type": "boolean"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "manager_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "pivot": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "team_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "open_spaces_pricing_package": {
            "type": "null"
          }
        }
      },
      "RawUserModel": {
        "title": "User (raw model)",
        "type": "object",
        "additionalProperties": true,
        "description": "A `User` model serialised directly, without an API Resource. Every column except `password` and `remember_token` is included, plus any relations the endpoint has loaded. Only common columns are listed here.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "formatted_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "manager_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "team_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "role_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "avatar_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_admin": {
            "type": "boolean"
          },
          "is_manager": {
            "type": "boolean"
          },
          "is_archived": {
            "type": "boolean"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RawTeamModel"
            },
            "description": "Only present where the endpoint loads it."
          }
        }
      },
      "RawUserStatusModel": {
        "title": "User Status (raw model)",
        "type": "object",
        "description": "A `UserStatus` model serialised directly, without an API Resource. This is not the same shape as `UserStatus`.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "free_desk_allocations": {
            "type": "boolean"
          },
          "block_availability": {
            "type": "boolean"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "custom_status_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "location_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Class name of the location, such as `App\\Office`."
          },
          "start_date": {
            "type": "string",
            "description": "Date and time, such as `2026-03-02 00:00:00`."
          },
          "end_date": {
            "type": "string",
            "description": "Date and time, such as `2026-03-06 23:59:59`."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ReportDeskFields": {
        "title": "Desk Report Fields",
        "type": "object",
        "description": "For `desk` and `parking_space` reports. Each key is a column; `true` includes it in the report. `office_name`, `desk_name`, `booking_booked_by` and `booking_date` have no database default, so send them all.",
        "properties": {
          "building_name": {
            "type": "boolean"
          },
          "office_name": {
            "type": "boolean"
          },
          "desk_name": {
            "type": "boolean"
          },
          "booking_booked_by": {
            "type": "boolean"
          },
          "booking_booked_for": {
            "type": "boolean"
          },
          "booking_date": {
            "type": "boolean"
          },
          "start_time": {
            "type": "boolean"
          },
          "end_time": {
            "type": "boolean"
          },
          "checkin_status": {
            "type": "boolean"
          },
          "booked_for_teams": {
            "type": "boolean"
          },
          "booked_for_permits": {
            "type": "boolean"
          }
        }
      },
      "ReportExternalAttendeeFields": {
        "title": "External Attendee Report Fields",
        "type": "object",
        "required": [
          "period",
          "recipients"
        ],
        "description": "For `external_attendees` reports.",
        "properties": {
          "period": {
            "type": "string",
            "enum": [
              "today",
              "next_7_days",
              "this_week",
              "last_30_days",
              "this_month",
              "last_month",
              "since_last_run"
            ]
          },
          "format": {
            "type": "string",
            "enum": [
              "csv",
              "xlsx"
            ],
            "default": "csv"
          },
          "recipients": {
            "type": "array",
            "minItems": 1,
            "maxItems": 20,
            "items": {
              "type": "string",
              "format": "email",
              "maxLength": 255
            },
            "description": "Duplicates are removed. The first recipient is also stored as the report `email`."
          },
          "filters": {
            "type": "object",
            "properties": {
              "buildings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "offices": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "rooms": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "hosts": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "User IDs."
              },
              "include_declined": {
                "type": "boolean"
              },
              "group_by": {
                "type": "string",
                "enum": [
                  "none",
                  "date",
                  "host",
                  "company"
                ]
              },
              "when": {
                "type": "string",
                "enum": [
                  "all",
                  "upcoming",
                  "past"
                ]
              },
              "search": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "meeting": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort": {
                "type": "string",
                "enum": [
                  "name",
                  "date",
                  "time",
                  "host",
                  "company",
                  "email",
                  "subject",
                  "room",
                  "building",
                  "company_source",
                  "response"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ]
              }
            }
          }
        }
      },
      "ReportResource": {
        "title": "Report",
        "type": "object",
        "description": "A saved report.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/ReportType"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "fields": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "For `room`, `desk` and `parking_space` reports: the selected column names, followed by meeting custom field labels for room reports with `custom_fields` on."
              },
              {
                "type": "object",
                "description": "For `external_attendees` reports.",
                "properties": {
                  "period": {
                    "type": "string"
                  },
                  "format": {
                    "type": "string"
                  },
                  "filters": {
                    "type": "object"
                  },
                  "recipients": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    }
                  }
                }
              }
            ]
          },
          "desk_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "desk",
              "parking_space",
              null
            ],
            "description": "Set for desk and parking space reports only."
          },
          "created_at": {
            "type": "string",
            "format": "date"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "hosts": {
            "type": "array",
            "description": "Only present on `external_attendees` reports. The users in the `hosts` filter.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email"
                }
              }
            }
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportScheduleSettings"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only present on `external_attendees` reports."
          }
        }
      },
      "ReportRoomFields": {
        "title": "Room Report Fields",
        "type": "object",
        "description": "For `room` reports. Each key is a column; `true` includes it in the report. `office_name`, `room_name`, `meeting_subject`, `meeting_start_time`, `meeting_end_time`, `meeting_private` and `custom_fields` have no database default, so send them all. `custom_fields` adds every meeting custom field; `include_deleted_custom_fields` also adds deleted ones.",
        "properties": {
          "building_name": {
            "type": "boolean"
          },
          "office_name": {
            "type": "boolean"
          },
          "room_name": {
            "type": "boolean"
          },
          "meeting_subject": {
            "type": "boolean"
          },
          "meeting_start_time": {
            "type": "boolean"
          },
          "meeting_end_time": {
            "type": "boolean"
          },
          "meeting_private": {
            "type": "boolean"
          },
          "organiser": {
            "type": "boolean"
          },
          "organiser_teams": {
            "type": "boolean"
          },
          "teams_meeting": {
            "type": "boolean"
          },
          "attendee_count": {
            "type": "boolean"
          },
          "custom_fields": {
            "type": "boolean"
          },
          "include_deleted_custom_fields": {
            "type": "boolean"
          }
        }
      },
      "ReportSchedule": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "cron_expression": {
            "type": [
              "string",
              "null"
            ]
          },
          "report_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "title": "Report Schedule",
        "description": "Fields are null if the report has no schedule."
      },
      "ReportScheduleInput": {
        "title": "Report Schedule Input",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ReportScheduleType"
          },
          "day_of_week": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 7,
            "description": "Used by `day_of_week`. Defaults to `1` (Monday)."
          },
          "day_of_month": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 28,
            "description": "Used by `day_of_month`. Defaults to `1`."
          },
          "time_to_execute": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time in `H:i` format, such as `08:30`. Defaults to `00:00`. Required unless `type` is `no_schedule` when updating."
          }
        }
      },
      "ReportScheduleSettings": {
        "title": "Report Schedule Settings",
        "type": "object",
        "description": "A report schedule, parsed from its cron expression. `first_of_month` and `27_of_month` schedules come back as `day_of_month`.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "daily",
              "weekdays",
              "day_of_week",
              "day_of_month"
            ]
          },
          "day_of_week": {
            "type": [
              "integer",
              "null"
            ],
            "description": "`0` (Sunday) to `6`. Set only for `day_of_week`."
          },
          "day_of_month": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Set only for `day_of_month`."
          },
          "time_to_execute": {
            "type": "string",
            "description": "Time in `HH:MM` format."
          }
        }
      },
      "ReportScheduleType": {
        "title": "ReportScheduleType",
        "description": "How often a scheduled report is sent. `no_schedule` creates no schedule, or removes one when updating.",
        "type": "string",
        "enum": [
          "day_of_week",
          "first_of_month",
          "27_of_month",
          "day_of_month",
          "daily",
          "weekdays",
          "no_schedule"
        ]
      },
      "ReportType": {
        "title": "ReportType",
        "description": "The type attached to a report.",
        "type": "string",
        "enum": [
          "room",
          "desk",
          "parking_space",
          "external_attendees"
        ]
      },
      "Role": {
        "type": "object",
        "title": "Role",
        "description": "A role that can be assigned to users.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "organisation_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "`null` for Clearooms' ready-made default roles."
          },
          "user_count": {
            "type": "integer",
            "description": "Number of users with this role. Always `0` for default roles."
          }
        }
      },
      "Room": {
        "title": "Room",
        "description": "A meeting room that belongs to an office.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The calendar resource identifier (for example, a room mailbox address) if the room is integrated with a calendar."
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "office": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "order": {
            "type": "integer"
          },
          "custom_fields": {
            "type": [
              "object",
              "array"
            ],
            "description": "The room's custom field values, keyed by custom field name. An empty array (`[]`) when there are none.",
            "additionalProperties": {
              "description": "The value of the custom field."
            },
            "items": {}
          },
          "logo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Display App logo asset. Taken from device settings (room, then organisation) if set, otherwise the room's logo, otherwise the organisation's."
          },
          "brand_color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App brand colour, with the same fallback as `logo_asset_id`."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App display name, with the same fallback as `logo_asset_id`."
          },
          "display_slogan": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App slogan, with the same fallback as `logo_asset_id`."
          },
          "position_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Horizontal position on the office plan, as a percentage."
          },
          "position_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Vertical position on the office plan, as a percentage."
          },
          "absolute_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Horizontal position on the office plan, in plan coordinates."
          },
          "absolute_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Vertical position on the office plan, in plan coordinates."
          },
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The room's image asset."
          },
          "asset_url": {
            "type": "string",
            "description": "URL of the room's image. Empty string if there is none."
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomResource"
            }
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Device"
            },
            "description": "Display App devices in this room."
          },
          "integration_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The slug of the calendar provider, for example `office365` or `google`, if the room is integrated with a calendar."
          },
          "rules": {
            "$ref": "#/components/schemas/RoomRules",
            "description": "The rules in force for this room: the room's own rules if set, otherwise the organisation's."
          },
          "restricted_users": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The IDs of the users to whom this room is restricted."
          },
          "restricted_teams": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The IDs of the teams to which this room is restricted."
          },
          "restricted_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomRestrictedTime"
            }
          },
          "has_app_settings": {
            "type": "boolean",
            "description": "Whether the room has its own Display App device settings."
          },
          "external_system": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "approval_assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovalAssignment"
            }
          },
          "attachable_rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomWithoutLinkedRooms"
            },
            "description": "The rooms linked to this one. Only present on endpoints that load linked rooms, such as `GET /rooms`."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60000
          },
          "is_being_deleted": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "`1` if the room is in the process of being deleted, otherwise `0`. Returned as an integer because the column is not cast."
          }
        }
      },
      "RoomAvailability": {
        "title": "Room Availability",
        "type": "object",
        "description": "Whether a room can be booked, after applying its rules.",
        "x-internal": false,
        "required": [
          "available",
          "message",
          "field",
          "date",
          "additionalInformation"
        ],
        "properties": {
          "available": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "description": "Why the room is unavailable. Empty if it is available."
          },
          "field": {
            "type": "string",
            "description": "The request field the problem relates to, for example `date`, `dates` or `overlap`. Empty if the room is available."
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "additionalInformation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Extra detail about why the room is unavailable. Empty string if it is available."
          },
          "status": {
            "type": "string",
            "enum": [
              "UNAVAILABLE"
            ],
            "description": "Only present if the room is unavailable."
          },
          "errors": {
            "type": "object",
            "description": "Only present if the room is unavailable because of an overlapping meeting.",
            "properties": {
              "overlap": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "RoomModel": {
        "title": "Room (raw model)",
        "type": "object",
        "description": "A room serialised directly from its database row rather than through an API resource.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "brand_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_slogan": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "office_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "position_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Horizontal position on the office plan, as a percentage."
          },
          "position_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Vertical position on the office plan, as a percentage."
          },
          "absolute_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Horizontal position on the office plan, in plan coordinates."
          },
          "absolute_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Vertical position on the office plan, in plan coordinates."
          },
          "calendar_provider_detail_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "external_system": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "order": {
            "type": "integer"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_being_deleted": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          }
        }
      },
      "RoomResource": {
        "title": "Room Resource",
        "description": "A resource that can be attached to a room, for example a projector or a whiteboard.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "icon_collection": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "rooms_using_count": {
            "type": "integer",
            "description": "The number of rooms using this resource. Only present on the `/room-resources` list, show and update endpoints."
          }
        }
      },
      "RoomRestrictedTime": {
        "title": "Room Restricted Time",
        "type": "object",
        "description": "A weekly period during which a room cannot be booked.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "room_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the room to which the restriction applies."
          },
          "day_of_week": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6,
            "description": "`0` is Sunday, `6` is Saturday."
          },
          "start_time": {
            "type": "string",
            "example": "12:00",
            "description": "Format `H:i`."
          },
          "end_time": {
            "type": "string",
            "example": "13:00",
            "description": "Format `H:i`."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shown to users who try to book during the restriction."
          }
        }
      },
      "RoomRuleException": {
        "title": "Room Rule Exception",
        "type": "object",
        "description": "An exception to a room rule for a given user, team or role.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "rule": {
            "type": "string",
            "description": "The rule this exception applies to, for example `RestrictFutureBookings`."
          },
          "parent_id": {
            "type": "string",
            "format": "uuid",
            "description": "The user, team or role the exception applies to."
          },
          "parent_type": {
            "type": "string"
          },
          "period_amount": {
            "type": "integer"
          },
          "period_type": {
            "type": "string",
            "description": "For example `days`."
          }
        }
      },
      "RoomRules": {
        "title": "Room Rules",
        "description": "Rules that apply to meeting rooms, set for the organisation or overridden for a single room.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "restrict_to_working_hours": {
            "type": "boolean"
          },
          "hide_room_meetings_from_office_attendance": {
            "type": "boolean"
          },
          "confirm_meetings": {
            "type": "boolean"
          },
          "delete_unconfirmed_meetings": {
            "type": "boolean"
          },
          "confirm_before_minutes": {
            "type": "integer"
          },
          "delete_after_minutes": {
            "type": "integer"
          },
          "restrict_future_bookings": {
            "type": "boolean"
          },
          "max_future_days_bookable": {
            "type": "integer"
          },
          "restrict_booking_length": {
            "type": "boolean"
          },
          "max_bookable_length": {
            "type": "integer",
            "description": "In minutes."
          },
          "usage_limit_enabled": {
            "type": "boolean"
          },
          "usage_limit_amount": {
            "type": "integer"
          },
          "usage_limit_period": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month"
            ]
          },
          "buffer_times_enabled": {
            "type": "boolean"
          },
          "minutes_before_meetings": {
            "type": "integer"
          },
          "minutes_after_meetings": {
            "type": "integer"
          },
          "repeat_meetings_enabled": {
            "type": "boolean"
          },
          "multiple_dates_enabled": {
            "type": "boolean",
            "description": "Whether meetings can be booked on several chosen dates at once. Defaults to `true`."
          },
          "max_repeat_meeting_weeks": {
            "type": "integer"
          },
          "disable_parallel_bookings": {
            "type": "boolean"
          },
          "max_parallel_bookings": {
            "type": "integer"
          },
          "enable_roll_calls": {
            "type": "boolean"
          },
          "enable_roll_calls_before_meeting": {
            "type": "boolean"
          },
          "limit_attendees_to_capacity": {
            "type": "boolean"
          },
          "exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomRuleException"
            }
          },
          "allow_attendees": {
            "type": "boolean"
          },
          "validation_failure_action": {
            "type": "string",
            "enum": [
              "decline_immediately",
              "decline_after_minutes",
              "notify_user"
            ]
          },
          "decline_after_minutes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "validation_failed_aditional_recipients": {
            "type": [
              "string",
              "null"
            ],
            "description": "Comma-separated email addresses."
          },
          "calendar_providers": {
            "type": [
              "array",
              "null"
            ],
            "items": {}
          },
          "default_meeting_privacy": {
            "type": "boolean"
          },
          "hide_meeting_title": {
            "type": "boolean"
          },
          "hide_meeting_description": {
            "type": "boolean"
          },
          "enforce_meeting_privacy_for_admins": {
            "type": "boolean"
          },
          "hide_all_meeting_details": {
            "type": "boolean"
          },
          "hide_attendees_on_private_meetings": {
            "type": "boolean"
          },
          "out_of_hours_emails_enabled": {
            "type": "boolean"
          },
          "out_of_hours_email_recipients": {
            "type": [
              "string",
              "null"
            ],
            "description": "Comma-separated email addresses."
          },
          "out_of_hours_exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutOfHoursException"
            },
            "description": "Only populated for organisation-level rules; always empty for room-level rules."
          },
          "anticipated_location": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default anticipated location for attendees, for example `unknown`."
          },
          "allow_cross_day_bookings": {
            "type": [
              "integer",
              "null"
            ],
            "enum": [
              0,
              1,
              null
            ],
            "description": "`1` if meetings may span more than one day. Returned as an integer, not a boolean."
          },
          "allow_multiple_rooms_per_meeting": {
            "type": "boolean"
          },
          "restrict_multiroom_meetings_to_linked_rooms": {
            "type": "boolean"
          },
          "allow_gaps_in_linked_rooms": {
            "type": "boolean"
          },
          "hide_restricted_rooms_from_view": {
            "type": "boolean"
          },
          "online_meeting_enabled_by_default": {
            "type": "boolean"
          },
          "disable_all_meeting_emails": {
            "type": "boolean"
          },
          "disable_organizer_emails": {
            "type": "boolean"
          },
          "disable_attendee_emails": {
            "type": "boolean"
          },
          "disable_approval_emails": {
            "type": "boolean"
          },
          "setup_and_cleanup_times_enabled": {
            "type": "boolean"
          },
          "meeting_default_duration": {
            "type": "integer",
            "description": "In minutes."
          },
          "minimum_booking_notice_enabled": {
            "type": "boolean"
          },
          "minimum_booking_notice_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "attendee_count_mode": {
            "type": "string",
            "enum": [
              "hidden",
              "optional",
              "required"
            ],
            "description": "Whether the number of attendees is asked for when booking."
          },
          "allow_do_not_notify": {
            "type": "boolean",
            "description": "Whether attendees can be added without sending them a calendar invitation."
          }
        }
      },
      "RoomWithAvailability": {
        "title": "Room With Availability",
        "description": "A version of the room resource with its availability for the working hours of a given date. Returned by `GET /rooms` when `date` is given.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The calendar resource identifier (for example, a room mailbox address) if the room is integrated with a calendar."
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "order": {
            "type": "integer"
          },
          "logo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Display App logo asset. Taken from device settings (room, then organisation) if set, otherwise the room's, otherwise the organisation's."
          },
          "brand_color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App brand colour, with the same fallback as `logo_asset_id`."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App display name, with the same fallback as `logo_asset_id`."
          },
          "display_slogan": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App slogan, with the same fallback as `logo_asset_id`."
          },
          "position_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Horizontal position on the office plan, as a percentage."
          },
          "position_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Vertical position on the office plan, as a percentage."
          },
          "absolute_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Horizontal position on the office plan, in plan coordinates."
          },
          "absolute_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Vertical position on the office plan, in plan coordinates."
          },
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomResource"
            }
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Device"
            }
          },
          "integration_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The slug of the calendar provider, for example `office365` or `google`, if the room is integrated with a calendar."
          },
          "rules": {
            "$ref": "#/components/schemas/RoomRules"
          },
          "restricted_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomRestrictedTime"
            }
          },
          "availability": {
            "$ref": "#/components/schemas/RoomAvailability"
          },
          "external_system": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "linked_rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomWithoutLinkedRooms"
            },
            "description": "The rooms linked to this one."
          },
          "approval_assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovalAssignment"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60000
          }
        }
      },
      "RoomWithoutLinkedRooms": {
        "title": "Room (without linked rooms)",
        "description": "A version of the room resource used for linked rooms, without their own linked rooms.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The calendar resource identifier (for example, a room mailbox address) if the room is integrated with a calendar."
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "office": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "order": {
            "type": "integer"
          },
          "custom_fields": {
            "type": [
              "object",
              "array"
            ],
            "description": "The room's custom field values, keyed by custom field name. An empty array (`[]`) when there are none.",
            "additionalProperties": {
              "description": "The value of the custom field."
            },
            "items": {}
          },
          "logo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Display App logo asset. Taken from device settings (room, then organisation) if set, otherwise the room's logo, otherwise the organisation's."
          },
          "brand_color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App brand colour, with the same fallback as `logo_asset_id`."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App display name, with the same fallback as `logo_asset_id`."
          },
          "display_slogan": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display App slogan, with the same fallback as `logo_asset_id`."
          },
          "position_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Horizontal position on the office plan, as a percentage."
          },
          "position_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Vertical position on the office plan, as a percentage."
          },
          "absolute_x": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Horizontal position on the office plan, in plan coordinates."
          },
          "absolute_y": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Vertical position on the office plan, in plan coordinates."
          },
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The room's image asset."
          },
          "asset_url": {
            "type": "string",
            "description": "URL of the room's image. Empty string if there is none."
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomResource"
            }
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Device"
            },
            "description": "Display App devices in this room."
          },
          "integration_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The slug of the calendar provider, for example `office365` or `google`, if the room is integrated with a calendar."
          },
          "rules": {
            "$ref": "#/components/schemas/RoomRules",
            "description": "The rules in force for this room: the room's own rules if set, otherwise the organisation's."
          },
          "restricted_users": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The IDs of the users to whom this room is restricted."
          },
          "restricted_teams": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The IDs of the teams to which this room is restricted."
          },
          "restricted_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomRestrictedTime"
            }
          },
          "external_system": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60000
          }
        }
      },
      "SelfRegistrationLink": {
        "title": "SelfRegistrationLink",
        "description": "A shareable link that lets people register themselves into the organisation.",
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "description": "Format `Y-m-d H:i:s`."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Format `Y-m-d H:i:s`. Null if the link never expires."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "organisation_name": {
            "type": "string"
          },
          "roles": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "skip_sso": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "teams": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The public URL people use to register."
          }
        }
      },
      "Service": {
        "title": "Service",
        "type": "object",
        "description": "A service that can be ordered with a meeting, for example catering.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 60
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "provider": {
            "type": "string",
            "format": "email",
            "description": "The email address of the service provider."
          },
          "order": {
            "type": "integer",
            "description": "Position of the service in lists."
          },
          "availability": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkingHours"
            },
            "description": "When the service is available, one entry per weekday. Each entry also has an `all_day` boolean."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceItem"
            },
            "description": "Sorted by `order`."
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "If any of `teams`, `rooms`, `users` or `roles` is set, the service is only available to matching meetings."
          },
          "rooms": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "users": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "chargable": {
            "type": "boolean",
            "description": "Whether the service's items have prices."
          },
          "currency_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "currency": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currency"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` if the service is not chargeable."
          },
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "asset_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the service's image, or `null` if there is none."
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceDocument"
            }
          },
          "cut_off_limit_duration": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How long before the meeting orders must be placed."
          },
          "cut_off_limit_period": {
            "type": "string",
            "enum": [
              "hours",
              "minutes"
            ]
          },
          "allow_edit_after_cut_off": {
            "type": "boolean"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon_collection": {
            "type": [
              "string",
              "null"
            ]
          },
          "available": {
            "type": "boolean",
            "description": "Whether the service is available for the meeting described in the request, according to its availability."
          },
          "unavailable_reason": {
            "type": "string",
            "description": "Empty string if the service is available, otherwise a reason code such as `working_hours`."
          }
        }
      },
      "ServiceDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "thumbnail": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Same as `url` for images, otherwise `null`."
          },
          "size": {
            "type": "integer",
            "description": "File size in bytes."
          },
          "uploaded_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the uploader."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "order": {
            "type": "integer"
          }
        },
        "title": "Service Document",
        "description": "A document attached to a service."
      },
      "ServiceItem": {
        "title": "Service Item",
        "type": "object",
        "description": "An item that can be ordered as part of a service.",
        "properties": {
          "service_item_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 60
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "min_quantity": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "max_quantity": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "show_quantity": {
            "type": "boolean",
            "description": "`false` if both `min_quantity` and `max_quantity` are 0."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "order": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ServiceRequest": {
        "title": "ServiceRequest",
        "type": "object",
        "description": "A service request attached to a meeting.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "integer"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "room_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The room the service is delivered to."
          },
          "service_name": {
            "type": "string"
          },
          "request_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_order": {
            "type": [
              "string",
              "null"
            ]
          },
          "required_at": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-05-02 09:00:00",
            "description": "When the service is required. Format `Y-m-d H:i:s`."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "The currency symbol of the service, for example `£`, or `null` if it has no currency."
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the request was cancelled. Format `Y-m-d H:i:s`."
          },
          "service_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceRequestItem"
            }
          }
        }
      },
      "ServiceRequestDashboard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_number": {
            "type": "integer"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "room_id": {
            "type": "string",
            "format": "uuid",
            "description": "The service request's room, or the meeting's room if none is set."
          },
          "service_name": {
            "type": "string"
          },
          "service_icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "service_icon_collection": {
            "type": [
              "string",
              "null"
            ]
          },
          "chargable": {
            "type": "boolean"
          },
          "currency": {
            "type": [
              "object",
              "null"
            ],
            "description": "The service's currency, serialised from the model rather than `CurrencyResource`, so it includes internal columns. `null` if the service is not chargeable.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "symbol": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "is_accepted": {
                "type": "boolean"
              },
              "is_decimal": {
                "type": "integer",
                "enum": [
                  0,
                  1
                ]
              },
              "quickbooks_exchange_rate": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "provider": {
            "type": "string",
            "format": "email"
          },
          "room": {
            "type": [
              "string",
              "null"
            ],
            "description": "Room name."
          },
          "office": {
            "type": [
              "string",
              "null"
            ],
            "description": "Office name."
          },
          "organiser": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "organiser_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "meeting_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "request_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "required_at": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-05-02 09:00:00",
            "description": "When the service is required. Format `Y-m-d H:i:s`."
          },
          "status": {
            "type": "string",
            "enum": [
              "Accepted",
              "Rejected",
              "Requested",
              "Cancelled by Organiser",
              "Closed (Fulfilled)"
            ]
          },
          "purchase_order": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the request was cancelled. Format `Y-m-d H:i:s`."
          },
          "service_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceRequestItem"
            }
          },
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Activity"
            },
            "description": "The request's activity log entries that have a causer. The `subject` and `causer` relations are not included."
          }
        },
        "title": "Service Request (dashboard)",
        "description": "A service request as seen by the service provider."
      },
      "ServiceRequestItem": {
        "title": "Service Request Item",
        "type": "object",
        "description": "An item ordered as part of a service request.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "service_item_name": {
            "type": "string"
          },
          "service_item_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "min_quantity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "max_quantity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "service_item_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "ServiceSettings": {
        "type": "object",
        "properties": {
          "mandatory_purchase_order_label": {
            "type": "boolean"
          },
          "purchase_order_label": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          }
        },
        "title": "Service Settings",
        "description": "Organisation-wide settings for meeting services."
      },
      "Shift": {
        "type": "object",
        "title": "Shift",
        "description": "A named time window within a shift group that desk bookings can be made against.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "shift_group_id": {
            "type": "string",
            "format": "uuid",
            "description": "The shift group this shift belongs to."
          },
          "name": {
            "type": "string",
            "description": "Name of the shift, e.g. \"Morning\"."
          },
          "start_time": {
            "type": "string",
            "description": "Start time in `H:i` format, in the office's local time.",
            "examples": [
              "08:00"
            ]
          },
          "end_time": {
            "type": "string",
            "description": "End time in `H:i` format, in the office's local time.",
            "examples": [
              "12:30"
            ]
          },
          "is_cross_midnight": {
            "type": "boolean",
            "description": "`true` when the end time is at or before the start time, so the shift ends on the following day."
          },
          "sort_order": {
            "type": "integer",
            "description": "Position of the shift within its group."
          }
        }
      },
      "ShiftGroup": {
        "type": "object",
        "title": "ShiftGroup",
        "description": "A group of shifts belonging to an organisation or an office.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "description": "Display label for the group."
          },
          "sort_order": {
            "type": "integer",
            "description": "Position of the group."
          },
          "shifts": {
            "type": "array",
            "description": "The group's active (not deleted) shifts, ordered by `sort_order`. Always included by the shift endpoints.",
            "items": {
              "$ref": "#/components/schemas/Shift"
            }
          }
        }
      },
      "StaffDirectoryMember": {
        "title": "Staff Directory Member",
        "type": "object",
        "description": "One row of the staff directory: who the person is, and where they are now according to their latest attendance event. Email, phone and manager are not included.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "The display name: the formatted name if set, otherwise the name."
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name to greet them with. The stored first name if it appears in the display name, otherwise the first word of the display name."
          },
          "job_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "From the directory sync (SCIM `title`). `null` for organisations that do not sync a directory."
          },
          "staff_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "From the directory sync (SCIM `employeeNumber`)."
          },
          "department": {
            "type": [
              "string",
              "null"
            ],
            "description": "From the directory sync (SCIM `department`)."
          },
          "team": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the first team they belong to."
          },
          "office": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of their office."
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "presence": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "on_site",
              "off_site",
              "on_break",
              null
            ],
            "description": "Where their latest attendance event puts them. `on_break` counts as on site for the roll call. `null` if they have no attendance events."
          },
          "status_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the status their latest attendance event set."
          },
          "last_event_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When their latest attendance event happened."
          },
          "pin_required": {
            "type": "boolean",
            "description": "Whether a kiosk must collect their PIN before signing them in. Only `true` while the organisation's plan includes the staff PIN feature."
          },
          "face_enrolled": {
            "type": "boolean",
            "description": "Whether they have a face enrolled for face sign-in. Always `false` where face matching is not set up."
          },
          "can_manage": {
            "type": "boolean",
            "description": "Whether the caller may manage this person, for example set their status."
          }
        },
        "required": [
          "id",
          "name",
          "presence",
          "status_name",
          "last_event_at",
          "pin_required",
          "face_enrolled",
          "can_manage"
        ]
      },
      "StaffPresenceSummary": {
        "title": "Staff Presence Summary",
        "type": "object",
        "description": "The calling user's own sign-in state, with what the sign-in button should offer.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether staff sign-in is switched on for the organisation and included in its plan."
          },
          "can_sign_in": {
            "type": "boolean",
            "description": "`true` if sign-in is enabled and the organisation has at least one `on_site` status."
          },
          "can_sign_out": {
            "type": "boolean",
            "description": "`true` if sign-in is enabled and the organisation has at least one `off_site` status."
          },
          "is_on_site": {
            "type": "boolean",
            "description": "Whether the latest attendance event puts them on site. `on_break` counts as on site."
          },
          "presence": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "on_site",
              "off_site",
              "on_break",
              null
            ]
          },
          "status": {
            "type": [
              "object",
              "null"
            ],
            "description": "The status set by the latest attendance event.",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "office": {
            "type": [
              "object",
              "null"
            ],
            "description": "The office of the latest attendance event.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "occurred_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "qr",
              "backup_code",
              "one_time_code",
              "name_search",
              "manual",
              "portal",
              "geofence",
              "mobile_app",
              "nfc_card",
              "face",
              null
            ],
            "description": "How the latest attendance event was recorded."
          },
          "suggested_action": {
            "type": "string",
            "enum": [
              "sign_in",
              "sign_out"
            ],
            "description": "`sign_out` if they are on site, otherwise `sign_in`."
          },
          "statuses": {
            "type": "array",
            "description": "The organisation's statuses that are enabled for ArrivalsHQ and have a presence.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "presence": {
                  "type": "string",
                  "enum": [
                    "on_site",
                    "off_site",
                    "on_break"
                  ]
                }
              }
            }
          }
        }
      },
      "StaffStatusOption": {
        "title": "Staff Status Option",
        "type": "object",
        "description": "A status that can be set on a staff member by hand: any of the organisation's statuses that has an ArrivalsHQ presence.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "colour": {
            "$ref": "#/components/schemas/HexColour"
          },
          "presence": {
            "type": "string",
            "enum": [
              "on_site",
              "off_site",
              "on_break"
            ],
            "description": "Where setting this status puts the person."
          }
        }
      },
      "Team": {
        "title": "Team",
        "type": "object",
        "description": "A representation of a team in Clearooms.",
        "examples": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "Accounts",
            "parent_id": null,
            "manager_id": "04d66580-8fdd-49ba-83df-eaa2ccf424ff",
            "teams": [],
            "users": [
              {
                "id": "4da755fb-ba05-4b10-905c-9b42c2266464",
                "name": "Alex Sample"
              }
            ],
            "desks": [],
            "roles": [],
            "external_id": null,
            "external_name": null,
            "is_openspaces_team": false
          }
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The team of which this team is a sub-team. For example in a parent \"Accounts\" team you may have separate \"Receivable\" and \"Payable\" teams."
          },
          "manager_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The ID of the user who is this team's manager."
          },
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            },
            "description": "The sub-teams of this team, nested recursively. `GET /teams` excludes hidden and system teams here; create and update responses include all sub-teams."
          },
          "users": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                }
              }
            },
            "description": "The users that belong to this team."
          },
          "desks": {
            "type": "array",
            "items": {
              "type": "object",
              "x-todo": "DeskTeamResource returns the raw Desk model attributes; columns not enumerated"
            },
            "description": "Any desks that are allocated to this team."
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The IDs of any roles assigned to this team."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_openspaces_team": {
            "type": [
              "boolean",
              "string"
            ],
            "description": "`true` if this is the organisation's main OpenSpaces team, the OpenSpaces pricing package ID if the team has one, otherwise `false`."
          }
        }
      },
      "Timezone": {
        "title": "Timezone",
        "type": "string",
        "example": "Europe/London",
        "description": "A timezone according to the [IANA Time Zone Database](https://www.iana.org/time-zones).",
        "x-internal": false
      },
      "UnminimisedDesk": {
        "title": "UnminimisedDesk",
        "description": "Fields common to non-minimised desk resources.",
        "x-internal": false,
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDesk"
          },
          {
            "type": "object",
            "properties": {
              "office_id": {
                "type": "string",
                "format": "uuid"
              },
              "team": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The team the desk is assigned to, if any.",
                "x-todo": "The raw Team model is serialised here, so the keys are every column on the teams table; not mapped field by field."
              },
              "user_allocations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DeskAllocation"
                }
              },
              "team_allocations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DeskAllocation"
                }
              },
              "guest_allocation": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DeskGuestAllocation"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "external_system": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "approval_assignments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApprovalAssignment"
                }
              },
              "required_parking_permit_types": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DeskRequiredParkingPermitType"
                }
              }
            }
          }
        ]
      },
      "User": {
        "title": "User",
        "description": "A representation of a Clearooms user, as returned by `UserResource`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseUser"
          },
          {
            "type": "object",
            "properties": {
              "mobile_number": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40,
                "description": "The user's mobile number."
              },
              "is_archived": {
                "type": "boolean"
              },
              "is_admin": {
                "type": "boolean"
              },
              "is_manager": {
                "type": "boolean"
              },
              "office_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The user's default office."
              },
              "avatar_asset_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "`null` for non-admins when the organisation has avatars disabled."
              },
              "role_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Legacy single role column. Use `roles` instead."
              },
              "roles": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UserRole"
                }
              },
              "team_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Legacy single team column. Use `teams` instead."
              },
              "teams": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UsersTeams"
                },
                "description": "The non-system teams to which the user belongs."
              },
              "external_user": {
                "type": "boolean",
                "description": "Whether the user has a linked external (calendar provider) account."
              },
              "external_avatar": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Avatar URL from the linked external account, if any."
              },
              "skip_sso": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "custom_colours_enabled": {
                "type": "boolean"
              },
              "locale": {
                "$ref": "#/components/schemas/UserLocale"
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "send_outages_updates": {
                "type": "boolean"
              },
              "send_release_updates": {
                "type": "boolean"
              },
              "enterprise_fields": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true,
                "description": "Free-form enterprise fields, for example `employeeNumber`."
              },
              "location_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "location_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Only populated when the location relation has been loaded (for example on `GET /users`); otherwise `null`."
              },
              "manager": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "notify_booking_check_in_reminder": {
                "type": "boolean"
              },
              "notify_parking_check_in_reminder": {
                "type": "boolean"
              },
              "notify_staff_desk_bookings": {
                "type": "boolean"
              },
              "notify_staff_parking_bookings": {
                "type": "boolean"
              },
              "notify_staff_meeting_bookings": {
                "type": "boolean"
              },
              "notify_staff_cancelled_desk_bookings": {
                "type": "boolean"
              },
              "notify_staff_cancelled_parking_bookings": {
                "type": "boolean"
              },
              "notify_staff_cancelled_meeting_bookings": {
                "type": "boolean"
              },
              "delegates_can_create_meetings": {
                "type": "boolean",
                "description": "Whether the user's delegates can create meetings on their behalf."
              },
              "delegates_can_edit_meetings": {
                "type": "boolean",
                "description": "Whether the user's delegates can edit meetings on their behalf."
              },
              "last_login_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Formatted as `Y-m-d H:i:s`."
              },
              "meeting_settings": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UserMeetingPageSettings"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ui_settings": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "hide_review_banner": {
                    "type": "boolean"
                  }
                }
              },
              "is_being_deleted": {
                "type": "boolean"
              },
              "notification_preferences": {
                "$ref": "#/components/schemas/UserNotificationPreferences"
              },
              "has_mfa": {
                "type": "boolean"
              },
              "office": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "description": "The user's default office."
              },
              "is_external": {
                "type": "boolean"
              },
              "can_upload_avatar": {
                "type": "boolean",
                "description": "Always `true` for admins; otherwise follows the organisation's avatar settings."
              }
            }
          }
        ]
      },
      "UserArrivalsCapabilities": {
        "title": "User ArrivalsHQ capabilities",
        "type": "object",
        "description": "What the user can do with ArrivalsHQ from the mobile app, and where they are right now. Only returned on the current user's own record.",
        "properties": {
          "can_invite_visitor": {
            "type": "boolean",
            "description": "Whether the organisation's plan includes visitor pre-registration, so the user can invite visitors with themselves as host. No visitor scope is needed for this."
          },
          "can_staff_sign_in": {
            "type": "boolean",
            "description": "Whether the user can sign themselves in and out from the mobile app."
          },
          "is_fire_marshal": {
            "type": "boolean",
            "description": "Whether the user is an active fire marshal in their organisation, matched by user or by email address."
          },
          "staff_presence": {
            "type": "object",
            "description": "The user's latest staff sign-in movement.",
            "properties": {
              "is_on_site": {
                "type": "boolean",
                "description": "`true` when the latest movement is on site or on a break. `false` when off site or there is no movement."
              },
              "presence": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "on_site",
                  "off_site",
                  "on_break",
                  null
                ],
                "description": "`null` when the user has no movements."
              },
              "status_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The name of the status the latest movement recorded."
              },
              "office_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "occurred_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "suggested_action": {
                "type": "string",
                "enum": [
                  "sign_in",
                  "sign_out"
                ],
                "description": "`sign_out` when the user is on site; otherwise `sign_in`."
              }
            }
          },
          "notifications": {
            "type": "object",
            "properties": {
              "visitor_arrived_push": {
                "type": "boolean",
                "description": "Whether the user gets a push notification when their visitor arrives. Change it with `PUT /users/me/notification-preferences`, using the name `VisitorArrivedNotification`."
              }
            }
          }
        }
      },
      "UserAttribute": {
        "title": "User Attribute",
        "type": "object",
        "properties": {
          "attribute_id": {
            "type": "string",
            "format": "uuid"
          },
          "attribute_name": {
            "type": "string"
          }
        }
      },
      "UserColours": {
        "title": "UserColours",
        "type": "object",
        "examples": [
          {
            "booked": "#e7143d",
            "part_booked": "#fba929",
            "booked_for_me": "#2395e2",
            "unavailable": "#acacac",
            "available": "#379a36"
          }
        ],
        "properties": {
          "booked": {
            "$ref": "#/components/schemas/HexColour",
            "description": "A hexadecimal color code in the format #RRGGBB"
          },
          "part_booked": {
            "$ref": "#/components/schemas/HexColour",
            "description": "A hexadecimal color code in the format #RRGGBB"
          },
          "booked_for_me": {
            "$ref": "#/components/schemas/HexColour",
            "description": "A hexadecimal color code in the format #RRGGBB"
          },
          "unavailable": {
            "$ref": "#/components/schemas/HexColour",
            "description": "A hexadecimal color code in the format #RRGGBB"
          },
          "available": {
            "$ref": "#/components/schemas/HexColour",
            "description": "A hexadecimal color code in the format #RRGGBB"
          }
        }
      },
      "UserLocale": {
        "title": "User Locale",
        "type": "string",
        "enum": [
          "cy",
          "de",
          "en",
          "en-GB",
          "en-US",
          "es",
          "fr",
          "it",
          "nl",
          "pl",
          "pt"
        ],
        "description": "Supported user locales within the application. When writing, any `xx-YY` value whose language part (`xx`) is supported is also accepted.",
        "examples": [
          "en-GB"
        ],
        "x-internal": false
      },
      "UserMeetingPageSettings": {
        "title": "User Meeting Page Settings",
        "type": "object",
        "examples": [
          {
            "compact": true,
            "drag": true,
            "hideOutsideWorkingHours": true,
            "hover": true
          }
        ],
        "properties": {
          "compact": {
            "type": "boolean",
            "description": "Whether to display the meeting rooms page in compact mode."
          },
          "drag": {
            "type": "boolean",
            "description": "Enable drag-and-dropping of meetings."
          },
          "hideOutsideWorkingHours": {
            "type": "boolean",
            "description": "Hide meetings outside of working hours."
          },
          "hover": {
            "type": "boolean",
            "description": "Show a meeting's details on hover."
          }
        }
      },
      "UserNotificationPreferences": {
        "type": "object",
        "title": "User Notification Preferences",
        "description": "Chosen channels for a user to receive each notification sent from the system. The channels each notification supports are listed by `GET /users/notification-types`.",
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the user to which these preferences belong."
          },
          "AutoBookingCancellationNotification": {
            "type": "array",
            "description": "Notification that your booking has been auto-cancelled.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "AutoBookingCancellationWarningNotification": {
            "type": "array",
            "description": "Notification that your booking is soon to be auto-cancelled.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "AvailableDeskNotification": {
            "type": "array",
            "description": "Notification that a desk has become available in your chosen office on your chosen date.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "BookingDeletedNotification": {
            "type": "array",
            "description": "Notification that your booking has been deleted.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "BookingReminderNotification": {
            "type": "array",
            "description": "Reminder notification about your booking.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "BookingStartedNotification": {
            "type": "array",
            "description": "Notification that your booking has started. If your organisation makes use of the check-in functionality, this will also serve as a check-in notification.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "DeskDeletedNotification": {
            "type": "array",
            "description": "Notification that a desk has been deleted.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "ManagerBookingCancelledNotification": {
            "type": "array",
            "description": "**Managers only**: Notification that a booking for an employee you manage has been cancelled.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "ManagerBookingCreatedNotification": {
            "type": "array",
            "description": "**Managers only**: Notification that an employee you manage has created a booking.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "ManagerMeetingCancelledNotification": {
            "type": "array",
            "description": "**Managers only**: Notification that a meeting created by an employee you manage has been cancelled.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "ManagerMeetingCreatedNotification": {
            "type": "array",
            "description": "**Managers only**: Notification that an employee you manage has created a meeting.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "NewVisitorNotification": {
            "type": "array",
            "description": "Notification that you have received a new visitor.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          },
          "VisitorArrivedNotification": {
            "type": "array",
            "description": "Notification that your visitor has arrived. Defaults to push only.",
            "items": {
              "type": "string",
              "enum": [
                "MAIL",
                "PUSH"
              ]
            }
          }
        }
      },
      "UserRole": {
        "title": "User Role",
        "type": "object",
        "description": "A role assigned to a user.",
        "properties": {
          "role_id": {
            "type": "string",
            "format": "uuid"
          },
          "role_name": {
            "type": "string"
          }
        }
      },
      "UserStatus": {
        "type": "object",
        "title": "User Status",
        "description": "A status applied to a user for a period of time.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "created_by": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Holiday",
              "Unpaid Leave",
              "Sick Leave",
              "Maternity",
              "Paternity",
              "Meeting",
              "Compassionate",
              "Dentist/Doctors",
              null
            ],
            "description": "Legacy built-in status. Newer statuses use `custom_status_id` instead."
          },
          "custom_status_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "custom_status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "start_date": {
            "type": "string",
            "description": "Not cast by the model, so the format depends on the endpoint: `Y-m-d H:i:s` when read back from the database (for example from `GET /user-statuses`), ISO 8601 when just created, and the value you sent when just updated."
          },
          "end_date": {
            "type": "string",
            "description": "Same format caveats as `start_date`."
          },
          "free_desk_allocations": {
            "type": "boolean",
            "description": "Whether the user's allocated desks are freed for others to book during this status."
          },
          "block_availability": {
            "type": "boolean"
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "description": "The office to which the status applies, if any."
          }
        }
      },
      "UserStatusRecord": {
        "title": "User Status Record",
        "type": "object",
        "description": "The raw stored record of a user status (not the `UserStatus` resource).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "free_desk_allocations": {
            "type": "boolean"
          },
          "block_availability": {
            "type": "boolean"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Holiday",
              "Unpaid Leave",
              "Sick Leave",
              "Maternity",
              "Paternity",
              "Meeting",
              "Compassionate",
              "Dentist/Doctors",
              null
            ]
          },
          "custom_status_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "start_date": {
            "type": "string",
            "description": "Formatted as `Y-m-d H:i:s`."
          },
          "end_date": {
            "type": "string",
            "description": "Formatted as `Y-m-d H:i:s`."
          },
          "location_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "location_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The model class of the location, currently always `App\\Office` when set."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UsersTeams": {
        "title": "Users Teams",
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "type": "string"
          }
        }
      },
      "Vehicle": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "registration_number": {
            "type": "string"
          },
          "make": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "fuel_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "year": {
            "type": [
              "integer",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the generated vehicle image, if one exists."
          },
          "image_generating": {
            "type": "boolean",
            "description": "Whether an image is currently being generated for this vehicle."
          },
          "display_name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "personal",
              "pool_car"
            ]
          },
          "is_pool_car": {
            "type": "boolean"
          },
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PoolCarAllocation"
            },
            "description": "Pool car allocations. Only present when loaded (e.g. when getting a single pool car)."
          },
          "is_default": {
            "type": "boolean",
            "description": "Whether this is the user's default vehicle."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "title": "Vehicle",
        "description": "A personal vehicle or organisation pool car."
      },
      "VisitBookingClash": {
        "title": "Visit booking clash",
        "type": "object",
        "x-tags": [
          "Visitors"
        ],
        "description": "Returned with 422 when a visit cannot move because a booking made for it cannot follow. Nothing is changed. Other 422 errors from the same call have `message` only.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Such as `Some bookings for this visit can't move with it. Cancel or change them first.`"
          },
          "code": {
            "type": "string",
            "enum": [
              "booking_clash"
            ]
          },
          "clashes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "desk",
                    "parking",
                    "room"
                  ]
                },
                "label": {
                  "type": "string",
                  "description": "The desk, parking space or room name."
                },
                "reason": {
                  "type": "string",
                  "description": "Why it cannot move, such as `Desk 12 isn't available on 12 November 2026.`"
                }
              },
              "required": [
                "kind",
                "label",
                "reason"
              ]
            }
          }
        },
        "required": [
          "message"
        ],
        "examples": [
          {
            "message": "Some bookings for this visit can't move with it. Cancel or change them first.",
            "code": "booking_clash",
            "clashes": [
              {
                "kind": "desk",
                "label": "Desk 12",
                "reason": "Desk 12 isn't available on 12 November 2026."
              }
            ]
          }
        ]
      },
      "VisitChangeRequest": {
        "title": "Visit change request",
        "type": "object",
        "x-tags": [
          "Visitors"
        ],
        "description": "The fields of an upcoming visit you can change. Send at least one; fields you leave out are unchanged.",
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "description": "The new host. Must be a user in your organisation. Cannot be empty if sent."
          },
          "office_id": {
            "type": "string",
            "format": "uuid",
            "description": "The new office. Must be in your organisation. Cannot be empty if sent. The visit's desk, parking and room bookings must be in this office, or the change is refused with a booking clash."
          },
          "expected_arrival": {
            "type": "string",
            "description": "The new expected arrival, such as `2026-11-12 10:30`. A time without an offset is read as the office's local time; one with `Z` or an offset is converted to it. Cannot be before today in the office's time zone. Cannot be empty if sent."
          },
          "visitor_type_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The new visitor type, or `null` to clear it. Must be an enabled type in your organisation that your ArrivalsHQ plan includes."
          }
        }
      },
      "VisitHistoryEntry": {
        "title": "Visit history entry",
        "type": "object",
        "x-tags": [
          "Visitors"
        ],
        "description": "One visit in a person's visit history.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "cancelled",
              "signed_out",
              "on_site",
              "id_required",
              "incomplete",
              "no_show",
              "expected"
            ],
            "description": "`no_show` means the expected arrival was over an hour ago with no sign-in. `incomplete` means a kiosk sign-in that was started but not finished. `id_required` means ID verification is pending or expired."
          },
          "expected_arrival": {
            "type": [
              "string",
              "null"
            ],
            "description": "The office's local time with no offset, such as `2026-11-12 10:30:00`."
          },
          "time_in": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "time_out": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "host_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The host's user ID."
          },
          "created_by_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "office_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "visitor_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The visitor type name."
          },
          "visitor_type_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "short_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "This visit's sign-in code, formatted as two groups of four characters, such as `K7QM-2XRP`."
          },
          "sign_in_code_state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "active",
              "used",
              "expired",
              "cancelled",
              null
            ],
            "description": "Whether the one-time sign-in code can still be used. `null` when the visit has no code."
          }
        },
        "examples": [
          {
            "id": "3f6c1a52-1b2c-4d3e-8f40-5a6b7c8d9e0f",
            "status": "signed_out",
            "expected_arrival": "2026-10-14 09:30:00",
            "time_in": "2026-10-14T08:27:41+00:00",
            "time_out": "2026-10-14T15:02:10+00:00",
            "host_name": "Priya Example",
            "user_id": "3f6c1a52-7d4e-4b8a-9c21-5e0f6a7b8c9d",
            "created_by_id": "3f6c1a52-7d4e-4b8a-9c21-5e0f6a7b8c9d",
            "office_name": "London Office",
            "office_id": "3f6c1a52-aa11-4b22-8c33-d44e55f66a77",
            "visitor_type": "Contractor",
            "visitor_type_id": "3f6c1a52-0c1d-4e2f-9a3b-4c5d6e7f8a9b",
            "cancelled_at": null,
            "short_code": "K7QM-2XRP",
            "sign_in_code_state": "used"
          }
        ]
      },
      "Visitor": {
        "title": "Visitor",
        "type": "object",
        "x-tags": [
          "Visitors"
        ],
        "description": "A visit to one of your offices. `phone`, `send_invite`, `site_id`, `health_responses`, `custom_field_responses` and `nda_document_ids` can be written but are not returned here.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "company": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "car_registration_number": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "time_in": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the visitor signed in, such as `2026-03-04 09:12:00`. Responses to a create or update echo the value as you sent it."
          },
          "time_out": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the visitor signed out, such as `2026-03-04 17:30:00`. The response to `POST /visitors/{visitorId}/check-out` returns it as an ISO 8601 UTC timestamp instead, such as `2026-03-04T17:30:00.000000Z`."
          },
          "expected_arrival": {
            "type": [
              "string",
              "null"
            ],
            "description": "Such as `2026-03-04 09:00:00`."
          },
          "userBeingVisited": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MinimisedUser"
              },
              {
                "type": "null"
              }
            ],
            "description": "The host."
          },
          "office": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              }
            }
          },
          "attendee": {
            "type": [
              "object",
              "null"
            ],
            "description": "The meeting attendee record, if the visitor was invited to a meeting.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "meeting": {
            "type": [
              "object",
              "null"
            ],
            "description": "The meeting the visitor was invited to, if any.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "start_time": {
                "type": "string",
                "description": "Format `Y-m-d H:i`."
              },
              "start_time_tz": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "end_time": {
                "type": "string",
                "description": "Format `Y-m-d H:i`."
              },
              "end_time_tz": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "room": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "cancelled": {
                "type": "boolean"
              }
            }
          },
          "notify_employee": {
            "type": "boolean",
            "description": "Whether the host is emailed when the visitor signs in."
          },
          "locale": {
            "type": "string",
            "description": "Defaults to `en`."
          },
          "custom_fields": {
            "type": [
              "object",
              "array"
            ],
            "description": "Keyed by custom field ID. An empty array when there are no values.",
            "additionalProperties": {
              "$ref": "#/components/schemas/VisitorCustomFieldValue"
            }
          },
          "created_by_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "checked_in_via": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "walk_in",
              "expected_match",
              "portal_manual",
              "qr",
              null
            ],
            "description": "How the visitor was signed in. `null` until they sign in."
          },
          "created_via": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "kiosk",
              "portal",
              "meeting",
              "mobile",
              null
            ],
            "description": "Where the record was created. Visits created through `POST /visitors` without a kiosk are `portal`."
          },
          "kiosk_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The kiosk that created the record, if any."
          },
          "visitor_type_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "visitor_type": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "slug": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "accessibility_notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "approval_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pending",
              "approved",
              "declined",
              null
            ],
            "description": "`null` when the visit does not need approval."
          },
          "id_verification": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "pending",
                  "captured",
                  "skipped",
                  "expired",
                  "pending_retry",
                  null
                ]
              },
              "document_type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "passport",
                  "driver_licence",
                  "national_id",
                  "skipped",
                  null
                ]
              },
              "captured_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "latest_document_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Only filled in by endpoints that load the latest ID document, such as `GET /offices/{officeId}/visitors`, `GET /visitors/signed-in` and the approval queue. `null` from the other visitor endpoints in this section."
              }
            }
          },
          "repeat_visitor_booking_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Shared by every visit created together from multiple `dates`."
          }
        },
        "examples": [
          {
            "id": "3f6b2c1e-8a4d-4f0e-9b71-2d5c6e7f8a90",
            "name": "Jamie Fictional",
            "company": "Example Ltd",
            "car_registration_number": "AB12 CDE",
            "email": "jamie@example.com",
            "time_in": null,
            "time_out": null,
            "expected_arrival": "2026-03-04 09:00:00",
            "userBeingVisited": null,
            "office": {
              "id": "5e4d3c2b-1a09-4f8e-a7d6-c5b4a3928170",
              "name": "London Office",
              "timezone": "Europe/London"
            },
            "attendee": null,
            "meeting": null,
            "notify_employee": true,
            "locale": "en",
            "custom_fields": [],
            "created_by_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
            "checked_in_via": null,
            "created_via": "portal",
            "kiosk_id": null,
            "visitor_type_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
            "visitor_type": {
              "id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
              "name": "Contractor",
              "slug": "contractor"
            },
            "accessibility_notes": null,
            "approval_status": null,
            "id_verification": {
              "status": null,
              "document_type": null,
              "captured_at": null,
              "latest_document_id": null
            },
            "repeat_visitor_booking_id": null
          }
        ]
      },
      "VisitorCustomFieldValue": {
        "title": "Visitor Custom Field Value",
        "type": "object",
        "description": "A custom field value recorded against a visitor.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The custom field ID."
          },
          "type": {
            "type": "string",
            "description": "The custom field type, such as `Textbox`, `Checkbox` or `Multiselect`."
          },
          "label": {
            "type": "string"
          },
          "value": {
            "description": "The stored value. Its type depends on the custom field type."
          }
        }
      },
      "VisitorDetail": {
        "title": "Visitor detail",
        "type": "object",
        "x-tags": [
          "Visitors"
        ],
        "description": "The full record for one visit, returned by `GET /visitors/{visitorId}`.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "car_registration_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "time_in": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "time_out": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expected_arrival": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The office's local time. Ignore the offset: it is always `+00:00` for now, even though the time isn't UTC.",
            "x-todo": "VisitorDetailResource stamps the office-local wall clock as UTC; once fixed (VisitorTimes::localToIso) the offset will be the office's."
          },
          "status": {
            "type": "string",
            "enum": [
              "cancelled",
              "signed_out",
              "on_site",
              "id_required",
              "incomplete",
              "no_show",
              "expected"
            ],
            "description": "`no_show` means the expected arrival was over an hour ago with no sign-in. `incomplete` means a kiosk sign-in that was started but not finished. `id_required` means ID verification is pending or expired."
          },
          "checked_in_via": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "walk_in",
              "expected_match",
              "portal_manual",
              "qr",
              null
            ]
          },
          "created_via": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "kiosk",
              "portal",
              "meeting",
              "mobile",
              null
            ],
            "description": "`null` for visits created before this was recorded."
          },
          "kiosk": {
            "type": [
              "object",
              "null"
            ],
            "description": "The kiosk that created the visit or handled its sign-in.",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "approval_status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "declined"
            ]
          },
          "accessibility_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "type": "string",
            "description": "Defaults to `en`."
          },
          "notify_employee": {
            "type": "boolean"
          },
          "photo_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "A link to the visitor's photo, which may be temporary."
          },
          "short_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sign-in code, such as `K7QM-2XRP`."
          },
          "sign_in_code_state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "active",
              "used",
              "expired",
              "cancelled",
              null
            ],
            "description": "Whether the one-time sign-in code can still be used. `null` when the visit has no code."
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_by_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "visitor_type": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "slug": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "host": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "job_title": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "office": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "id_verification": {
            "type": "object",
            "description": "The fields from `document_id` on appear only when face matching is configured on the server.",
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "pending",
                  "captured",
                  "skipped",
                  "expired",
                  "pending_retry",
                  null
                ]
              },
              "document_type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "passport",
                  "driver_licence",
                  "national_id",
                  "skipped",
                  null
                ]
              },
              "captured_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "document_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "The latest ID scan."
              },
              "face_matched": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "face_similarity": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "face_detail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "chip_status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "chip": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true,
                "description": "Fields read from the document's chip.",
                "x-todo": "Keys come from the ID reader; not defined in code."
              },
              "extracted": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true,
                "description": "Fields read from the document image.",
                "x-todo": "Keys come from the ID reader; not defined in code."
              },
              "has_image": {
                "type": "boolean"
              },
              "has_portrait": {
                "type": "boolean"
              },
              "has_selfie": {
                "type": "boolean"
              }
            },
            "required": [
              "status",
              "document_type",
              "captured_at"
            ]
          },
          "health_responses": {
            "type": [
              "object",
              "array",
              "null"
            ],
            "description": "The visitor's answers to health questions.",
            "x-todo": "Stored as a free-form array cast; shape not defined in code."
          },
          "custom_fields": {
            "type": [
              "object",
              "array"
            ],
            "description": "Keyed by custom field ID. An empty array when there are no values.",
            "additionalProperties": {
              "$ref": "#/components/schemas/VisitorCustomFieldValue"
            }
          },
          "acknowledgements": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "document_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "document_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "document_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The document version the visitor agreed to."
                },
                "agreed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "signed": {
                  "type": "boolean"
                }
              }
            }
          },
          "documents_sent": {
            "type": "array",
            "description": "Documents sent with the welcome email.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string"
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "integer"
                },
                "signature_required": {
                  "type": "boolean"
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "markdown",
                    "pdf",
                    "video",
                    "file"
                  ]
                }
              }
            }
          },
          "timeline": {
            "type": "array",
            "description": "What has happened so far, oldest first.",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "key": {
                  "type": "string",
                  "enum": [
                    "signed_in",
                    "photo",
                    "id_verified",
                    "acknowledged",
                    "host_notified",
                    "signed_out"
                  ]
                },
                "label": {
                  "type": "string",
                  "description": "Such as `Signed in`."
                },
                "detail": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        },
        "examples": [
          {
            "id": "3f6c1a52-1b2c-4d3e-8f40-5a6b7c8d9e0f",
            "name": "Jamie Fictional",
            "company": "Example Ltd",
            "email": "jamie@example.com",
            "phone": null,
            "car_registration_number": null,
            "time_in": "2026-11-02T09:04:12+00:00",
            "time_out": null,
            "expected_arrival": "2026-11-02T09:00:00+00:00",
            "status": "on_site",
            "checked_in_via": "portal_manual",
            "created_via": "portal",
            "kiosk": null,
            "approval_status": "approved",
            "accessibility_notes": null,
            "locale": "en",
            "notify_employee": true,
            "photo_url": null,
            "short_code": "K7QM-2XRP",
            "sign_in_code_state": "used",
            "cancelled_at": null,
            "created_by_id": "3f6c1a52-7d4e-4b8a-9c21-5e0f6a7b8c9d",
            "visitor_type": null,
            "host": {
              "id": "3f6c1a52-7d4e-4b8a-9c21-5e0f6a7b8c9d",
              "name": "Priya Example",
              "email": "priya@example.com",
              "job_title": "Office Manager"
            },
            "office": {
              "id": "3f6c1a52-aa11-4b22-8c33-d44e55f66a77",
              "name": "London Office"
            },
            "id_verification": {
              "status": null,
              "document_type": null,
              "captured_at": null
            },
            "health_responses": null,
            "custom_fields": [],
            "acknowledgements": [],
            "documents_sent": [],
            "timeline": [
              {
                "at": "2026-11-02T09:04:12+00:00",
                "key": "signed_in",
                "label": "Signed in",
                "detail": "Portal manual"
              },
              {
                "at": "2026-11-02T09:04:12+00:00",
                "key": "host_notified",
                "label": "Host notified",
                "detail": "Priya Example"
              }
            ]
          }
        ]
      },
      "VisitorRules": {
        "title": "Visitor Rules",
        "type": "object",
        "description": "Your organisation's visitor rules.",
        "properties": {
          "whos_in_privacy_enabled": {
            "type": "boolean"
          },
          "additional_notification_email_enabled": {
            "type": "boolean"
          },
          "additional_notification_email_send_timing": {
            "type": "string",
            "enum": [
              "immediately",
              "check_in"
            ]
          },
          "additional_notification_offices": {
            "type": "array",
            "description": "Offices whose visitors also trigger an email to extra recipients.",
            "items": {
              "type": "object",
              "properties": {
                "office_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "recipients": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Comma-separated email addresses."
                }
              }
            }
          },
          "welcome_email_enabled": {
            "type": "boolean",
            "description": "Whether visitors are emailed an invitation. When this is off, no invitation is sent regardless of `send_invite` on the visitor."
          },
          "welcome_email_send_timing": {
            "type": "string",
            "enum": [
              "immediately",
              "check_in"
            ]
          },
          "welcome_email_send_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time in `H:i:s` format, such as `09:00:00`."
          },
          "invitation_send_timing": {
            "type": "string",
            "enum": [
              "on_registration",
              "day_before",
              "day_of"
            ],
            "description": "When a pre-registered visitor's invitation is sent. `on_registration` when not set."
          },
          "invitation_send_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time in `H:i:s` format, such as `08:00:00`, used with `day_before` and `day_of`."
          },
          "mandatory_fields": {
            "description": "Which visitor fields are required, optional or hidden. Usually an object keyed by field name. A newly created rule can hold the string `\"json\"` instead (see the note on `GET /settings/organisation/visitors/rules`), and a rule saved with an empty or unrecognised `mandatory_fields` holds an empty array.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "email": {
                    "description": "`true` (required), `false` (optional) or `\"hidden\"`. Values saved through `PUT /settings/organisation/visitors/rules` come back as the strings `\"true\"`, `\"false\"` or `\"hidden\"`.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "true",
                          "false",
                          "hidden"
                        ]
                      }
                    ]
                  },
                  "car_registration_number": {
                    "description": "`true` (required), `false` (optional) or `\"hidden\"`. Values saved through `PUT /settings/organisation/visitors/rules` come back as the strings `\"true\"`, `\"false\"` or `\"hidden\"`.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "true",
                          "false",
                          "hidden"
                        ]
                      }
                    ]
                  },
                  "locale": {
                    "description": "`true` (required), `false` (optional) or `\"hidden\"`. Values saved through `PUT /settings/organisation/visitors/rules` come back as the strings `\"true\"`, `\"false\"` or `\"hidden\"`.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "true",
                          "false",
                          "hidden"
                        ]
                      }
                    ]
                  },
                  "expected_arrival": {
                    "description": "`true` (required), `false` (optional) or `\"hidden\"`. Values saved through `PUT /settings/organisation/visitors/rules` come back as the strings `\"true\"`, `\"false\"` or `\"hidden\"`.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "true",
                          "false",
                          "hidden"
                        ]
                      }
                    ]
                  },
                  "company": {
                    "description": "`true` (required), `false` (optional) or `\"hidden\"`. Values saved through `PUT /settings/organisation/visitors/rules` come back as the strings `\"true\"`, `\"false\"` or `\"hidden\"`.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "true",
                          "false",
                          "hidden"
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "type": "array",
                "maxItems": 0
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled_languages": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "EN",
                "CY",
                "DE",
                "ES",
                "FR",
                "IT",
                "NL",
                "PL",
                "PT"
              ]
            },
            "description": "Languages offered on the kiosk. `null` means every supported language is on."
          },
          "nda_acknowledgement_enabled": {
            "type": "boolean"
          },
          "approvals_enabled": {
            "type": "boolean",
            "description": "Whether visits need a host's approval."
          },
          "id_scanning_required": {
            "type": "boolean",
            "description": "Whether a failed or skipped ID capture blocks sign-in at the kiosk."
          },
          "email_acknowledgement_to_visitor": {
            "type": "boolean"
          },
          "repeat_visitors_enabled": {
            "type": "boolean"
          },
          "max_repeat_visitor_weeks": {
            "type": "integer",
            "description": "How many weeks ahead repeat visits can be booked. Defaults to 12."
          }
        },
        "examples": [
          {
            "whos_in_privacy_enabled": false,
            "additional_notification_email_enabled": true,
            "additional_notification_email_send_timing": "check_in",
            "additional_notification_offices": [
              {
                "office_id": "5e4d3c2b-1a09-4f8e-a7d6-c5b4a3928170",
                "recipients": "reception@example.com"
              }
            ],
            "welcome_email_enabled": true,
            "welcome_email_send_timing": "immediately",
            "welcome_email_send_time": "09:00:00",
            "invitation_send_timing": "day_before",
            "invitation_send_time": "08:00:00",
            "mandatory_fields": {
              "email": "true",
              "car_registration_number": "false",
              "locale": "hidden",
              "expected_arrival": "true",
              "company": "true"
            },
            "enabled_languages": [
              "EN",
              "FR"
            ],
            "nda_acknowledgement_enabled": false,
            "approvals_enabled": false,
            "id_scanning_required": false,
            "email_acknowledgement_to_visitor": false,
            "repeat_visitors_enabled": true,
            "max_repeat_visitor_weeks": 8
          }
        ]
      },
      "WorkingHours": {
        "title": "WorkingHours",
        "type": "object",
        "description": "The working hours for one day of the week. A day where `from` equals `to` is closed. A `to` earlier than `from` runs past midnight.",
        "properties": {
          "weekday": {
            "type": "integer",
            "minimum": 1,
            "maximum": 7,
            "description": "Monday is 1 and Sunday is 7."
          },
          "from": {
            "type": "string",
            "description": "This is in the `HH:mm` format.",
            "example": "09:00"
          },
          "to": {
            "type": "string",
            "description": "This is in the `HH:mm` format.",
            "example": "17:00"
          },
          "all_day": {
            "type": "boolean",
            "description": "Whether the whole day counts as working hours."
          }
        }
      },
      "Zone": {
        "title": "Zone",
        "type": "object",
        "description": "A shape drawn on an office plan. A `meeting_room` zone outlines a single room or desk; a `neighbourhood` zone groups desks and can be restricted to teams and users.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "office_id": {
            "type": "string",
            "format": "uuid"
          },
          "zone_type": {
            "type": "string",
            "enum": [
              "meeting_room",
              "neighbourhood"
            ]
          },
          "zonable_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Room",
              "Desk",
              null
            ],
            "description": "The kind of space a `meeting_room` zone outlines. `null` for neighbourhoods."
          },
          "zonable_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "points": {
            "type": "array",
            "description": "The polygon's vertices.",
            "items": {
              "type": "object",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                }
              }
            }
          },
          "fill_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "opacity": {
            "type": "number"
          },
          "stroke_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "stroke_width": {
            "type": "integer"
          },
          "has_border": {
            "type": "boolean"
          },
          "border_style": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "solid",
              "dashed",
              "dotted",
              null
            ]
          },
          "hide_room_icon": {
            "type": "boolean"
          },
          "show_room_name": {
            "type": "boolean"
          },
          "show_meeting_attendees": {
            "type": "boolean"
          },
          "show_availability_text": {
            "type": "boolean"
          },
          "hide_hover_effects": {
            "type": "boolean"
          },
          "hide_hover_modal": {
            "type": "boolean"
          },
          "room_name_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "show_neighbourhood_name": {
            "type": "boolean"
          },
          "use_dynamic_coloring": {
            "type": "boolean"
          },
          "neighbourhood_name_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "font_size": {
            "type": "integer"
          },
          "name_position": {
            "type": "string",
            "enum": [
              "center",
              "top-center",
              "top-left",
              "top-right",
              "bottom-center",
              "bottom-left",
              "bottom-right"
            ]
          },
          "name_in_front": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "office": {
            "description": "Only returned when `detailed` is true.",
            "$ref": "#/components/schemas/Office"
          },
          "zonable": {
            "description": "The outlined room or desk. Only returned when `detailed` is true and the zone is a `meeting_room` zone.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Room"
              },
              {
                "$ref": "#/components/schemas/Desk"
              }
            ]
          },
          "rotation": {
            "type": "number",
            "description": "Only returned when `detailed` is true."
          },
          "scale_x": {
            "type": "number",
            "description": "Only returned when `detailed` is true."
          },
          "scale_y": {
            "type": "number",
            "description": "Only returned when `detailed` is true."
          },
          "position_x": {
            "type": "number",
            "description": "Only returned when `detailed` is true."
          },
          "position_y": {
            "type": "number",
            "description": "Only returned when `detailed` is true."
          },
          "metadata": {
            "type": [
              "object",
              "array",
              "null"
            ],
            "description": "Only returned when `detailed` is true."
          },
          "bounds": {
            "description": "Only returned when `detailed` is true.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneBounds"
              }
            ]
          },
          "konva_format": {
            "description": "Only returned when `detailed` is true.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ZoneKonvaFormat"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Only returned when `detailed` is true."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Only returned when `detailed` is true."
          },
          "desks": {
            "type": "array",
            "description": "Neighbourhoods only, when desks are loaded.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "desk_count": {
            "type": "integer",
            "description": "Neighbourhoods only, when desks are loaded."
          },
          "teams": {
            "type": "array",
            "description": "Neighbourhoods only, when teams are loaded.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "locations": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          },
          "team_count": {
            "type": "integer",
            "description": "Neighbourhoods only, when teams are loaded."
          },
          "users": {
            "type": "array",
            "description": "Neighbourhoods only, when users are loaded.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email"
                }
              }
            }
          },
          "user_count": {
            "type": "integer",
            "description": "Neighbourhoods only, when users are loaded."
          }
        }
      },
      "ZoneBounds": {
        "title": "Zone Bounds",
        "type": "object",
        "description": "The bounding box of a zone's points. Every value is `0` when the zone has no points.",
        "properties": {
          "min_x": {
            "type": "number"
          },
          "max_x": {
            "type": "number"
          },
          "min_y": {
            "type": "number"
          },
          "max_y": {
            "type": "number"
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          }
        }
      },
      "ZoneKonvaFormat": {
        "title": "Zone Konva Format",
        "type": "object",
        "description": "The zone as a closed Konva `Line` shape, for rendering on the office plan.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The zone ID prefixed with `zone_`.",
            "example": "zone_2b1c6f0e-8f7a-4a51-9f3e-0c2d5b7a9e41"
          },
          "type": {
            "type": "string",
            "enum": [
              "Line"
            ]
          },
          "points": {
            "type": "array",
            "description": "The points flattened to `[x1, y1, x2, y2, ...]`.",
            "items": {
              "type": "number"
            }
          },
          "fill": {
            "type": [
              "string",
              "null"
            ]
          },
          "opacity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string with two places, for example `\"0.50\"`."
          },
          "stroke": {
            "type": [
              "string",
              "null"
            ]
          },
          "strokeWidth": {
            "type": [
              "integer",
              "null"
            ]
          },
          "closed": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "rotation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string with two places."
          },
          "scaleX": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string with four places."
          },
          "scaleY": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string with four places."
          },
          "x": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string with two places."
          },
          "y": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string with two places."
          },
          "draggable": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "listening": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "responses": {
      "UserResponse": {
        "description": "A user.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/User"
            }
          }
        }
      },
      "BookingsResponse": {
        "description": "A list of bookings.",
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Booking"
                  },
                  {
                    "$ref": "#/components/schemas/MinimisedBooking",
                    "description": "Returned if the `minimised` header is `true`."
                  }
                ]
              }
            }
          }
        }
      },
      "CurrentUserResponse": {
        "description": "The current user, or the minimised current user when the `minimised` header is `true`.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CurrentUser"
                },
                {
                  "$ref": "#/components/schemas/MinimisedCurrentUser"
                }
              ]
            }
          }
        }
      },
      "BookingResponse": {
        "description": "The booking.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Booking"
                },
                {
                  "$ref": "#/components/schemas/MinimisedBooking",
                  "description": "Returned if the `minimised` header is `true`."
                }
              ]
            }
          }
        }
      },
      "RoomResourceResponse": {
        "description": "A room resource response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RoomResource"
            }
          }
        }
      },
      "VisitorRulesResponse": {
        "description": "Your organisation's visitor rules.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VisitorRules"
            }
          }
        }
      },
      "VehicleResponse": {
        "description": "A vehicle.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Vehicle"
            }
          }
        }
      }
    },
    "parameters": {
      "minimised": {
        "name": "minimised",
        "in": "header",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        },
        "description": "Whether to return a minimised version of the resource"
      }
    },
    "requestBodies": {
      "RoomRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "name",
                "office_id"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "maxLength": 255
                },
                "capacity": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Cannot be changed on a room integrated with a calendar."
                },
                "resource_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The calendar resource identifier, for example a room mailbox address. Must not already be used by another room."
                },
                "calendar_provider_detail_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "logo_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "brand_color": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_slogan": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "office_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "An office in your organisation."
                },
                "linked_rooms": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Rooms in the same office to link to this one. Only used when creating a room."
                },
                "position_x": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 100,
                  "description": "Horizontal position on the office plan, as a percentage."
                },
                "position_y": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 100,
                  "description": "Vertical position on the office plan, as a percentage."
                },
                "absolute_x": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "description": "Horizontal position on the office plan, in plan coordinates. Validated against the plan when `position_x` and `position_y` are given."
                },
                "absolute_y": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "description": "Vertical position on the office plan, in plan coordinates."
                },
                "asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "An existing asset to use as the room's image."
                },
                "restricted_teams": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Teams in your organisation. Replaces the existing team restrictions."
                },
                "restricted_users": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Users in your organisation. Replaces the existing user restrictions."
                },
                "restricted_times": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "day_of_week",
                      "start_time",
                      "end_time"
                    ],
                    "properties": {
                      "id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid",
                        "description": "The ID of an existing restriction to update, or `null` to create a new one. The key must be present."
                      },
                      "day_of_week": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 6,
                        "description": "`0` is Sunday, `6` is Saturday."
                      },
                      "start_time": {
                        "type": "string",
                        "example": "12:00",
                        "description": "Format `H:i`."
                      },
                      "end_time": {
                        "type": "string",
                        "example": "13:00",
                        "description": "Format `H:i`."
                      },
                      "message": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  "description": "Replaces the room's restricted times: existing restrictions not in this list are deleted. Restrictions must not overlap each other or fall outside the office's working hours. Only used when updating a room."
                },
                "external_system": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 60000
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "name": "Board Room",
                  "capacity": 10,
                  "office_id": "3f2a1b0c-9d8e-4f7a-b6c5-d4e3f2a1b0c9",
                  "position_x": 48.85,
                  "position_y": 17.09,
                  "restricted_times": [
                    {
                      "id": null,
                      "day_of_week": 1,
                      "start_time": "12:00",
                      "end_time": "13:00",
                      "message": "Reserved for the weekly all-hands."
                    }
                  ],
                  "notes": "Projector remote is in the top drawer."
                }
              }
            }
          }
        },
        "description": "The body to be sent when creating or updating a room."
      },
      "RoomResourceRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string",
                  "maxLength": 255,
                  "description": "Must be unique within your organisation. For example, you cannot have two resources called \"Whiteboard\"."
                },
                "icon": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "icon_collection": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "name": "Whiteboard",
                  "icon": "chalkboard",
                  "icon_collection": null
                }
              }
            }
          }
        }
      },
      "AttributeRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 50,
                  "description": "Must be unique within your organisation."
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "When updating, send the attribute's own ID here if you are keeping its current name; otherwise the uniqueness check fails against the attribute itself."
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "name": "First Aider"
                }
              }
            }
          }
        }
      },
      "RoleRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "name",
                "scopes"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Must be unique within your organisation. When creating, it also must not match the name of a ready-made default role."
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "All scopes must be valid, and any scope that depends on others must be sent with them (see `GET /available-scopes`). When creating, at least one of these must be included: `meetings.read`, `bookings.view`, `reports.view`, `kiosk.read`, `services.provider.read`, `visitors.read.own`, `events.read`, `office.attendance.view`."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "name": "Receptionist",
                  "description": "Manages visitors and views bookings",
                  "scopes": [
                    "bookings.view",
                    "meetings.read",
                    "visitors.read"
                  ]
                }
              }
            }
          }
        }
      },
      "ServiceRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "name",
                "description",
                "provider",
                "availability",
                "roles",
                "teams",
                "users",
                "rooms",
                "chargable",
                "items"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "maxLength": 60
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255,
                  "description": "Must be present, but may be `null`."
                },
                "provider": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 60,
                  "description": "The email address of the service provider."
                },
                "availability": {
                  "type": "array",
                  "minItems": 7,
                  "maxItems": 7,
                  "description": "When the service is available: exactly one entry per weekday.",
                  "items": {
                    "type": "object",
                    "required": [
                      "weekday",
                      "from",
                      "to"
                    ],
                    "properties": {
                      "weekday": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 7,
                        "description": "Monday is 1 and Sunday is 7."
                      },
                      "from": {
                        "type": "string",
                        "example": "08:30",
                        "description": "Format `H:i`."
                      },
                      "to": {
                        "type": "string",
                        "example": "17:30",
                        "description": "Format `H:i`."
                      },
                      "all_day": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    }
                  }
                },
                "cut_off_limit_duration": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "How long before the meeting orders must be placed. If omitted, the cut-off is cleared and `cut_off_limit_period` and `allow_edit_after_cut_off` are reset."
                },
                "cut_off_limit_period": {
                  "type": "string",
                  "enum": [
                    "hours",
                    "minutes"
                  ],
                  "description": "Required in practice when `cut_off_limit_duration` is given."
                },
                "allow_edit_after_cut_off": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Required in practice when `cut_off_limit_duration` is given."
                },
                "icon": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Required in practice when updating."
                },
                "icon_collection": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Required in practice when updating."
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Must be present. Restrict the service to users with these roles."
                },
                "teams": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Must be present. Restrict the service to these teams in your organisation."
                },
                "users": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Must be present. Restrict the service to these users in your organisation."
                },
                "rooms": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Must be present. Restrict the service to meetings in these rooms in your organisation."
                },
                "chargable": {
                  "type": "boolean"
                },
                "currency_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "**Required if** `chargable` is `true`."
                },
                "asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "An existing asset to use as the service's image."
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "name",
                      "description",
                      "min_quantity",
                      "max_quantity",
                      "price"
                    ],
                    "properties": {
                      "service_item_id": {
                        "type": "string",
                        "format": "uuid",
                        "description": "When updating, the existing item to update."
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 60
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255,
                        "description": "Must be present, but may be `null`."
                      },
                      "min_quantity": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Must be present."
                      },
                      "max_quantity": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Must be present."
                      },
                      "price": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "description": "Must be present."
                      },
                      "order": {
                        "type": "integer"
                      }
                    }
                  },
                  "description": "The service's items. When updating, include `service_item_id` to update an existing item; items without it are created, and existing items left out are deleted."
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "name": "Catering",
                  "description": "Tea, coffee and pastries.",
                  "provider": "catering@example.com",
                  "availability": [
                    {
                      "weekday": 1,
                      "from": "08:30",
                      "to": "17:30",
                      "all_day": false
                    },
                    {
                      "weekday": 2,
                      "from": "08:30",
                      "to": "17:30",
                      "all_day": false
                    },
                    {
                      "weekday": 3,
                      "from": "08:30",
                      "to": "17:30",
                      "all_day": false
                    },
                    {
                      "weekday": 4,
                      "from": "08:30",
                      "to": "17:30",
                      "all_day": false
                    },
                    {
                      "weekday": 5,
                      "from": "08:30",
                      "to": "17:30",
                      "all_day": false
                    },
                    {
                      "weekday": 6,
                      "from": "00:00",
                      "to": "00:00",
                      "all_day": false
                    },
                    {
                      "weekday": 7,
                      "from": "00:00",
                      "to": "00:00",
                      "all_day": false
                    }
                  ],
                  "cut_off_limit_duration": 2,
                  "cut_off_limit_period": "hours",
                  "allow_edit_after_cut_off": false,
                  "icon": "mug-hot",
                  "icon_collection": null,
                  "roles": [],
                  "teams": [],
                  "users": [],
                  "rooms": [],
                  "chargable": true,
                  "currency_id": "1bf3ddf9-0de3-47ba-89da-fa44cbd050e7",
                  "asset_id": null,
                  "items": [
                    {
                      "name": "Coffee (per person)",
                      "description": null,
                      "min_quantity": 1,
                      "max_quantity": 20,
                      "price": 2.5,
                      "order": 1
                    },
                    {
                      "name": "Pastry platter",
                      "description": "Serves eight.",
                      "min_quantity": 0,
                      "max_quantity": 3,
                      "price": 18,
                      "order": 2
                    }
                  ]
                }
              }
            }
          }
        },
        "description": "The body to be sent when creating or updating a service."
      },
      "UserRequestBody": {
        "description": "Fields for updating the current user. This is a full replacement: omitted fields are cleared or reset, as described on each field. `mobile_number` is the exception: it is unchanged if omitted. If `meeting_settings` is sent and differs from the stored value, only `meeting_settings`, `delegates_can_create_meetings` and `delegates_can_edit_meetings` are saved, but `first_name` and `email` are still validated.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "first_name",
                "email"
              ],
              "properties": {
                "first_name": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 255
                },
                "last_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Not validated. Cleared if omitted."
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 255,
                  "description": "Must not be used by another user."
                },
                "office_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The user's default office. Cleared if omitted."
                },
                "mobile_number": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 40,
                  "description": "Unchanged if omitted. Send `null` to clear it."
                },
                "locale": {
                  "$ref": "#/components/schemas/UserLocale"
                },
                "notify_booking_check_in_reminder": {
                  "type": "boolean",
                  "description": "Not validated. Defaults to `true` if omitted."
                },
                "notify_parking_check_in_reminder": {
                  "type": "boolean",
                  "description": "Unchanged if omitted."
                },
                "notify_staff_desk_bookings": {
                  "type": "boolean",
                  "description": "Defaults to `false` if omitted."
                },
                "notify_staff_parking_bookings": {
                  "type": "boolean",
                  "description": "Unchanged if omitted."
                },
                "notify_staff_meeting_bookings": {
                  "type": "boolean",
                  "description": "Defaults to `false` if omitted."
                },
                "notify_staff_cancelled_desk_bookings": {
                  "type": "boolean",
                  "description": "Defaults to `false` if omitted."
                },
                "notify_staff_cancelled_parking_bookings": {
                  "type": "boolean",
                  "description": "Unchanged if omitted."
                },
                "notify_staff_cancelled_meeting_bookings": {
                  "type": "boolean",
                  "description": "Defaults to `false` if omitted."
                },
                "delegates_can_create_meetings": {
                  "type": "boolean",
                  "description": "Unchanged if omitted."
                },
                "delegates_can_edit_meetings": {
                  "type": "boolean",
                  "description": "Unchanged if omitted."
                },
                "meeting_settings": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UserMeetingPageSettings"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "first_name": "Jane",
                  "last_name": "Example",
                  "email": "jane.example@example.com",
                  "office_id": "9a4c82e6-3141-414d-837a-374a96fa0137",
                  "mobile_number": "+44 7700 900123",
                  "locale": "en-GB",
                  "notify_booking_check_in_reminder": true,
                  "notify_staff_desk_bookings": false,
                  "notify_staff_meeting_bookings": false,
                  "notify_staff_cancelled_desk_bookings": false,
                  "notify_staff_cancelled_meeting_bookings": false
                }
              }
            }
          }
        }
      },
      "ReportRequestBody": {
        "description": "A new report. The shape of `fields` depends on `type`.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "type",
                "name",
                "description",
                "fields",
                "schedule"
              ],
              "properties": {
                "type": {
                  "$ref": "#/components/schemas/ReportType"
                },
                "name": {
                  "type": "string",
                  "maxLength": 255
                },
                "description": {
                  "type": "string",
                  "maxLength": 255
                },
                "fields": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ReportRoomFields"
                    },
                    {
                      "$ref": "#/components/schemas/ReportDeskFields"
                    },
                    {
                      "$ref": "#/components/schemas/ReportExternalAttendeeFields"
                    }
                  ],
                  "description": "Use `ReportRoomFields` for `room`, `ReportDeskFields` for `desk` and `parking_space`, and `ReportExternalAttendeeFields` for `external_attendees`. Only the external attendee fields are validated."
                },
                "schedule": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ReportScheduleInput"
                    }
                  ],
                  "description": "Send `{\"type\": \"no_schedule\"}` for no schedule. `type` must be present."
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "description": "Where scheduled reports are sent. Ignored for `external_attendees`, which uses the first recipient instead."
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "type": "room",
                  "name": "Weekly room usage",
                  "description": "Meetings in all rooms",
                  "email": "facilities@example.com",
                  "fields": {
                    "building_name": true,
                    "office_name": true,
                    "room_name": true,
                    "meeting_subject": true,
                    "meeting_start_time": true,
                    "meeting_end_time": true,
                    "meeting_private": false,
                    "organiser": true,
                    "custom_fields": false
                  },
                  "schedule": {
                    "type": "day_of_week",
                    "day_of_week": 1,
                    "time_to_execute": "08:00"
                  }
                }
              }
            }
          }
        }
      },
      "DeviceSettingsRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "allow_walk_in",
                "allow_end_meetings",
                "confirm_meetings",
                "display_mode_only"
              ],
              "properties": {
                "allow_end_meetings": {
                  "type": "boolean",
                  "description": "Whether or not the device is allowed to end in-progress meetings.\n\nOpenSpaces meetings **cannot** be ended early."
                },
                "allow_walk_in": {
                  "type": "boolean",
                  "description": "Whether the device is allowed to create short \"walk-in\" meetings."
                },
                "brand_color": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 200,
                  "description": "Display App brand colour."
                },
                "confirm_meetings": {
                  "type": "boolean",
                  "description": "Whether or not the device can confirm upcoming meetings."
                },
                "contactless_walk_in": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether or not the device displays a QR code, to allow short \"walk-in\" meetings without touching the screen.\n\nDefaults to `false` if omitted."
                },
                "device_background_color": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 200,
                  "example": "#ABCDEF",
                  "description": "The background colour of the device. Can be a hex code or a linear-gradient. Only valid if the `interface_version` is 2 or 3."
                },
                "device_background_image_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "The ID of a background image to use on the Display App. Only valid if the `interface_version` is 2 or 3."
                },
                "display_app_logo_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "The ID of an existing asset to use as the Display App logo."
                },
                "display_mode_only": {
                  "type": "boolean",
                  "description": "Whether the device should only display meetings, with no actions available.\n\nIf set to `true`, this will automatically set `allow_walk_in`, `allow_end_meetings`, and `confirm_meetings` to `false`."
                },
                "display_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "display_slogan": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "eco_mode": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the device goes into \"eco-mode\" outside working hours and during its room's restricted times.\n\nIn eco-mode, a black screen will be displayed, and the LEDs will turn off (LED-supported devices only).\n\nPressing the screen when in eco-mode will show the app as normal for a few minutes, and turn the LEDs back on (LED-supported devices only).\n\nDefaults to `false` if omitted."
                },
                "font_color": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 200,
                  "description": "The colour of the font to use on the Display App. Only valid if the `interface_version` is 2 or 3."
                },
                "gilt_accent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 20
                },
                "hide_description": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the device should hide the description of all meetings in its room.\n\nThis does not apply to private meetings or OpenSpaces meetings, where the description is hidden by default."
                },
                "hide_organiser": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the device should hide the organiser of all meetings in its room.\n\nThis does not apply to OpenSpaces meetings, where the organiser is hidden by default."
                },
                "hide_subject": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the device should hide the subject of all meetings in its room.\n\nThis does not apply to private meetings or OpenSpaces meetings, where the subject is hidden by default."
                },
                "interface_version": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "The version of the interface to use on the display app.\n\nFor devices with versions of the app before 3.0.0, this cannot be set.\n\nFor devices with version 3.0.0 or newer, choose 1 to visually match the legacy app.\n\nTo use the new app design:\n - For devices oriented in landscape use `2`\n - For devices oriented in portrait use `3`\n\nMust be an interface version offered by an active Display App theme."
                },
                "logo_letter": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 3
                },
                "logo_style": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "monogram",
                    "upload",
                    null
                  ]
                },
                "pin": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "1234",
                  "pattern": "^\\d{4}$",
                  "minLength": 4,
                  "maxLength": 4,
                  "description": "A 4-digit numeric PIN with which to protect the app's settings screen.\n\nIf `null`, anyone near the device will be able to access its settings screen."
                },
                "qr_accent_color": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 20
                },
                "qr_expiry_amount": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 1,
                  "maximum": 999
                },
                "qr_expiry_unit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "days",
                    "weeks",
                    "months",
                    "years",
                    null
                  ]
                },
                "qr_footer_text": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 1000
                },
                "qr_room_photo_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "The ID of an asset in your organisation."
                },
                "show_clearooms_branding": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Defaults to `true` if omitted."
                },
                "slack_integration_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri",
                  "deprecated": true
                },
                "status_style": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "bold",
                    "max",
                    "subtle",
                    null
                  ],
                  "description": "`null` is stored as `subtle`."
                },
                "wordmark_company": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "wordmark_tagline": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                }
              }
            },
            "examples": {
              "Example": {
                "value": {
                  "allow_walk_in": true,
                  "allow_end_meetings": true,
                  "confirm_meetings": true,
                  "display_mode_only": false,
                  "contactless_walk_in": false,
                  "eco_mode": true,
                  "hide_subject": false,
                  "hide_description": true,
                  "hide_organiser": false,
                  "interface_version": 2,
                  "pin": "4821",
                  "status_style": "subtle"
                }
              }
            }
          }
        },
        "description": "Display App device settings. Fields you omit are not changed, except the defaults noted on `contactless_walk_in`, `eco_mode` and `show_clearooms_branding`. If `display_mode_only` is `true`, `allow_walk_in`, `allow_end_meetings` and `confirm_meetings` are saved as `false`.\n\nFor room and device settings, a branding value (`brand_color`, `display_name`, `display_slogan`, `display_app_logo_asset_id`) equal to the value inherited from the level above is saved as `null`, so it keeps following that level."
      }
    }
  },
  "tags": [
    {
      "name": "Activity",
      "description": "Activity logging"
    },
    {
      "name": "Approvals",
      "description": "Booking and meeting approval workflow: who approves, exceptions, automatic actions and approving or declining."
    },
    {
      "name": "Assets",
      "description": "Uploaded files, such as office floorplans and avatars"
    },
    {
      "name": "Bookings",
      "description": "Managing desk bookings"
    },
    {
      "name": "Deliveries",
      "description": "Log parcels and mark them collected."
    },
    {
      "name": "Desks",
      "description": "Operations related to bookable desks or spaces"
    },
    {
      "name": "Display App",
      "description": "Operations related to the Clearooms Display App"
    },
    {
      "name": "Evacuations",
      "description": "Start and end evacuations and read the live roll call."
    },
    {
      "name": "Events",
      "description": "Office events that users can book onto."
    },
    {
      "name": "General",
      "description": "General operations"
    },
    {
      "name": "Meetings",
      "description": "Managing meeting room bookings"
    },
    {
      "name": "Offices",
      "description": "Operations related to managing offices"
    },
    {
      "name": "Parking",
      "description": "Vehicles, pool cars and parking permits."
    },
    {
      "name": "Reports",
      "description": "Operations related to reports"
    },
    {
      "name": "Rooms",
      "description": "Operations related to meeting rooms"
    },
    {
      "name": "Settings",
      "description": "Organisation-wide settings, such as organisation details, booking limits and working hours."
    },
    {
      "name": "Shifts",
      "description": "Shift groups and the shifts within them (for example morning and afternoon) that desk bookings can be made against. Shift groups can be shared across the organisation or set per office."
    },
    {
      "name": "Staff sign-in",
      "description": "Staff presence: the staff directory, recording attendance from back-office systems, and members signing themselves in and out."
    },
    {
      "name": "Teams",
      "description": "Management of teams"
    },
    {
      "name": "Users",
      "description": "User and access control"
    },
    {
      "name": "Visitors",
      "description": "Visitor management"
    }
  ],
  "security": [
    {
      "Bearer": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Bookings",
      "tags": [
        "Bookings",
        "Meetings",
        "Approvals",
        "Events"
      ]
    },
    {
      "name": "ArrivalsHQ",
      "tags": [
        "Visitors",
        "Staff sign-in",
        "Deliveries",
        "Evacuations"
      ]
    },
    {
      "name": "Workplace",
      "tags": [
        "Offices",
        "Desks",
        "Rooms",
        "Assets",
        "Parking",
        "Shifts"
      ]
    },
    {
      "name": "People",
      "tags": [
        "Users",
        "Teams"
      ]
    },
    {
      "name": "Devices",
      "tags": [
        "Display App"
      ]
    },
    {
      "name": "Insights",
      "tags": [
        "Reports",
        "Activity"
      ]
    },
    {
      "name": "General",
      "tags": [
        "General",
        "Settings"
      ]
    }
  ]
}