{
  "openapi": "3.0.0",
  "paths": {
    "/crm": {
      "get": {
        "operationId": "search",
        "parameters": [
          {
            "name": "searchTerm",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "contactCompanyId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attendeeIds",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "pipelineId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stageId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "firstName",
                "lastName",
                "email",
                "createdAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Hard ceiling, not just a default. Unbounded, this is `.take(limit)` on a\ntwo-join query over every contact the company has — an export primitive\nand a memory risk on a route that is otherwise cheap.\n\n1000, not the dashboard's 100: the mobile app fetches its whole contact\nlist in one call (`contactService.getContacts` sends `limit=1000`) and\nships through the app stores on a manual release cadence, so installed\nclients cannot be updated in lockstep with the API. It is the same\nboundary `POST /crm/bulk` already uses for a batch.",
            "schema": {
              "minimum": 1,
              "maximum": 1000,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedContacts"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createContact",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Create a new contact",
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/{id}": {
      "patch": {
        "operationId": "updateContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/details": {
      "get": {
        "operationId": "getContactDetails",
        "parameters": [
          {
            "name": "contactId",
            "required": false,
            "in": "query",
            "description": "Both columns are `uuid`, so an unvalidated value reached Postgres and came\nback as `QueryFailedError` — a 500 for what is plainly a bad request.\n\nThe \"at least one of them\" rule lives in `CrmService.getContactDetails`\nrather than here: a cross-field constraint hung off an `@IsOptional()`\nproperty never runs in the one case it exists to catch, because\n`@IsOptional()` skips every other validator on an absent value.",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "name": "attendeeId",
            "required": false,
            "in": "query",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get a contact by ID or attendee ID with all its data including form submissions",
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/bulk": {
      "post": {
        "operationId": "bulkCreateContacts",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCreateContactsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkCreateResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Bulk create contacts from CSV import\nThrottled to prevent abuse - max 3 requests per minute per user",
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/bulk-delete": {
      "post": {
        "operationId": "bulkDeleteContacts",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteContactsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkDeleteResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Bulk delete contacts. Only contacts belonging to the requesting user's\ncompany are removed; the result reports how many were deleted vs\nskipped so the UI can surface partial failures.\nThrottled tightly — destructive action, max 3 requests per minute.",
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/pipelines": {
      "get": {
        "operationId": "list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PipelineDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePipelineDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/pipelines/default": {
      "get": {
        "operationId": "getDefault",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/pipelines/{id}": {
      "get": {
        "operationId": "get",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePipelineDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/pipelines/{pipelineId}/stages": {
      "post": {
        "operationId": "addStage",
        "parameters": [
          {
            "name": "pipelineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePipelineStageDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineStageDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/pipelines/{pipelineId}/stages/reorder": {
      "patch": {
        "operationId": "reorderStages",
        "parameters": [
          {
            "name": "pipelineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderStagesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PipelineStageDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/pipelines/{pipelineId}/stages/{stageId}": {
      "patch": {
        "operationId": "updateStage",
        "parameters": [
          {
            "name": "pipelineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stageId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePipelineStageDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineStageDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteStage",
        "parameters": [
          {
            "name": "pipelineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stageId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "moveToStageId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Pipelines"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/settings/custom-fields": {
      "get": {
        "operationId": "getCustomFields",
        "parameters": [
          {
            "name": "recordType",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "deal",
                "company"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCustomFieldsDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "The custom field definitions for one CRM record type.\n\n`recordType` defaults to `deal` so callers written before companies had\nfields — including a web bundle a browser is still holding — keep getting\nthe list they asked for.",
        "tags": [
          "CRM Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "put": {
        "operationId": "updateCustomFields",
        "parameters": [
          {
            "name": "recordType",
            "required": false,
            "in": "query",
            "schema": {
              "enum": [
                "deal",
                "company"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCrmCustomFieldsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCustomFieldsDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Replace the custom field definitions for one CRM record type.",
        "tags": [
          "CRM Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/settings/lost-reasons": {
      "get": {
        "operationId": "getLostReasons",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCloseReasonSettingsDto"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "put": {
        "operationId": "updateLostReasons",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrmCloseReasonSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCloseReasonSettingsDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/merge": {
      "post": {
        "operationId": "merge",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergeDealsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/duplicate-candidates": {
      "get": {
        "operationId": "duplicateCandidates",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "The deals that look like duplicates of this one.\n\nRead-only and merges nothing: the operator still picks. Offering the\ncandidates is the whole difference between a merge you use and a merge you\nhave to already know you need.",
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/contact-suggestions": {
      "get": {
        "operationId": "contactSuggestions",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Contacts this deal is probably about, when none is linked yet.\n\nRead-only and links nothing — the operator confirms, because a wrong link\nmoves a stranger's email and meetings onto the deal.",
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDealDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "findAll",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pipelineId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stageId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crmCompanyId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isOpen",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "isWon",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "isLost",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "value",
                "expectedCloseDate",
                "createdAt",
                "updatedAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealListDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/bulk-import": {
      "post": {
        "operationId": "bulkImport",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkImportDealsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkImportDealsResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Bulk \"import into pipeline\": upsert contacts and create one deal per row.\nThrottled generously so a chunked multi-batch import can complete.",
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/summary": {
      "get": {
        "operationId": "getSummary",
        "parameters": [
          {
            "name": "ownerId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pipelineId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealSummaryDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/limits": {
      "get": {
        "operationId": "getLimits",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/pipeline/{pipelineId}": {
      "get": {
        "operationId": "getByPipeline",
        "parameters": [
          {
            "name": "pipelineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/pipeline/{pipelineId}/grouped": {
      "get": {
        "operationId": "getByPipelineGrouped",
        "parameters": [
          {
            "name": "pipelineId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Optimized endpoint for kanban view - returns deals grouped by stage in a single request.\nThis eliminates the need for multiple paginated calls when loading the kanban board.",
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}": {
      "get": {
        "operationId": "findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDealDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/won": {
      "patch": {
        "operationId": "markAsWon",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkDealAsWonDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/lost": {
      "patch": {
        "operationId": "markAsLost",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkDealAsLostDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/reopen": {
      "patch": {
        "operationId": "reopen",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReopenDealDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/contacts": {
      "get": {
        "operationId": "getContacts",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DealContactDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "addContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDealContactDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealContactDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/contacts/{dealContactId}": {
      "patch": {
        "operationId": "updateContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dealContactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDealContactDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealContactDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "removeContact",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dealContactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/activity": {
      "get": {
        "operationId": "getActivity",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": true,
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DealActivityDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{id}/appointments": {
      "get": {
        "operationId": "getAppointments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Deals"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCrmCompanyDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCompanyDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "findAll",
        "parameters": [
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1-10",
                "11-50",
                "51-200",
                "201-500",
                "501-1000",
                "1001+"
              ]
            }
          },
          {
            "name": "ownerId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "createdAt",
                "updatedAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCompanyListDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/summary": {
      "get": {
        "operationId": "getSummary",
        "parameters": [
          {
            "name": "ownerId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCompanySummaryDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/by-domain/{domain}": {
      "get": {
        "operationId": "findByDomain",
        "parameters": [
          {
            "name": "domain",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/{id}/meeting-history": {
      "get": {
        "operationId": "meetingHistory",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/{id}": {
      "get": {
        "operationId": "findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCompanyDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCrmCompanyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCompanyDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/{id}/contacts": {
      "get": {
        "operationId": "getContacts",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/{id}/deals": {
      "get": {
        "operationId": "getDeals",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Companies"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/contacts/{contactId}/activity": {
      "get": {
        "operationId": "getActivity",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "types",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "meeting",
                  "email",
                  "form",
                  "note",
                  "task",
                  "communication",
                  "conversation"
                ]
              }
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 50,
              "default": 30,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactActivityResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Contacts"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/availability": {
      "get": {
        "operationId": "getAllAvailabilities",
        "parameters": [
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailabilityDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      },
      "post": {
        "operationId": "createAvailability",
        "parameters": [
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAvailabilityDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      }
    },
    "/availability/many": {
      "get": {
        "operationId": "getManyAvailabilities",
        "parameters": [
          {
            "name": "userIds",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailabilityPerUserDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get many user's availability at once",
        "tags": [
          "availability"
        ]
      }
    },
    "/availability/bulk-holidays": {
      "post": {
        "operationId": "bulkHolidayExceptions",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkHolidayExceptionsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Holidays applied to multiple users"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      }
    },
    "/availability/{id}/meeting-types": {
      "get": {
        "operationId": "getMeetingTypesForAvailability",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      }
    },
    "/availability/{id}/apply-to-users": {
      "post": {
        "operationId": "applyAvailabilityToUsers",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyAvailabilityToUsersDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Availability applied to users"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      }
    },
    "/availability/{id}": {
      "get": {
        "operationId": "getAvailabilityById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      },
      "patch": {
        "operationId": "updateAvailability",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAvailabilityDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      },
      "delete": {
        "operationId": "deleteAvailability",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      }
    },
    "/availability/default/{availabilityId}": {
      "post": {
        "operationId": "setDefaultAvailability",
        "parameters": [
          {
            "name": "availabilityId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      }
    },
    "/availability/{id}/holiday-exceptions": {
      "patch": {
        "operationId": "createHolidayExpections",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateHolidayExpectionsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailabilityExceptionDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "tags": [
          "availability"
        ]
      }
    },
    "/availability-exception/user": {
      "post": {
        "operationId": "createUserException",
        "parameters": [
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAvailabilityExceptionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityExceptionDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create user availability exception",
        "tags": [
          "availability-exception"
        ]
      },
      "get": {
        "operationId": "getUserExceptions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailabilityExceptionDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Gets user availability exceptions",
        "tags": [
          "availability-exception"
        ]
      }
    },
    "/availability-exception/{id}": {
      "put": {
        "operationId": "updateAvailabilityException",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAvailabilityExceptionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityExceptionDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update user availability exception",
        "tags": [
          "availability-exception"
        ]
      },
      "delete": {
        "operationId": "deleteAvailabilityException",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete availability exception",
        "tags": [
          "availability-exception"
        ]
      }
    },
    "/availability-exception/company": {
      "post": {
        "operationId": "createCompanyException",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAvailabilityExceptionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityExceptionDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create company availability exception",
        "tags": [
          "availability-exception"
        ]
      },
      "get": {
        "operationId": "getCompanyExceptions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailabilityExceptionDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Gets company availability exceptions",
        "tags": [
          "availability-exception"
        ]
      }
    },
    "/v4/whatsapp/ping": {
      "get": {
        "description": "Lightweight authenticated check that your API key works and the WhatsApp add-on is active.",
        "operationId": "ping",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The API key is valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "API Platform subscription or WhatsApp add-on missing."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Connection test",
        "tags": [
          "WhatsApp V4"
        ]
      }
    },
    "/v4/whatsapp/messages": {
      "post": {
        "description": "Sends a text, template, or media message addressed by phone number. The conversation is created or reused automatically. Free-form text and media require an open 24-hour customer-service window (since the contact last messaged you); approved templates can be sent anytime. Outside the window, text/media return 403 — send a template to re-engage.",
        "operationId": "sendMessage",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendWhatsappMessageV4Dto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Message accepted by WhatsApp.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappMessageResource"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "WhatsApp add-on missing, or the 24h window is closed for a text/media send."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Send a WhatsApp message",
        "tags": [
          "WhatsApp V4"
        ]
      },
      "get": {
        "description": "Forward feed of messages created after `since`, oldest first. A fallback for callers that cannot host a webhook. Track the returned `nextSince` and pass it back to advance. Defaults to inbound only. `since` is millisecond-granular; for guaranteed no-skip delivery prefer the `whatsapp_message_received` webhook.",
        "operationId": "pollMessages",
        "parameters": [
          {
            "name": "since",
            "required": true,
            "in": "query",
            "description": "ISO 8601 timestamp. Returns messages strictly after it.",
            "schema": {
              "example": "2026-06-25T10:00:00.000Z",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "description": "Defaults to `inbound`. Use `all` for both directions.",
            "schema": {
              "enum": [
                "inbound",
                "outbound",
                "all"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappMessageFeedResource"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Poll for messages",
        "tags": [
          "WhatsApp V4"
        ]
      }
    },
    "/v4/whatsapp/templates": {
      "get": {
        "description": "Returns the WhatsApp message templates configured for your number. Use an APPROVED template’s `name`, `language`, and `variableCount` to send it via POST /messages with `type: \"template\"`.",
        "operationId": "listTemplates",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateListResource"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "List message templates",
        "tags": [
          "WhatsApp V4"
        ]
      }
    },
    "/v4/whatsapp/conversations": {
      "get": {
        "description": "Lists conversations newest-first (cursor-paginated), or returns the single conversation for an exact `phone` match.",
        "operationId": "listConversations",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "required": false,
            "in": "query",
            "description": "Return only the conversation for this exact number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Defaults to `all` for the API (both open and archived).",
            "schema": {
              "enum": [
                "open",
                "done",
                "all"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappConversationListResource"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "List conversations",
        "tags": [
          "WhatsApp V4"
        ]
      }
    },
    "/v4/whatsapp/conversations/{id}": {
      "get": {
        "operationId": "getConversation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappConversationResource"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Not found."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get a conversation",
        "tags": [
          "WhatsApp V4"
        ]
      }
    },
    "/v4/whatsapp/conversations/{id}/messages": {
      "get": {
        "description": "Newest-first, cursor-paginated.",
        "operationId": "listMessages",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappMessageListResource"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "List messages in a conversation",
        "tags": [
          "WhatsApp V4"
        ]
      }
    },
    "/v4/signatures/ping": {
      "get": {
        "description": "Lightweight authenticated check that your API key works and e-signatures are reachable.",
        "operationId": "ping",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The API key is valid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Connection test",
        "tags": [
          "Signatures V4"
        ]
      }
    },
    "/v4/signatures/usage": {
      "get": {
        "description": "Signatures collected this calendar month against your plan allowance, across every route (form links, recipient links and the signing page). `limit: -1` means unlimited.",
        "operationId": "usage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Current month usage."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "This month’s signature usage",
        "tags": [
          "Signatures V4"
        ]
      }
    },
    "/v4/signatures": {
      "post": {
        "description": "Uploads a PDF, places signer-owned signature/text fields on it using normalized (0–1) coordinates, and returns one hosted signing link per signer. Requests support one to ten parallel signers. Every field must name its signer key when more than one signer is present. Completed artifacts are certificate-sealed after hardening is enabled. Each signer can receive the request by SMS or WhatsApp, or use the returned signing link.",
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSignatureRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Signature request created with its signer links.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignatureRequestResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Requires an active API Platform subscription."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create a signature request",
        "tags": [
          "Signatures V4"
        ]
      },
      "get": {
        "description": "Returns the 50 most recently created signature requests for the authenticated company.",
        "operationId": "list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SignatureRequestResponseDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "List signature requests",
        "tags": [
          "Signatures V4"
        ]
      }
    },
    "/v4/signatures/{id}/signers/{signerId}/send": {
      "post": {
        "description": "Retries the SMS or WhatsApp channel stored for this signer and returns the latest delivery outcome.",
        "operationId": "resendInvitation",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signerId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignatureRequestResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignatureRequestResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Resend a signer invitation",
        "tags": [
          "Signatures V4"
        ]
      }
    },
    "/v4/signatures/{id}": {
      "get": {
        "description": "Returns the request status, each signer’s state, and — once completed — a time-limited download URL for the signed PDF.",
        "operationId": "getOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignatureRequestResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Not found."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get a signature request",
        "tags": [
          "Signatures V4"
        ]
      },
      "delete": {
        "description": "Cancels a pending request. Its signing links stop working. Completed requests cannot be cancelled.",
        "operationId": "cancel",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignatureRequestResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Cancel a signature request",
        "tags": [
          "Signatures V4"
        ]
      }
    },
    "/v4/signatures/{id}/document": {
      "get": {
        "description": "Returns a time-limited URL to download the signed, audit-paged PDF. Only available once the request is completed.",
        "operationId": "getDocument",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A `{ url }` to the signed PDF."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The request is not completed yet."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Download the signed document",
        "tags": [
          "Signatures V4"
        ]
      }
    },
    "/data-field/option-image": {
      "post": {
        "operationId": "uploadOptionImage",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Upload an option-card image; returns a stable public URL to store in\n`options[].image`. Replaces the base64 data-URL workaround that bloated\nthe options jsonb.",
        "tags": [
          "Data Fields"
        ]
      }
    },
    "/data-field": {
      "get": {
        "operationId": "getDataFields",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataField"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Get all data fields",
        "tags": [
          "Data Fields"
        ]
      },
      "post": {
        "operationId": "addFormField",
        "parameters": [
          {
            "name": "personal",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataFieldDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataField"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Add a new data field",
        "tags": [
          "Data Fields"
        ]
      }
    },
    "/data-field/reorder": {
      "patch": {
        "operationId": "reorderDataFields",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderDataFieldsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Set the order the fields are read in. Declared before `PATCH :fieldId` so\nNest does not resolve `reorder` as a field id.",
        "tags": [
          "Data Fields"
        ]
      }
    },
    "/data-field/{fieldId}": {
      "patch": {
        "operationId": "updateFormField",
        "parameters": [
          {
            "name": "fieldId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataFieldDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Update data field",
        "tags": [
          "Data Fields"
        ]
      },
      "delete": {
        "operationId": "deleteFormField",
        "parameters": [
          {
            "name": "fieldId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Remove a data field",
        "tags": [
          "Data Fields"
        ]
      }
    },
    "/data-field/{fieldId}/usage": {
      "get": {
        "operationId": "getDataFieldUsage",
        "parameters": [
          {
            "name": "fieldId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "List every form (within the user's company) that currently references this\nDataField. Used by the field editor to surface \"Used in N forms\" so users\nunderstand the blast radius of an edit.",
        "tags": [
          "Data Fields"
        ]
      }
    },
    "/space": {
      "post": {
        "operationId": "createSpace",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "get": {
        "operationId": "getSpaces",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Space"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/templates": {
      "get": {
        "operationId": "getTemplates",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Space"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Create a portal with Mira from the operator's brief + client context.\n Generates a tailored layout via the EU gateway; falls back to the\n localized client-portal preset when the gateway is off or the model\n returns nothing usable, so the client context always lands.",
        "tags": [
          "space"
        ]
      }
    },
    "/space/from-template": {
      "post": {
        "operationId": "createFromTemplate",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceFromTemplateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "A working portal from a template, for a client. One transactional copy:\nsections, blocks and content references, progress cleared, the previous\nclient's name and brand swapped for the new one's.",
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}": {
      "get": {
        "operationId": "getSpace",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "patch": {
        "operationId": "updateSpace",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpaceDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "delete": {
        "operationId": "deleteSpace",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/publish": {
      "post": {
        "operationId": "publishSpace",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/duplicate": {
      "post": {
        "operationId": "duplicateSpace",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloneSpaceDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "A same-client copy of a space, \"(Copy)\" suffixed.",
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/save-as-template": {
      "post": {
        "operationId": "saveSpaceAsTemplate",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloneSpaceDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Snapshot a space as a reusable template (listed under GET /space/templates).",
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/section": {
      "post": {
        "operationId": "createSection",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceSectionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSection"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/section-from-template": {
      "post": {
        "operationId": "insertSectionFromTemplate",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsertSectionFromTemplateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSection"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Insert a saved section template, with all its blocks, in one go.",
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/section/{sectionId}": {
      "patch": {
        "operationId": "updateSection",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sectionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpaceSectionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSection"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "delete": {
        "operationId": "deleteSection",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sectionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/section/{sectionId}/block": {
      "post": {
        "operationId": "createBlock",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sectionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceBlockDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceBlock"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/section/{sectionId}/block/{blockId}": {
      "patch": {
        "operationId": "updateBlock",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sectionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "blockId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpaceBlockDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceBlock"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "delete": {
        "operationId": "deleteBlock",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sectionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "blockId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/link": {
      "get": {
        "operationId": "getLinks",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpaceLink"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "post": {
        "operationId": "createLink",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceLinkDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceLink"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/link/{linkId}": {
      "patch": {
        "operationId": "updateLink",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpaceLinkDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceLink"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "delete": {
        "operationId": "archiveLink",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/form-status": {
      "get": {
        "operationId": "getFormStatus",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceFormStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Every form block in the space and the submissions that came in through\n it: whether the viewer handed it in, when, and the answers.",
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/uploads": {
      "get": {
        "operationId": "listUploads",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/uploads/{uploadId}/download": {
      "get": {
        "operationId": "getUploadDownloadUrl",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uploadId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/people": {
      "get": {
        "operationId": "listPeople",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "post": {
        "operationId": "invite",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteSpacePersonDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space/{spaceId}/people/{inviteId}": {
      "delete": {
        "operationId": "removeInvite",
        "parameters": [
          {
            "name": "spaceId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inviteId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space-section-template": {
      "get": {
        "operationId": "list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpaceSectionTemplate"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      },
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceSectionTemplateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSectionTemplate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/space-section-template/from-section": {
      "post": {
        "operationId": "createFromSection",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSectionTemplateFromSectionDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSectionTemplate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "summary": "Snapshot a live section of one of your spaces as a reusable template.",
        "tags": [
          "space"
        ]
      }
    },
    "/space-section-template/{templateId}": {
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ],
        "tags": [
          "space"
        ]
      }
    },
    "/invoicing/products": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Products"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "findAll",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Products"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/products/{id}": {
      "get": {
        "operationId": "findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Products"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Products"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "archive",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Products"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/settings": {
      "get": {
        "operationId": "getForCompany",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicingSettings"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "put": {
        "operationId": "upsert",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInvoicingSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicingSettings"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/bank-accounts": {
      "get": {
        "operationId": "list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvoicingBankAccount"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBankAccountDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicingBankAccount"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/bank-accounts/{id}": {
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBankAccountDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicingBankAccount"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/buyer-prefill/company/{crmCompanyId}": {
      "get": {
        "operationId": "fromCompany",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Buyer fields for an invoice, taken from a CRM company",
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/buyer-prefill/company/{crmCompanyId}/contacts": {
      "get": {
        "operationId": "contactsOf",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Contacts of a CRM company, for the buyer picker",
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/number-ranges": {
      "get": {
        "operationId": "listNumberRanges",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "",
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/number-ranges/{kind}": {
      "put": {
        "operationId": "updateNumberRange",
        "parameters": [
          {
            "name": "kind",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNumberRangeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberRange"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "",
        "tags": [
          "Invoicing Settings"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSalesDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "findAll",
        "parameters": [
          {
            "name": "kind",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "offer",
                "order_confirmation",
                "invoice",
                "credit_note",
                "cancellation"
              ]
            }
          },
          {
            "name": "kinds",
            "required": false,
            "in": "query",
            "description": "Comma-separated document kinds; overrides `kind`",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "finalized",
                "sent",
                "partially_paid",
                "paid",
                "cancelled",
                "accepted",
                "rejected"
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "default": 1,
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 50,
              "default": 25,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}": {
      "get": {
        "operationId": "findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSalesDocumentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "deleteDraft",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/finalize": {
      "post": {
        "operationId": "finalize",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinalizeSalesDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/send": {
      "post": {
        "operationId": "send",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSalesDocumentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/send-whatsapp": {
      "post": {
        "operationId": "sendWhatsapp",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendSalesDocumentWhatsappDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "WhatsApp template delivery; the message links to the hosted pay page",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/duplicate": {
      "post": {
        "operationId": "duplicate",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/convert-to-invoice": {
      "post": {
        "operationId": "convertToInvoice",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/offer-status": {
      "post": {
        "operationId": "setOfferStatus",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfferStatusDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/cancel": {
      "post": {
        "operationId": "cancel",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/events": {
      "get": {
        "operationId": "events",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SalesDocumentEvent"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/preview": {
      "get": {
        "operationId": "preview",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/download/{type}": {
      "get": {
        "operationId": "download",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/payments": {
      "get": {
        "operationId": "listPayments",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentPayment"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "recordPayment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordPaymentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentPayment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/payments/{paymentId}": {
      "delete": {
        "operationId": "deletePayment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/payment-link": {
      "get": {
        "operationId": "paymentLink",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Hosted pay-page URL for finalized invoices (copy button in the UI)",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/dunning-pause": {
      "post": {
        "operationId": "setDunningPause",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDunningStateDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Exclude/include this invoice from dunning auto-send",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/credit-note": {
      "post": {
        "operationId": "createFromInvoice",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCreditNoteDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Invoice → editable Gutschrift draft over all or selected lines",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/credit-notes": {
      "get": {
        "operationId": "creditSummary",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCreditSummaryDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "How much of an invoice is already credited, and what is still open",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/credit-notes/{id}/issue": {
      "post": {
        "operationId": "issueCreditNote",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Gutschrift draft → issued document + receivable offset",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/billing-runs/preview": {
      "post": {
        "operationId": "preview",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillableMeetingsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Which completed meetings a customer had in the period, priced as lines",
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/billing-runs": {
      "post": {
        "operationId": "createDraft",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillableMeetingsDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesDocument"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Draft invoice over those meetings; opens in the editor for review",
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/datev/export": {
      "get": {
        "operationId": "export",
        "parameters": [
          {
            "name": "from",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "ZIP download: EXTF Buchungsstapel CSV + document PDFs of the period",
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/datev/send": {
      "post": {
        "operationId": "sendToTaxAdvisor",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatevPeriodDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "One-click Steuerberater handoff: email the export ZIP to the advisor.\nThrottled hard — this is a monthly action that builds and mails a whole\nperiod's documents, so a loop here is expensive on both sides.",
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/dunning/preview": {
      "get": {
        "operationId": "previewDunning",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/documents/{id}/dunning/send": {
      "post": {
        "operationId": "sendDunning",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendDunningDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Sends mail on the company letterhead; throttled like the other send paths.",
        "tags": [
          "Invoicing Documents"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/recurring": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecurringInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoice"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RecurringInvoice"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/invoicing/recurring/{id}": {
      "get": {
        "operationId": "findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoice"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRecurringInvoiceDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecurringInvoice"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "Invoicing Recurring"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/v4/meeting-type": {
      "post": {
        "description": "Creates a new meeting type with specified duration, availability settings, and booking options.",
        "operationId": "createMeetingType",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMeetingTypeV4Dto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create meeting type",
        "tags": [
          "Meeting Type V4"
        ]
      },
      "get": {
        "description": "Retrieves multiple meeting types based on domain filtering. Defaults to user's own meeting types when no domain is specified.",
        "operationId": "getMeetingTypes",
        "parameters": [
          {
            "name": "domain",
            "required": false,
            "in": "query",
            "description": "Domain to filter meeting types by. Defaults to \"me\"",
            "schema": {
              "$ref": "#/components/schemas/MeetingTypeDomain"
            }
          },
          {
            "name": "id",
            "required": false,
            "in": "query",
            "description": "Optional id to be used in combination with domain (required for user, group, workspace domains)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MeetingTypeResponseDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "Array of meeting types matching the specified criteria",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MeetingTypeResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get meeting types",
        "tags": [
          "Meeting Type V4"
        ]
      }
    },
    "/v4/meeting-type/{id}": {
      "get": {
        "description": "Retrieves detailed information about a meeting type including duration, availability settings, and booking configuration.",
        "operationId": "getMeetingType",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the meeting type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get meeting type information",
        "tags": [
          "Meeting Type V4"
        ]
      },
      "patch": {
        "description": "Updates an existing meeting type with partial data. All fields are optional and only provided fields will be updated.",
        "operationId": "updateMeetingType",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the meeting type to update",
            "schema": {
              "example": "123e4567-e89b-12d3-a456-426614174000",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMeetingTypeV4Dto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Meeting type updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data or validation error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "User does not have permission to update this meeting type"
          },
          "404": {
            "description": "Meeting type not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update meeting type",
        "tags": [
          "Meeting Type V4"
        ]
      },
      "delete": {
        "description": "Soft deletes a meeting type. Optionally also deletes the associated availability if not shared with other meeting types.",
        "operationId": "deleteMeetingType",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the meeting type to delete",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deleteAvailability",
            "required": false,
            "in": "query",
            "description": "Also delete the associated availability. Fails if the availability is shared with other meeting types.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Meeting type deleted successfully"
          },
          "400": {
            "description": "Cannot delete availability - user must have at least one availability"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "User does not have permission to delete this meeting type"
          },
          "404": {
            "description": "Meeting type not found"
          },
          "409": {
            "description": "Cannot delete availability - it is used by other meeting types"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete meeting type",
        "tags": [
          "Meeting Type V4"
        ]
      }
    },
    "/v4/booking-availability": {
      "get": {
        "operationId": "getBookingAvailability",
        "parameters": [
          {
            "name": "meetingTypeId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingDuration",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "start",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hostIds",
            "required": false,
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "queueId",
            "required": false,
            "in": "query",
            "description": "Queue ID of meeting type for hosts in round robin",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "existingAppointmentId",
            "required": false,
            "in": "query",
            "description": "Appointment ID of previous booking for rescheduling",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "calculationMethod",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AvailabilityCalculationMethod"
            }
          },
          {
            "name": "timezone",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hideGroupAppointments",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "skipEarliestBookingCalculation",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "troubleshoot",
            "required": false,
            "in": "query",
            "description": "Get blocked timeslots with available slots for diagnostics",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "refreshCache",
            "required": false,
            "in": "query",
            "description": "Force cache refresh (skip read, write result).\nUsed after slot-occupied error to fetch fresh availability.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "resourceChannelIds",
            "required": false,
            "in": "query",
            "description": "Ids of the resource channel entity",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "channel",
            "required": false,
            "in": "query",
            "description": "Selected channel for per-channel availability lookup",
            "schema": {
              "$ref": "#/components/schemas/MeetingTypeChannel"
            }
          },
          {
            "name": "attendeeEmail",
            "required": false,
            "in": "query",
            "description": "Booker email used for account-owner matching on round-robin\nmeeting types. When matching is enabled and an owner resolves\nto one of the meeting type's eligible hosts, availability is\nnarrowed to that host. Ignored when the meeting type does not\nhave account-owner matching enabled.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bookingTargetToken",
            "required": false,
            "in": "query",
            "description": "Opaque server-resolved booking-block audience context.",
            "schema": {
              "maxLength": 64,
              "pattern": "/^[A-Za-z0-9_-]+$/",
              "type": "string"
            }
          },
          {
            "name": "oneTimeLinkId",
            "required": false,
            "in": "query",
            "description": "The single-use link the invitee arrived through.\n\nPresent only on requests from a `/1t/<id>` booking page. The link may\ncustomise duration, location, schedule and booking window, and slots have\nto be computed against those, not against the meeting type's defaults.",
            "schema": {
              "maxLength": 64,
              "pattern": "/^[A-Za-z0-9_-]+$/",
              "type": "string"
            }
          },
          {
            "name": "bookingProposalId",
            "required": false,
            "in": "query",
            "description": "The booking proposal the invitee arrived through. Its own held slots are\nleft out of the reservations that narrow availability, so the invitee\ncan book the times that are held for them. Ignored unless the proposal\nis pending and belongs to this meeting type.",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "name": "x-location-selection-context",
            "required": false,
            "in": "header",
            "description": "Opaque Location Finder context token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingAvailabilityResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingAvailabilityResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get booking availability for a meeting type",
        "tags": [
          "Booking Availability V4"
        ]
      }
    },
    "/v4/booking-availability/user/{id}/timeframe": {
      "get": {
        "operationId": "getUserAvailability",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "User ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "required": true,
            "in": "query",
            "description": "Start date and time in ISO format",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "required": true,
            "in": "query",
            "description": "End date and time in ISO format",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingTypeId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAvailabilityResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAvailabilityResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get user availability for a specific timeframe",
        "tags": [
          "Booking Availability V4"
        ]
      }
    },
    "/v4/queue/meeting-type/{meetingTypeId}": {
      "patch": {
        "description": "Update user assignments or capacities for a queue associated with a meeting type",
        "operationId": "updateQueue",
        "parameters": [
          {
            "name": "meetingTypeId",
            "required": true,
            "in": "path",
            "description": "ID of the meeting type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateQueueDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Queue updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update queue for a meeting type",
        "tags": [
          "Queue V4"
        ]
      }
    },
    "/v4/queue/workspace/{workspaceId}": {
      "get": {
        "description": "Retrieve all queues associated with a specific workspace",
        "operationId": "getWorkspaceQueues",
        "parameters": [
          {
            "name": "workspaceId",
            "required": true,
            "in": "path",
            "description": "ID of the workspace",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Queues retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueueResponseDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get all queues for a workspace",
        "tags": [
          "Queue V4"
        ]
      }
    },
    "/v4/queue/company": {
      "get": {
        "description": "Retrieve all queues associated with the current user's company",
        "operationId": "getCompanyQueues",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Company queues retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueueResponseDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get all queues for a company",
        "tags": [
          "Queue V4"
        ]
      }
    },
    "/v4/queue/{queueId}": {
      "get": {
        "description": "Retrieve a specific queue with all its relations",
        "operationId": "getQueue",
        "parameters": [
          {
            "name": "queueId",
            "required": true,
            "in": "path",
            "description": "ID of the queue",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Queue retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get queue by ID",
        "tags": [
          "Queue V4"
        ]
      }
    },
    "/v4/queue/{queueId}/next": {
      "get": {
        "description": "Retrieve the next available hosts from the queue rotation",
        "operationId": "getNextHost",
        "parameters": [
          {
            "name": "queueId",
            "required": true,
            "in": "path",
            "description": "ID of the queue",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Next queue hosts retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NextQueueHostsResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get next available hosts from queue",
        "tags": [
          "Queue V4"
        ]
      }
    },
    "/v4/queue-user-group": {
      "post": {
        "operationId": "createGroup",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserGroupDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User group created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueUserGroupResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create a new user group",
        "tags": [
          "Queue User Group V4"
        ]
      }
    },
    "/v4/queue-user-group/{groupId}": {
      "patch": {
        "operationId": "updateGroup",
        "parameters": [
          {
            "name": "groupId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserGroupDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User group updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueUserGroupResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update an existing user group",
        "tags": [
          "Queue User Group V4"
        ]
      },
      "delete": {
        "operationId": "deleteGroup",
        "parameters": [
          {
            "name": "groupId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "204": {
            "description": "User group deleted successfully"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete a user group",
        "tags": [
          "Queue User Group V4"
        ]
      }
    },
    "/v4/meeting-type-template/create": {
      "post": {
        "operationId": "createMeetingTypeTemplate",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMeetingTypeTemplateV4Dto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeTemplateResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create a new meeting type template",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/assign/{templateId}": {
      "post": {
        "operationId": "assignHost",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTemplateHost"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Assign host to meeting type template",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/assign-bulk/{templateId}": {
      "post": {
        "operationId": "assignHostBulk",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTemplateHostBulk"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Assign multiple hosts to meeting type template",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/unassign/{templateId}": {
      "post": {
        "operationId": "unassignHost",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Unassign host from meeting type template",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/all": {
      "get": {
        "operationId": "getAllMeetingTypeTemplates",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MeetingTypeTemplateResponseDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MeetingTypeTemplateResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get all meeting type templates for user",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/{id}": {
      "get": {
        "operationId": "getMeetingTypeTemplate",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeTemplateResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get meeting type template by ID",
        "tags": [
          "Meeting Type Template V4"
        ]
      },
      "patch": {
        "operationId": "updateMeetingTypeTemplate",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMeetingTypeTemplateV4Dto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update a meeting type template",
        "tags": [
          "Meeting Type Template V4"
        ]
      },
      "delete": {
        "operationId": "deleteMeetingTypeTemplate",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete a meeting type template",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/users/{templateId}": {
      "get": {
        "operationId": "getAssignedUsers",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateMeetingTypeInfoDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateMeetingTypeInfoDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get meeting types created from this template",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/assign-workspace/{templateId}": {
      "post": {
        "operationId": "assignWorkspace",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTemplateWorkspace"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Assign team template to workspace",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/meeting-type-template/workspaces/{templateId}": {
      "get": {
        "operationId": "getAssignedWorkspaces",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateWorkspaceInfoDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateWorkspaceInfoDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get workspaces assigned to this template",
        "tags": [
          "Meeting Type Template V4"
        ]
      }
    },
    "/v4/one-time-booking-link/create/{meetingTypeId}": {
      "post": {
        "operationId": "createOneTimeLink",
        "parameters": [
          {
            "name": "meetingTypeId",
            "required": true,
            "in": "path",
            "description": "Meeting type ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OneTimeBookingLinkResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create a one-time booking link for a meeting type",
        "tags": [
          "One Time Booking Link V4"
        ]
      }
    },
    "/v4/provisional-booking/paginated": {
      "get": {
        "description": "Retrieves a paginated list of provisional bookings based on the provided criteria.",
        "operationId": "getPaginatedProvisionalBookings",
        "parameters": [
          {
            "name": "page",
            "required": true,
            "in": "query",
            "description": "Page number for pagination",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "required": true,
            "in": "query",
            "description": "Number of items per page",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "all",
            "required": false,
            "in": "query",
            "description": "Fetch all bookings in company, admin only",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "Fetch bookings by userId, admin only",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingTypeId",
            "required": false,
            "in": "query",
            "description": "Fetch bookings by meetingTypeId, admin only",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "required": false,
            "in": "query",
            "description": "Restrict bookings to hosts in a workspace",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Filter by status",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "confirmed",
                "expired",
                "declined_by_host"
              ]
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "Filter by type (doubleOptIn = awaiting attendee, requireHostConfirmation = needs host action)",
            "schema": {
              "type": "string",
              "enum": [
                "doubleOptIn",
                "requireHostConfirmation"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved paginated provisional bookings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedProvisionalBookingsResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get paginated provisional bookings",
        "tags": [
          "Provisional Booking V4"
        ]
      }
    },
    "/v4/provisional-booking/{id}": {
      "delete": {
        "description": "Soft deletes a provisional booking by ID",
        "operationId": "deleteProvisionalBookingById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Provisional booking ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete provisional booking",
        "tags": [
          "Provisional Booking V4"
        ]
      }
    },
    "/v4/provisional-booking/{id}/decline": {
      "post": {
        "description": "Declines a provisional booking request and notifies the attendee",
        "operationId": "declineProvisionalBooking",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Provisional booking ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineProvisionalBookingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully declined provisional booking"
          },
          "201": {
            "description": ""
          },
          "400": {
            "description": "Booking request has already been processed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "User is not authorized to decline this booking request"
          },
          "404": {
            "description": "Provisional booking not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Decline provisional booking",
        "tags": [
          "Provisional Booking V4"
        ]
      }
    },
    "/v4/handoff/appointment": {
      "post": {
        "description": "Changes the host of an appointment to another user, queue, or queue group.",
        "operationId": "handoffAppointment",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HandoffAppointmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Appointment successfully handed off"
          },
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Handoff appointment to another user or queue",
        "tags": [
          "Handoff V4"
        ]
      }
    },
    "/v4/handoff/available-handoffs": {
      "get": {
        "description": "Retrieves available users or queues that can receive a handoff for the specified criteria.",
        "operationId": "getAvailableHandoffs",
        "parameters": [
          {
            "name": "isOnline",
            "required": false,
            "in": "query",
            "description": "Filter for online users only",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "channelId",
            "required": false,
            "in": "query",
            "description": "Channel ID for filtering handoffs",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appointmentId",
            "required": false,
            "in": "query",
            "description": "Appointment ID to get handoffs for",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "showAll",
            "required": false,
            "in": "query",
            "description": "Include all company users even when the appointment belongs to a workspace",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved available handoff options",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableHandoffsDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get available handoff options",
        "tags": [
          "Handoff V4"
        ]
      }
    },
    "/v4/handoff/bulk": {
      "post": {
        "description": "Hands off multiple appointments from specified users within a time period to a target user.",
        "operationId": "bulkHandoff",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkHandoffDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk handoff completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkHandoffResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkHandoffResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Bulk handoff appointments",
        "tags": [
          "Handoff V4"
        ]
      }
    },
    "/v4/booking-link/group": {
      "post": {
        "operationId": "createGroupBookingLink",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupBookingLinkDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupBookingLinkResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupBookingLinkResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create a group booking link",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/group/{groupBookingLinkId}": {
      "patch": {
        "operationId": "updateGroupBookingLink",
        "parameters": [
          {
            "name": "groupBookingLinkId",
            "required": true,
            "in": "path",
            "description": "Group booking link ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupBookingLinkDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update a group booking link",
        "tags": [
          "Booking Link V4"
        ]
      },
      "delete": {
        "operationId": "deleteGroupBookingLink",
        "parameters": [
          {
            "name": "groupBookingLinkId",
            "required": true,
            "in": "path",
            "description": "Group booking link ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete a group booking link",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/group/workspace/{workspaceId}": {
      "get": {
        "operationId": "getWorkspaceGroupBookingLinks",
        "parameters": [
          {
            "name": "workspaceId",
            "required": true,
            "in": "path",
            "description": "Workspace ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GroupBookingLinkResponseDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GroupBookingLinkResponseDto"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get group booking links of a workspace",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link": {
      "get": {
        "operationId": "getBookingLinks",
        "parameters": [
          {
            "name": "workspaceId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBookingLinksResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBookingLinksResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get booking links for specified workspace or user workspace",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/all": {
      "get": {
        "operationId": "getAllBookingLinks",
        "parameters": [
          {
            "name": "domain",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBookingLinksResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBookingLinksResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get all booking links with scopes",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/personal-link/assigned": {
      "get": {
        "operationId": "getAssignedPersonalBookingLinkMeetingType",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeetingTypeResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get meeting types assigned to requesters personal booking link",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/personal-link/{companySlug}/{userSlug}": {
      "get": {
        "operationId": "getPersonalBookingLinkPage",
        "parameters": [
          {
            "name": "companySlug",
            "required": true,
            "in": "path",
            "description": "Company slug",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userSlug",
            "required": true,
            "in": "path",
            "description": "User slug",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceChannel",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "preview",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingLinkResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingLinkResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get personal booking link page data",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/company/{companySlug}": {
      "get": {
        "operationId": "getCompanyPage",
        "parameters": [
          {
            "name": "companySlug",
            "required": true,
            "in": "path",
            "description": "Company slug",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBookingPageResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBookingPageResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get company booking link page data",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/personal-page/link": {
      "get": {
        "operationId": "getPersonalPageLink",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get a link for personal page",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/personal-page/v2/{userSlug}": {
      "get": {
        "operationId": "getPersonalPage",
        "parameters": [
          {
            "name": "userSlug",
            "required": true,
            "in": "path",
            "description": "User slug",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalBookingPageResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalBookingPageResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get personal page data",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking-link/user/{userId}/meetingType/{meetingTypeId}": {
      "get": {
        "operationId": "getBookingLink",
        "parameters": [
          {
            "name": "userId",
            "required": true,
            "in": "path",
            "description": "User ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingTypeId",
            "required": true,
            "in": "path",
            "description": "Meeting type ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingLinkResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingLinkResponseDto"
                }
              }
            }
          }
        },
        "summary": "Get booking link for specified meeting type",
        "tags": [
          "Booking Link V4"
        ]
      }
    },
    "/v4/booking": {
      "post": {
        "description": "Books an appointment with a specified host for a given meeting type and time slot. Returns appointment confirmation details.\n\nAvailability, working hours and conflicts are validated by default. Authenticate as a member of the meeting type's company (API key plus `x-meetergo-api-user-id`) and set `ignoreAvailability: true` to book outside available hours; anonymous callers cannot use the flag.",
        "operationId": "bookAppointment",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create appointment booking",
        "tags": [
          "Booking V4"
        ]
      }
    },
    "/v4/appointment/{appointmentId}/follow-up-draft": {
      "post": {
        "description": "Generates a subject and body the host can edit and send. Requires the appointment to carry a summary or transcript.",
        "operationId": "draft",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftMeetingFollowUpDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Draft generated"
          },
          "400": {
            "description": "Meeting has no notes to draft from"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Draft a follow-up email from a meeting-s notes",
        "tags": [
          "appointment"
        ]
      }
    },
    "/v4/appointment/{appointmentId}/recap/share": {
      "post": {
        "operationId": "share",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Make this meeting-s recap readable by link",
        "tags": [
          "appointment"
        ]
      }
    },
    "/v4/appointment/{appointmentId}/recap/unshare": {
      "post": {
        "operationId": "unshare",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Revoke the recap link",
        "tags": [
          "appointment"
        ]
      }
    },
    "/v4/attendee/no-show/{attendeeId}": {
      "post": {
        "description": "Marks a specific attendee as no-show for tracking and reporting purposes",
        "operationId": "markAttendeeAsNoShow",
        "parameters": [
          {
            "name": "attendeeId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the attendee to mark as no-show",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Mark attendee as no-show",
        "tags": [
          "Attendee V4"
        ]
      }
    },
    "/v4/attendee/quick-mail": {
      "post": {
        "description": "Sends a quick email message to a specific attendee. Rate limited to 5 per 5 minutes.",
        "operationId": "sendQuickMail",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Email details including attendee ID, title and content",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickMailDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Send quick email to attendee",
        "tags": [
          "Attendee V4"
        ]
      }
    },
    "/v4/attendee/{attendeeId}/notes": {
      "patch": {
        "description": "Allows host to update attendee notes. Useful for manual adjustments when CRM sync fails or for adding additional information.",
        "operationId": "updateNotes",
        "parameters": [
          {
            "name": "attendeeId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the attendee whose notes to update",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Key-value pairs of notes to update. Must have the same keys as existing notes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "example": {
                  "company": "New Company Name",
                  "phone": "+1234567890"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update attendee notes",
        "tags": [
          "Attendee V4"
        ]
      }
    },
    "/v4/meeting-transcript/email": {
      "post": {
        "operationId": "sendByEmail",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMeetingTranscriptDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Email a meeting's notes to a chosen address",
        "tags": [
          "appointment"
        ]
      }
    },
    "/v4/appointment/public/{appointmentId}": {
      "get": {
        "description": "Retrieves public appointment information that can be accessed with or without authentication",
        "operationId": "getPublicAppointment",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the appointment",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "secret",
            "required": false,
            "in": "query",
            "description": "Optional secret key for accessing appointment details",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public appointment details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAppointment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get public appointment details",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/paginated": {
      "get": {
        "description": "Retrieves appointments with pagination support for the authenticated user",
        "operationId": "getPaginatedAppointments",
        "parameters": [
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AppointmentSortBy"
            }
          },
          {
            "name": "sortDirection",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SortDirection"
            }
          },
          {
            "name": "page",
            "required": true,
            "in": "query",
            "description": "Page number (0-indexed). Use 0 for the first page.",
            "schema": {
              "minimum": 0,
              "example": 0,
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "required": true,
            "in": "query",
            "description": "Number of items per page",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "example": 20,
              "type": "number"
            }
          },
          {
            "name": "channel",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/MeetingTypeChannel"
            }
          },
          {
            "name": "start",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "all",
            "required": false,
            "in": "query",
            "description": "Fetch all bookings in company, admin only",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "Fetch bookings by userId, admin only",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingTypeId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated appointments retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAppointmentsResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get paginated appointments",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/{appointmentId}": {
      "delete": {
        "description": "Deletes a specific appointment by ID",
        "operationId": "deleteAppointmentById",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the appointment to delete",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete appointment",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/today": {
      "get": {
        "description": "Retrieves all appointments scheduled for today for the authenticated user",
        "operationId": "getTodayAppointments",
        "parameters": [
          {
            "name": "timezone",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Today's appointments retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AppointmentResponseDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get today's appointments",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/current": {
      "get": {
        "description": "Retrieves the currently active appointment for the authenticated user",
        "operationId": "getCurrentAppointment",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Current appointment retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponseDto"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get current appointment",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/{id}": {
      "get": {
        "description": "Retrieves a specific appointment by ID with full details including attendees and hosts",
        "operationId": "getAppointmentById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the appointment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Appointment details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get appointment by ID",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/{appointmentId}/guest": {
      "patch": {
        "description": "Adds additional guest email addresses to an appointment's attendee list",
        "operationId": "addGuestEmail",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the appointment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Guest email addresses to add to the appointment",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddGuestEmailsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Add guest emails to appointment",
        "tags": [
          "Appointment V4"
        ]
      },
      "delete": {
        "description": "Removes a guest email address from an appointment's attendee list",
        "operationId": "removeGuestEmail",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the appointment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Guest email address to remove from the appointment",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveGuestEmailDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Remove guest email from appointment",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/{appointmentId}/notes": {
      "patch": {
        "description": "Updates or adds notes to a specific appointment",
        "operationId": "updateNotes",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the appointment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Notes to update for the appointment",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNotesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update appointment notes",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/{appointmentId}/transcription": {
      "patch": {
        "description": "Updates the meeting transcription and/or AI-generated summary for an appointment. Both fields accept markdown-formatted text. Set a field to `null` to clear it. Omit a field to leave it unchanged.\n\nThis endpoint is designed for integrations with transcription services, AI meeting assistants, or any tool that produces meeting records.",
        "operationId": "updateTranscription",
        "parameters": [
          {
            "name": "appointmentId",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the appointment",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Transcription and/or summary content in markdown format",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTranscriptionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transcription updated successfully"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "User does not have access to this appointment"
          },
          "404": {
            "description": "Appointment not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update meeting transcription and summary",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/{id}/cancel": {
      "post": {
        "description": "Cancels an appointment as the host or admin. For group bookings, specify `attendeeId` to remove a single attendee, or set `cancelAll: true` to cancel the entire appointment — omitting both returns a 400 error to prevent accidental full cancellation.\n\n**Side effects:** Sends cancellation emails to all participants, syncs calendar events, updates CRM integrations, and fires `booking_cancelled` webhook.\n\n**Series cancellation:** Set `cancelEntireSeries: true` to cancel all future occurrences of a recurring appointment.",
        "operationId": "cancelAppointment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Appointment ID (UUID)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelAppointmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The cancelled appointment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Group booking requires explicit intent: provide `attendeeId` or set `cancelAll: true`"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "User does not have access to this appointment"
          },
          "404": {
            "description": "Appointment not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Cancel an appointment",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/appointment/{id}/reschedule": {
      "post": {
        "description": "Moves an appointment to a new time slot. The duration remains unchanged. Validates availability by default — set `ignoreAvailability: true` to schedule outside available hours or on top of existing appointments.\n\n**Side effects:** Sends reschedule notifications to all participants, updates calendar events, regenerates ICS, reschedules reminders, updates CRM integrations, and fires `booking_rescheduled` webhook.",
        "operationId": "rescheduleAppointment",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Appointment ID (UUID)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleAppointmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rescheduled appointment with previous start time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RescheduleResponseDto"
                }
              }
            }
          },
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RescheduleResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid start time, time slot conflict, or appointment already completed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "User does not have access or reschedule feature is not available"
          },
          "404": {
            "description": "Appointment not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Reschedule an appointment",
        "tags": [
          "Appointment V4"
        ]
      }
    },
    "/v4/attendee/pending": {
      "post": {
        "description": "Creates a pending attendee record during form submission. This is temporary data that gets deleted when booking is completed.",
        "operationId": "postInfo",
        "parameters": [],
        "requestBody": {
          "required": true,
          "description": "Attendee information collected during form entry",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAttendeePendingDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Pending attendee created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Create pending attendee",
        "tags": [
          "Attendee Pending V4"
        ]
      },
      "get": {
        "description": "Retrieves all pending attendee records for the authenticated user's company. Limited to 99 most recent entries.",
        "operationId": "getPendingAttendees",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of pending attendees retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AttendeePendingResponseDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get pending attendees",
        "tags": [
          "Attendee Pending V4"
        ]
      }
    },
    "/v4/attendee/pending/{id}": {
      "patch": {
        "description": "Updates an existing pending attendee record with new information during form modification.",
        "operationId": "updateInfo",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "The unique identifier of the pending attendee record",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Updated attendee information",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAttendeePendingDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pending attendee updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Update pending attendee",
        "tags": [
          "Attendee Pending V4"
        ]
      }
    },
    "/v4/personal-page/me": {
      "get": {
        "operationId": "getMyPersonalPage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalPageResponseDto"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalPageResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get personal page of the requesting user",
        "tags": [
          "Personal Page V4"
        ]
      },
      "patch": {
        "operationId": "updateMyPersonalPage",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePersonalPageDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update personal page of the requesting user",
        "tags": [
          "Personal Page V4"
        ]
      }
    },
    "/v4/personal-page/{id}": {
      "get": {
        "operationId": "getPersonalPageByUserId",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Target user ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalPageResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalPageResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get personal page by user ID (admin only)",
        "tags": [
          "Personal Page V4"
        ]
      },
      "patch": {
        "operationId": "updatePersonalPageByUserId",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Target user ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePersonalPageDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update personal page by user ID (admin only)",
        "tags": [
          "Personal Page V4"
        ]
      }
    },
    "/v4/personal-page/header-picture": {
      "patch": {
        "operationId": "updatePersonalPagePicture",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update personal page header picture",
        "tags": [
          "Personal Page V4"
        ]
      }
    },
    "/v4/user": {
      "post": {
        "description": "Creates a new platform user with automatically generated availability schedule and meeting type. The user will be associated with your company and ready for bookings immediately. Basic information for availability (weekly schedule, timezone) and meeting type (name, duration, slug) can be provided in the request. If not provided, default values are used: availability defaults to business hours (9-17 Mon-Fri) in Europe/Berlin timezone, and meeting type defaults to \"30min Meeting\" with 30-minute duration. The response includes IDs for the created user, availability, and meeting type, plus a ready-to-use public booking URL. The defaultAvailabilityId can be used to update availability via PATCH, and meeting types can be fetched and modified or new ones created.",
        "operationId": "createPlatformUser",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreatePlatformUserDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Platform user created successfully with auto-generated availability and meeting type. Returns user ID, availability ID, meeting type ID, company ID, and public booking URL that customers can use immediately.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePlatformUserResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden - Requires company admin role and an active API Platform subscription. Not available to Personal Access Tokens."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Create platform user",
        "tags": [
          "User V4"
        ]
      },
      "get": {
        "description": "Retrieves a list of users from your company with optional filtering and pagination. Admin access required.",
        "operationId": "listUsers",
        "parameters": [
          {
            "name": "userType",
            "required": false,
            "in": "query",
            "description": "Filter users by type. If not specified, returns all user types.",
            "schema": {
              "$ref": "#/components/schemas/UserType"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Maximum number of users to return",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "example": 20,
              "type": "number"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "Number of users to skip for pagination",
            "schema": {
              "minimum": 0,
              "default": 0,
              "example": 0,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Users retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListUsersResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "List users",
        "tags": [
          "User V4"
        ]
      }
    },
    "/v4/user/me": {
      "get": {
        "description": "Retrieves detailed information about the currently authenticated user including their availability schedules, meeting types, and company association. For API key authentication without the x-meetergo-api-user-id header, returns the company owner.",
        "operationId": "getCurrentUser",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Current user information retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get current user information",
        "tags": [
          "User V4"
        ]
      }
    },
    "/v4/user/{id}": {
      "get": {
        "description": "Retrieves detailed information about a user including their availability schedules, meeting types, and company association.",
        "operationId": "getUserById",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the user",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User information retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "User not found or does not belong to your company"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get user information",
        "tags": [
          "User V4"
        ]
      },
      "delete": {
        "description": "Permanently deletes a user from your company with optional resource transfer. Only company admins can delete users. You cannot delete yourself or the company owner. Before deletion, you can optionally transfer the user's resources (meeting types, forms, workflows, showcases, availabilities, qualifiers) to another user in your company by providing a targetUserId. This operation cannot be undone.",
        "operationId": "deleteUser",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the user to delete",
            "schema": {
              "example": "123e4567-e89b-12d3-a456-426614174000",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "description": "Optional resource transfer configuration. Specify targetUserId to transfer resources to another user. You can selectively choose which resource types to transfer (all enabled by default).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteUserWithTransferDto"
              },
              "examples": {
                "withTransfer": {
                  "summary": "Delete with resource transfer",
                  "description": "Delete user and transfer all resources to another user",
                  "value": {
                    "targetUserId": "987e6543-e21b-12d3-a456-426614174000",
                    "transferMeetingTypes": true,
                    "transferForms": true,
                    "transferWorkflows": true,
                    "transferAvailabilities": true,
                    "transferQualifiers": true
                  }
                },
                "withoutTransfer": {
                  "summary": "Delete without transfer",
                  "description": "Delete user without transferring resources",
                  "value": {}
                },
                "selectiveTransfer": {
                  "summary": "Selective resource transfer",
                  "description": "Transfer only meeting types and forms",
                  "value": {
                    "targetUserId": "987e6543-e21b-12d3-a456-426614174000",
                    "transferMeetingTypes": true,
                    "transferForms": true,
                    "transferWorkflows": false,
                    "transferAvailabilities": false,
                    "transferQualifiers": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User deleted successfully"
          },
          "400": {
            "description": "Bad request - Cannot delete yourself or user not found"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden - Only admins can delete users or cannot delete company owner"
          },
          "404": {
            "description": "User not found or does not belong to your company"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete a user",
        "tags": [
          "User V4"
        ]
      },
      "patch": {
        "description": "Updates basic profile fields (first name, last name, slug) for a user in your company. Any user can update their own profile; only company admins can update other users. Provide any subset of fields — omitted fields stay unchanged. Slugs must be unique across the platform and at least 5 characters; invalid characters are normalized automatically. Email and login identity are not editable here; this is a database-only update and does not affect the user’s authentication.",
        "operationId": "updateUser",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the user to update",
            "schema": {
              "example": "123e4567-e89b-12d3-a456-426614174000",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePlatformUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request — empty body, slug too short, or slug already taken"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden — non-admins can only update their own profile"
          },
          "404": {
            "description": "User not found or does not belong to your company"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update platform user",
        "tags": [
          "User V4"
        ]
      }
    },
    "/v4/user/{id}/calendar-sync": {
      "patch": {
        "description": "Updates the calendar sync provider settings for a specific user. Only company admins can update calendar sync settings. The calendar sync provider determines which calendar service (Google, Outlook, iCloud, CalDAV, Exchange, Nextcloud, SmartWe) is used to sync the user's availability and create calendar events for bookings. Provide the calendar connection ID and provider type to set the sync provider.",
        "operationId": "updateUserCalendarSync",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the user to update",
            "schema": {
              "example": "123e4567-e89b-12d3-a456-426614174000",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserCalendarSyncDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calendar sync provider updated successfully"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden - Only admins can update calendar sync settings"
          },
          "404": {
            "description": "User not found or does not belong to your company"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update user calendar sync provider",
        "tags": [
          "User V4"
        ]
      }
    },
    "/v4/calendar-connections/auth/{provider}/url": {
      "get": {
        "description": "Get the OAuth authorization URL for connecting a calendar provider. The user should be redirected to this URL to complete the OAuth flow. After authorization, the provider will redirect back to the API callback endpoint.",
        "operationId": "getAuthUrl",
        "parameters": [
          {
            "name": "provider",
            "required": true,
            "in": "path",
            "description": "Calendar provider to connect (google, outlook)",
            "schema": {
              "enum": [
                "google",
                "outlook",
                "icloud",
                "caldav",
                "exchange",
                "smart-we",
                "ics"
              ],
              "type": "string"
            }
          },
          {
            "name": "redirectUrl",
            "required": false,
            "in": "query",
            "description": "URL to redirect to after OAuth completion (defaults to frontend URL)",
            "schema": {
              "example": "https://yourapp.com/calendar-success",
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "User ID to connect for (admin only - connects calendar for specified user)",
            "schema": {
              "example": "user-uuid",
              "type": "string"
            }
          },
          {
            "name": "setAsCalendarSync",
            "required": false,
            "in": "query",
            "description": "Whether to automatically set this connection as the calendar sync provider after successful OAuth. If the user already has a calendar sync provider, this will be ignored.",
            "schema": {
              "example": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorization URL generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authUrl": {
                      "type": "string",
                      "description": "OAuth authorization URL to redirect user to",
                      "example": "https://accounts.google.com/oauth/authorize?client_id=..."
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "google",
                        "outlook",
                        "icloud",
                        "caldav",
                        "exchange",
                        "smart-we",
                        "ics"
                      ],
                      "description": "Calendar provider",
                      "example": "google"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get OAuth authorization URL",
        "tags": [
          "Calendar Auth V4"
        ]
      }
    },
    "/v4/calendar-connections/auth/{provider}/callback": {
      "get": {
        "description": "Handles OAuth callback from calendar providers. This endpoint is called automatically by the provider after the user completes authorization. Creates the calendar connection and redirects the user to the success/error page.",
        "operationId": "handleOAuthCallback",
        "parameters": [
          {
            "name": "provider",
            "required": true,
            "in": "path",
            "description": "Calendar provider handling callback",
            "schema": {
              "enum": [
                "google",
                "outlook",
                "icloud",
                "caldav",
                "exchange",
                "smart-we",
                "ics"
              ],
              "type": "string"
            }
          },
          {
            "name": "code",
            "required": false,
            "in": "query",
            "description": "OAuth authorization code from provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "description": "OAuth state parameter for security",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "required": false,
            "in": "query",
            "description": "Error code if OAuth failed",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "302": {
            "description": "Redirects to success or error URL"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "OAuth callback handler",
        "tags": [
          "Calendar Auth V4"
        ]
      }
    },
    "/v4/calendar-connections/connections": {
      "get": {
        "description": "Get all calendar connections for the authenticated user or a specific user (admin only). Returns connections from all providers (Google, Outlook).",
        "operationId": "listConnections",
        "parameters": [
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "User ID to get connections for (admin only)",
            "schema": {
              "example": "user-uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calendar connections retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "conn-uuid"
                          },
                          "provider": {
                            "type": "string",
                            "example": "google"
                          },
                          "email": {
                            "type": "string",
                            "example": "user@gmail.com"
                          },
                          "isPrimary": {
                            "type": "boolean",
                            "example": true
                          },
                          "isConnected": {
                            "type": "boolean",
                            "example": true
                          },
                          "primaryCalendar": {
                            "type": "string",
                            "example": "primary"
                          },
                          "selectedCalendars": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "primary",
                              "work-calendar"
                            ]
                          },
                          "validateAvailability": {
                            "type": "boolean",
                            "example": true
                          },
                          "cancelIfDeclinedOrDeleted": {
                            "type": "boolean",
                            "example": true
                          },
                          "disableAttendeeNotification": {
                            "type": "boolean",
                            "example": false
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "number",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "List calendar connections",
        "tags": [
          "Calendar Connections V4"
        ]
      }
    },
    "/v4/calendar-connections/connections/{connectionId}": {
      "patch": {
        "description": "Update settings for a specific calendar connection such as selected calendars, availability validation, and notification preferences.",
        "operationId": "updateConnection",
        "parameters": [
          {
            "name": "connectionId",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the calendar connection",
            "schema": {
              "example": "conn-uuid",
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "User ID that owns the connection (admin only)",
            "schema": {
              "example": "user-uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCalendarConnectionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Connection updated successfully"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Update calendar connection",
        "tags": [
          "Calendar Connections V4"
        ]
      },
      "delete": {
        "description": "Remove a calendar connection. This will stop syncing calendar data and remove all associated calendar information.",
        "operationId": "deleteConnection",
        "parameters": [
          {
            "name": "connectionId",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the calendar connection",
            "schema": {
              "example": "conn-uuid",
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "User ID that owns the connection (admin only)",
            "schema": {
              "example": "user-uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection deleted successfully"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Delete calendar connection",
        "tags": [
          "Calendar Connections V4"
        ]
      }
    },
    "/v4/calendar-connections/connections/{connectionId}/set-primary": {
      "post": {
        "description": "Set a calendar connection as the primary connection for the user. The primary connection is used as the default for creating new events.",
        "operationId": "setPrimaryConnection",
        "parameters": [
          {
            "name": "connectionId",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the calendar connection",
            "schema": {
              "example": "conn-uuid",
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "User ID that owns the connection (admin only)",
            "schema": {
              "example": "user-uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Primary connection set successfully"
          },
          "201": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Set connection as primary",
        "tags": [
          "Calendar Connections V4"
        ]
      }
    },
    "/v4/calendar-connections/connections/{connectionId}/calendars": {
      "get": {
        "description": "Retrieve all available calendars for a specific connection. This is used to allow users to select which calendars to sync.",
        "operationId": "getConnectionCalendars",
        "parameters": [
          {
            "name": "connectionId",
            "required": true,
            "in": "path",
            "description": "Unique identifier of the calendar connection",
            "schema": {
              "example": "conn-uuid",
              "type": "string"
            }
          },
          {
            "name": "userId",
            "required": false,
            "in": "query",
            "description": "User ID that owns the connection (admin only)",
            "schema": {
              "example": "user-uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection calendars retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "calendars": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "cal-uuid"
                          },
                          "name": {
                            "type": "string",
                            "example": "Work Calendar"
                          },
                          "isPrimary": {
                            "type": "boolean",
                            "example": true
                          },
                          "canEdit": {
                            "type": "boolean",
                            "example": true
                          },
                          "selected": {
                            "type": "boolean",
                            "example": false
                          }
                        }
                      }
                    },
                    "connectionId": {
                      "type": "string",
                      "example": "conn-uuid"
                    },
                    "provider": {
                      "type": "string",
                      "example": "google"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": [
          {
            "ApiUserHeader": []
          },
          {
            "JWT": []
          },
          {
            "ApiKey": []
          }
        ],
        "summary": "Get connection calendars",
        "tags": [
          "Calendar Connections V4"
        ]
      }
    },
    "/crm/tasks": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "findAll",
        "parameters": [
          {
            "name": "contactId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dealId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crmCompanyId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assigneeId",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "completed",
            "required": false,
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "call",
                "email",
                "meeting",
                "follow_up",
                "todo"
              ]
            }
          },
          {
            "name": "priority",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "minLength": 1,
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "name": "dueBefore",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dueAfter",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskListDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/tasks/summary": {
      "get": {
        "operationId": "getSummary",
        "parameters": [
          {
            "name": "assigneeId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskSummaryDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/tasks/overdue": {
      "get": {
        "operationId": "getOverdue",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/tasks/upcoming": {
      "get": {
        "operationId": "getUpcoming",
        "parameters": [
          {
            "name": "days",
            "required": true,
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/tasks/by-company/{crmCompanyId}": {
      "get": {
        "operationId": "getByCrmCompany",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/tasks/{id}": {
      "get": {
        "operationId": "findOne",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/tasks/{id}/complete": {
      "patch": {
        "operationId": "complete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/tasks/{id}/uncomplete": {
      "patch": {
        "operationId": "uncomplete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "tags": [
          "CRM Tasks"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/notes": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCrmNoteDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmNoteDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Create a note on a deal, contact, or company",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "list",
        "parameters": [
          {
            "name": "dealId",
            "required": false,
            "in": "query",
            "description": "Filter by deal ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": false,
            "in": "query",
            "description": "Filter by contact ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crmCompanyId",
            "required": false,
            "in": "query",
            "description": "Filter by CRM company ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmNoteDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "List notes for a deal, contact, or company",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/notes/{id}": {
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCrmNoteDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmNoteDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Update a note",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Delete a note",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{dealId}/notes": {
      "get": {
        "operationId": "listDealNotes",
        "parameters": [
          {
            "name": "dealId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmNoteDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get notes for a deal",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createDealNote",
        "parameters": [
          {
            "name": "dealId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmNoteDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Create a note on a deal",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/contacts/{contactId}/notes": {
      "get": {
        "operationId": "listContactNotes",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmNoteDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get notes for a contact",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createContactNote",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmNoteDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Create a note on a contact",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/{crmCompanyId}/notes": {
      "get": {
        "operationId": "listCompanyNotes",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmNoteDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get notes for a CRM company",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createCompanyNote",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmNoteDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Create a note on a CRM company",
        "tags": [
          "CRM Notes"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/attachments": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCrmAttachmentDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmAttachmentDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Attach a file to a deal, contact, or company",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "list",
        "parameters": [
          {
            "name": "dealId",
            "required": false,
            "in": "query",
            "description": "Filter by deal ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": false,
            "in": "query",
            "description": "Filter by contact ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crmCompanyId",
            "required": false,
            "in": "query",
            "description": "Filter by CRM company ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmAttachmentDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "List attachments for a deal, contact, or company",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/attachments/{id}/download": {
      "get": {
        "operationId": "getDownloadUrl",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get download URL for an attachment",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/attachments/{id}": {
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCrmAttachmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmAttachmentDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Update an attachment",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Delete an attachment",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{dealId}/attachments": {
      "get": {
        "operationId": "listDealAttachments",
        "parameters": [
          {
            "name": "dealId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmAttachmentDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get attachments for a deal",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createDealAttachment",
        "parameters": [
          {
            "name": "dealId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmAttachmentDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Attach a file to a deal",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/contacts/{contactId}/attachments": {
      "get": {
        "operationId": "listContactAttachments",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmAttachmentDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get attachments for a contact",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createContactAttachment",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmAttachmentDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Attach a file to a contact",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/{crmCompanyId}/attachments": {
      "get": {
        "operationId": "listCompanyAttachments",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmAttachmentDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get attachments for a CRM company",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createCompanyAttachment",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmAttachmentDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Attach a file to a CRM company",
        "tags": [
          "CRM Attachments"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/communications": {
      "post": {
        "operationId": "create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCrmCommunicationDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCommunicationDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Log a communication (call, email, SMS) on a deal, contact, or company",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "get": {
        "operationId": "list",
        "parameters": [
          {
            "name": "dealId",
            "required": false,
            "in": "query",
            "description": "Filter by deal ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactId",
            "required": false,
            "in": "query",
            "description": "Filter by contact ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "crmCompanyId",
            "required": false,
            "in": "query",
            "description": "Filter by CRM company ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "Filter by type",
            "schema": {
              "type": "string",
              "enum": [
                "call",
                "email",
                "sms",
                "whatsapp"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmCommunicationDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "List communications for a deal, contact, or company",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/communications/{id}": {
      "patch": {
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCrmCommunicationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCommunicationDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Update a communication",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "delete": {
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Delete a communication",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{dealId}/communications": {
      "get": {
        "operationId": "listDealCommunications",
        "parameters": [
          {
            "name": "dealId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmCommunicationDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get communications for a deal",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createDealCommunication",
        "parameters": [
          {
            "name": "dealId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCommunicationDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Log a communication on a deal",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/contacts/{contactId}/communications": {
      "get": {
        "operationId": "listContactCommunications",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmCommunicationDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get communications for a contact",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createContactCommunication",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCommunicationDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Log a communication on a contact",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/companies/{crmCompanyId}/communications": {
      "get": {
        "operationId": "listCompanyCommunications",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CrmCommunicationDto"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get communications for a CRM company",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createCompanyCommunication",
        "parameters": [
          {
            "name": "crmCompanyId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmCommunicationDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Log a communication on a CRM company",
        "tags": [
          "CRM Communications"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/contacts/{contactId}/emails": {
      "get": {
        "operationId": "getEmailsByContact",
        "parameters": [
          {
            "name": "contactId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCrmEmailIndexDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get synced emails for a CRM contact",
        "tags": [
          "CRM Email Sync"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/deals/{dealId}/emails": {
      "get": {
        "operationId": "getEmailsByDeal",
        "parameters": [
          {
            "name": "dealId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCrmEmailIndexDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Get synced emails for a CRM deal",
        "tags": [
          "CRM Email Sync"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/emails/{id}/body": {
      "get": {
        "operationId": "getEmailBody",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmEmailBodyDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Fetch full email body on-demand from provider",
        "tags": [
          "CRM Email Sync"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    },
    "/crm/emails/send-capability": {
      "get": {
        "operationId": "getSendCapability",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmSendCapabilityDto"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "summary": "Whether the current user can send from their own mailbox",
        "tags": [
          "CRM Email Sync"
        ],
        "security": [
          {
            "ApiKey": []
          },
          {
            "JWT": []
          },
          {
            "ApiUserHeader": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "meetergo Platform API",
    "description": "Scheduling, CRM and invoicing in one API: create users, manage availability and bookings, connect calendars, keep contacts and deals in sync, and take an offer through to a paid invoice.",
    "version": "3.274.0",
    "contact": {},
    "termsOfService": "https://www.meetergo.com/tos/"
  },
  "tags": [
    {
      "name": "User V4",
      "description": "Create and manage users in your workspace"
    },
    {
      "name": "Meeting Type V4",
      "description": "Configure meeting templates with durations, buffers, and conferencing"
    },
    {
      "name": "availability",
      "description": "Manage weekly schedules and availability settings"
    },
    {
      "name": "Booking V4",
      "description": "Create new bookings"
    },
    {
      "name": "Booking Availability V4",
      "description": "Query available time slots for booking"
    },
    {
      "name": "Appointment V4",
      "description": "Manage existing appointments"
    },
    {
      "name": "Attendee V4",
      "description": "Manage attendee details and notes"
    },
    {
      "name": "Calendar Connections V4",
      "description": "Connect and sync external calendars"
    },
    {
      "name": "Signatures V4",
      "description": "Send PDFs for e-signature and download the signed, eIDAS-grade document (DocuSeal-compatible)"
    },
    {
      "name": "WhatsApp V4",
      "description": "Send and receive WhatsApp messages by phone number and read conversation history"
    },
    {
      "name": "One Time Booking Link V4",
      "description": "Create single-use booking links"
    },
    {
      "name": "availability-exception",
      "description": "Override availability for specific dates"
    },
    {
      "name": "Booking Link V4",
      "description": "Configure various booking page types"
    },
    {
      "name": "Personal Page V4",
      "description": "Manage user profile pages"
    },
    {
      "name": "Handoff V4",
      "description": "Reassign meetings to other hosts"
    },
    {
      "name": "Calendar Auth V4",
      "description": "OAuth callbacks for calendar providers"
    },
    {
      "name": "CRM Contacts",
      "description": "Create, find, and update the people in your CRM, including their custom data fields"
    },
    {
      "name": "CRM Deals",
      "description": "Create, update, and track deals through pipeline stages (incl. per-deal activity history)"
    },
    {
      "name": "CRM Pipelines",
      "description": "Manage pipelines and their stages"
    },
    {
      "name": "CRM Tasks",
      "description": "Tasks on contacts, deals and companies"
    },
    {
      "name": "CRM Notes",
      "description": "Notes on contacts, deals and companies"
    },
    {
      "name": "CRM Attachments",
      "description": "Files attached to contacts, deals and companies"
    },
    {
      "name": "CRM Communications",
      "description": "Logged calls, messages and meetings on contacts, deals and companies"
    },
    {
      "name": "CRM Email Sync",
      "description": "Read the email history synced from connected mailboxes (read-only)"
    },
    {
      "name": "Data Fields",
      "description": "Define the custom fields a contact can carry; their `name` is the key used in a contact's additionalData"
    },
    {
      "name": "Invoicing Documents",
      "description": "Offers and invoices: create a draft, finalize it into a numbered e-invoice, send it, record payments, and run Mahnwesen"
    },
    {
      "name": "Invoicing Products",
      "description": "Reusable products for invoice line items"
    },
    {
      "name": "Invoicing Settings",
      "description": "Seller details, tax treatment, bank accounts, and number ranges"
    },
    {
      "name": "Invoicing Recurring",
      "description": "Recurring schedules, billing runs over completed meetings, buyer prefill, and DATEV export"
    },
    {
      "name": "Queue V4",
      "description": "Round-robin and queue-based routing (Beta)"
    },
    {
      "name": "Queue User Group V4",
      "description": "Manage queue user groups (Beta)"
    },
    {
      "name": "Meeting Type Template V4",
      "description": "Reusable meeting type configurations (Beta)"
    },
    {
      "name": "Attendee Pending V4",
      "description": "Manage pending attendee approvals (Beta)"
    },
    {
      "name": "Provisional Booking V4",
      "description": "Manage provisional/unconfirmed bookings (Beta)"
    }
  ],
  "servers": [],
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "type": "http",
        "description": "Bearer token: a Platform API Key (format: ak_live:<uuid>:<secret>) or a Personal Access Token (format: rgo-...). PATs always act as the token owner."
      },
      "ApiUserHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-meetergo-api-user-id",
        "description": "User ID to act on behalf of. Platform API Keys only (required with an API Key unless the endpoint states otherwise). Requests authenticated with a Personal Access Token are rejected if this header names another user."
      },
      "JWT": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http",
        "description": "JWT Bearer token for standard user authentication"
      }
    },
    "schemas": {
      "AgentConversationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "object",
            "nullable": true
          },
          "lastMessageAt": {
            "type": "object",
            "nullable": true
          },
          "ended": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "title",
          "lastMessageAt",
          "ended"
        ]
      },
      "AgentMessageDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant",
              "tool"
            ]
          },
          "content": {
            "type": "string"
          },
          "toolName": {
            "type": "object",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "content",
          "toolName",
          "createdAt"
        ]
      },
      "SendConversationMessageDto": {
        "type": "object",
        "properties": {
          "subjectType": {
            "type": "string",
            "enum": [
              "contact",
              "company",
              "deal"
            ]
          },
          "subjectId": {
            "type": "string"
          },
          "conversationId": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "subjectType",
          "subjectId",
          "message"
        ]
      },
      "RecordFactDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "field": {
            "type": "string",
            "enum": [
              "title",
              "employer",
              "linkedinUrl",
              "seniority",
              "function",
              "location",
              "industry",
              "size",
              "website",
              "phone",
              "description",
              "addressStreet",
              "addressCity",
              "addressZip",
              "addressCountry"
            ]
          },
          "value": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "applied",
              "proposed",
              "dismissed",
              "superseded"
            ]
          },
          "band": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceUrl": {
            "type": "object",
            "nullable": true
          },
          "observedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "field",
          "value",
          "status",
          "band",
          "score",
          "reasons",
          "sourceUrl",
          "observedAt"
        ]
      },
      "DecideRecordFactDto": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accept",
              "dismiss"
            ]
          }
        },
        "required": [
          "decision"
        ]
      },
      "Address": {
        "type": "object",
        "properties": {}
      },
      "Language": {
        "type": "string",
        "enum": [
          "en",
          "de",
          "fr",
          "es",
          "no",
          "nl",
          "it",
          "pl",
          "se",
          "tr",
          "da"
        ]
      },
      "SeatTier": {
        "type": "string",
        "enum": [
          "basic",
          "essentials",
          "growth",
          "teams",
          "light",
          "suite",
          "premium",
          "enterprise"
        ],
        "description": "The tier this seat is billed and entitled at, when it is lower than the\ncompany's own.\n\n`null` — the overwhelming majority, and every user that existed before\nthis was added — means the seat simply follows the company tier, which is\nhow billing worked when there was only one tier per account. A value here\npins the seat lower: a Suite or Premium account should not have to buy\nSuite for a colleague who only books meetings.\n\nOnly ever below the account tier. Nothing here can raise a seat above what\nthe company pays for, because entitlements are the intersection of the two\n(see `mergeSeatAccess`)."
      },
      "ViewerScope": {
        "type": "string",
        "enum": [
          "company",
          "teams"
        ],
        "description": "How much a {@link UserType.VIEWER} may read. Ignored for every other type.\n\n`company` sees the whole account, `teams` only the members of the\nworkspaces they are assigned to via `analyticsViewerWorkspaces`.\n\nExplicit rather than inferred from \"has any assigned workspace\": an admin\nwho creates a team-scoped viewer and has not picked the teams yet would\notherwise be handing out company-wide access by omission. A `teams` viewer\nwith nothing assigned sees nothing, which is the safe end of that mistake."
      },
      "LocalisedContent": {
        "type": "object",
        "properties": {
          "en": {
            "type": "string"
          },
          "de": {
            "type": "string"
          },
          "fr": {
            "type": "string"
          },
          "es": {
            "type": "string"
          },
          "no": {
            "type": "string"
          },
          "it": {
            "type": "string"
          },
          "nl": {
            "type": "string"
          },
          "da": {
            "type": "string"
          },
          "pl": {
            "type": "string"
          },
          "se": {
            "type": "string"
          },
          "tr": {
            "type": "string"
          }
        },
        "required": [
          "en"
        ]
      },
      "MeetingTypeChannel": {
        "type": "string",
        "enum": [
          "local",
          "local-attendee",
          "google",
          "zoom",
          "phone",
          "phone-incoming",
          "whatsapp",
          "connect",
          "webex",
          "skypeForConsumer",
          "skypeForBusiness",
          "teamsForBusiness",
          "teamsForBusiness2",
          "teamsForExchange",
          "teams2ForExchange",
          "custom",
          "resource",
          "whereby",
          "kmeet",
          "zava",
          "jitsi",
          "nextcloudTalk",
          "openTalk",
          "alfaview"
        ],
        "description": "Meeting channel/location type"
      },
      "ConfirmationButton": {
        "type": "object",
        "properties": {
          "useConfirmationButton": {
            "type": "boolean"
          },
          "text": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "required": [
          "useConfirmationButton",
          "text",
          "color",
          "link"
        ]
      },
      "MeetingInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the meeting type"
          },
          "description": {
            "type": "string",
            "description": "Description of the meeting type"
          },
          "nameLocalised": {
            "nullable": true,
            "description": "Per-language overrides for the title. Falls back to `name`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalisedContent"
              }
            ]
          },
          "descriptionLocalised": {
            "nullable": true,
            "description": "Per-language overrides for the description. Falls back to `description`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalisedContent"
              }
            ]
          },
          "enableRedirect": {
            "type": "boolean",
            "description": "Enable redirect after booking completion"
          },
          "redirect": {
            "type": "string",
            "description": "Redirect URL to navigate after booking"
          },
          "passEventDetailsToRedirect": {
            "type": "boolean",
            "description": "Pass event details (invitee name, email, form answers) as query params to redirect URL"
          },
          "duration": {
            "type": "number",
            "description": "Primary duration in minutes"
          },
          "channel": {
            "description": "Meeting channel/location type",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeChannel"
              }
            ]
          },
          "customChannelName": {
            "type": "string",
            "description": "Custom name for the meeting channel"
          },
          "customChannelLink": {
            "type": "string",
            "description": "Custom link for the meeting channel"
          },
          "connectChannelName": {
            "type": "string",
            "description": "Custom display name for the connect channel"
          },
          "groupBooking": {
            "type": "boolean",
            "description": "Enable group booking (multiple attendees per slot)"
          },
          "showAvailableSlots": {
            "type": "boolean",
            "description": "Show available spots count on the booking page"
          },
          "enrichInvitee": {
            "type": "boolean",
            "description": "Enable invitee data enrichment"
          },
          "autoCreateSpace": {
            "type": "boolean",
            "description": "Auto-create a Space when someone books"
          },
          "spacePresetId": {
            "type": "object",
            "description": "Space preset id used for the auto-created Space",
            "nullable": true
          },
          "spaceAutoInvite": {
            "type": "boolean",
            "description": "Publish the auto-created Space and invite the booker"
          },
          "confirmationButton": {
            "description": "Confirmation button settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/ConfirmationButton"
              }
            ]
          },
          "bufferBefore": {
            "type": "number",
            "description": "Buffer time before meeting in minutes"
          },
          "bufferAfter": {
            "type": "number",
            "description": "Buffer time after meeting in minutes"
          },
          "bufferMustStayWithinWorkingHours": {
            "type": "boolean",
            "description": "Only offer slots where buffer fits within working hours (no spillover into breaks or after-hours)"
          },
          "rollingSlots": {
            "type": "boolean",
            "description": "Restart the slot grid after each appointment instead of keeping a fixed grid per working block"
          },
          "color": {
            "type": "object",
            "description": "Color for the meeting type in RGB format, e.g. \"rgb(0, 153, 255)\"",
            "nullable": true
          }
        },
        "required": [
          "name",
          "description",
          "enableRedirect",
          "redirect",
          "passEventDetailsToRedirect",
          "duration",
          "channel",
          "customChannelName",
          "customChannelLink",
          "connectChannelName",
          "groupBooking",
          "showAvailableSlots",
          "enrichInvitee",
          "autoCreateSpace",
          "spaceAutoInvite",
          "confirmationButton",
          "bufferBefore",
          "bufferAfter",
          "bufferMustStayWithinWorkingHours",
          "rollingSlots"
        ]
      },
      "CssSetting": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "number"
          },
          "themePreset": {
            "type": "string",
            "enum": [
              "light",
              "dark",
              "eco",
              "charcoal",
              "bold"
            ]
          }
        },
        "required": [
          "mode"
        ]
      },
      "BookingPagePasswordSetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "Enable password protection for booking page"
          },
          "password": {
            "type": "object",
            "description": "Password for booking page access"
          }
        },
        "required": [
          "enable",
          "password"
        ]
      },
      "MeetingOptions": {
        "type": "object",
        "properties": {
          "allowedDurations": {
            "description": "Additional duration options in minutes (shown alongside primary duration)",
            "example": [
              15,
              30,
              60
            ],
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "allowSelectChannel": {
            "type": "boolean",
            "description": "Allow attendees to select meeting channel/location"
          },
          "allowHostSelection": {
            "type": "boolean",
            "description": "Allow attendees to select specific host (round-robin only)"
          },
          "forceHostSelection": {
            "type": "boolean",
            "description": "Force host selection (no \"any host\" option available)"
          },
          "allowedChannels": {
            "type": "array",
            "description": "Available channel options when allowSelectChannel is enabled",
            "items": {
              "$ref": "#/components/schemas/MeetingTypeChannel"
            }
          },
          "channelAvailabilities": {
            "type": "object",
            "description": "Per-channel availability overrides. Each value can be a UUID string (existing availability) or an inline availability object with \"name\", \"timezone\", and optional \"schedule\" and \"exceptions\" for creation."
          },
          "allowAddingGuests": {
            "type": "boolean",
            "description": "Allow attendees to invite additional guests"
          },
          "doubleOptIn": {
            "type": "string",
            "description": "Double opt-in confirmation setting"
          },
          "requireHostConfirmation": {
            "type": "string",
            "description": "Require host confirmation for bookings"
          },
          "enableClusterMeeting": {
            "type": "boolean",
            "description": "Show only time slots adjacent to existing meetings"
          },
          "enableBufferCarryOver": {
            "type": "boolean",
            "description": "Carry over buffer time to next available slot if needed"
          },
          "maxBufferCarryOverDelay": {
            "type": "number",
            "description": "Maximum hours for buffer carry-over delay (0-168)"
          },
          "allowPhoneOnlyBooking": {
            "type": "boolean",
            "description": "Allow phone-only bookings without email (API use case, requires phoneOnlyBooking in request)"
          },
          "hideReassignedHostDetails": {
            "type": "boolean",
            "description": "Hide the previous host's details from attendee reassignment emails"
          },
          "confirmationPageCssSetting": {
            "description": "Custom CSS settings for confirmation pages",
            "allOf": [
              {
                "$ref": "#/components/schemas/CssSetting"
              }
            ]
          },
          "bookingPagePassword": {
            "description": "Password protection settings for booking page",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingPagePasswordSetting"
              }
            ]
          }
        },
        "required": [
          "allowedDurations",
          "allowSelectChannel",
          "allowHostSelection",
          "forceHostSelection",
          "allowedChannels",
          "allowAddingGuests",
          "doubleOptIn",
          "requireHostConfirmation",
          "enableClusterMeeting",
          "enableBufferCarryOver",
          "maxBufferCarryOverDelay",
          "allowPhoneOnlyBooking",
          "hideReassignedHostDetails",
          "confirmationPageCssSetting",
          "bookingPagePassword"
        ]
      },
      "HoursSchedule": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "DaySchedule": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "hours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HoursSchedule"
            }
          }
        },
        "required": [
          "enabled",
          "hours"
        ]
      },
      "WeeklySchedule": {
        "type": "object",
        "properties": {
          "monday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "tuesday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "wednesday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "thursday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "friday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "saturday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "sunday": {
            "$ref": "#/components/schemas/DaySchedule"
          }
        },
        "required": [
          "monday",
          "tuesday",
          "wednesday",
          "thursday",
          "friday",
          "saturday",
          "sunday"
        ]
      },
      "FormFieldTarget": {
        "type": "string",
        "enum": [
          "email",
          "firstname",
          "lastname",
          "fullname",
          "phone",
          "marketing_consent",
          "other"
        ]
      },
      "FormFieldType": {
        "type": "string",
        "enum": [
          "email",
          "phone",
          "text-single",
          "text-multi",
          "number",
          "select",
          "checkbox-single",
          "checkbox-multi",
          "radio",
          "slide",
          "url",
          "file",
          "date-of-birth",
          "yes-no",
          "rating",
          "scale",
          "signature",
          "date",
          "time",
          "image",
          "heading",
          "separator",
          "page-break",
          "contact",
          "bank-details",
          "license-plate",
          "info-text",
          "info-image",
          "info-video",
          "currency",
          "location",
          "pdf-template",
          "file-download",
          "testimonial",
          "faq",
          "countdown",
          "loading",
          "quiz-reveal",
          "logos",
          "checklist",
          "html",
          "address"
        ]
      },
      "RichTextDocument": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "enum": [
              1
            ],
            "type": "number"
          },
          "html": {
            "type": "string"
          }
        },
        "required": [
          "schemaVersion",
          "html"
        ]
      },
      "FieldLocale": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "labelRichText": {
            "$ref": "#/components/schemas/RichTextDocument"
          },
          "placeholder": {
            "type": "string"
          }
        },
        "required": [
          "locale",
          "label"
        ]
      },
      "LogicalOperator": {
        "type": "string",
        "enum": [
          "and",
          "or"
        ]
      },
      "Expression": {
        "type": "object",
        "properties": {
          "operator": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LogicalOperator"
              }
            ]
          },
          "operands": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Expression"
                },
                {
                  "$ref": "#/components/schemas/ExpressionCondition"
                }
              ]
            }
          }
        },
        "required": [
          "operator",
          "operands"
        ]
      },
      "FieldOptions": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Optional plain-text option description"
          },
          "labelRichText": {
            "$ref": "#/components/schemas/RichTextDocument"
          },
          "descriptionRichText": {
            "$ref": "#/components/schemas/RichTextDocument"
          },
          "pointValue": {
            "type": "number",
            "description": "Points awarded when this option is selected (for scored forms)"
          },
          "locales": {
            "description": "Translations for the option label, same structure as field-level locales",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldLocale"
            }
          },
          "conditions": {
            "description": "Visibility gate on this single option, same Expression shape as\nfunnel-step conditions: the option renders only while the expression\nholds. Evaluated in the renderer against earlier answers plus the\nrouting context (e.g. `bookingBlockTarget` conditions).",
            "allOf": [
              {
                "$ref": "#/components/schemas/Expression"
              }
            ]
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "minValue": {
            "type": "number",
            "description": "Used by number fields, min value"
          },
          "maxValue": {
            "type": "number",
            "description": "Used by number fields, max value"
          }
        },
        "required": [
          "label",
          "value"
        ]
      },
      "SlideType": {
        "type": "string",
        "enum": [
          "checkbox",
          "page",
          "image",
          "icon"
        ]
      },
      "SlideOptions": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "multiselect": {
            "type": "boolean"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SlideType"
              }
            ]
          },
          "hideLabel": {
            "type": "boolean"
          },
          "childFields": {
            "type": "array",
            "description": "Per-page child-field instances inside the slide. The editor owns the\nSlideChildField shape (instanceId, index, dataFieldId, optional inline\ndefinition, legacy `required` flag, etc.). We accept it verbatim and\nkeep the type loose because the legacy import path adds extra fields the\neditor doesn't model. Declaring it on the DTO is what lets a save carry\nchildFields through: without it, class-transformer drops the unknown key\nfrom the request body, so DnD-added children never persist.",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "description",
          "multiselect",
          "type"
        ]
      },
      "FileFieldOptions": {
        "type": "object",
        "properties": {
          "allowedExtensions": {
            "description": "Allowed file extensions (e.g., pdf, docx, jpg)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxFileSizeMB": {
            "type": "number",
            "description": "Maximum file size in MB",
            "default": 5
          },
          "maxFiles": {
            "type": "number",
            "description": "Maximum number of files",
            "default": 1
          },
          "enableCameraCapture": {
            "type": "boolean",
            "description": "Enable camera capture on mobile devices (shows camera/file toggle). Only works when allowedExtensions includes image types.",
            "default": false
          }
        },
        "required": [
          "allowedExtensions",
          "maxFileSizeMB",
          "maxFiles"
        ]
      },
      "ContactOptions": {
        "type": "object",
        "properties": {
          "company": {
            "type": "boolean",
            "description": "Company name; becomes the invoice recipient when the field feeds billing",
            "default": false
          },
          "salutation": {
            "type": "boolean",
            "default": false
          },
          "firstName": {
            "type": "boolean",
            "default": true
          },
          "lastName": {
            "type": "boolean",
            "default": true
          },
          "email": {
            "type": "boolean",
            "default": true
          },
          "phone": {
            "type": "boolean",
            "default": true
          },
          "mobile": {
            "type": "boolean",
            "default": false
          },
          "birthdate": {
            "type": "boolean",
            "default": false
          },
          "street": {
            "type": "boolean",
            "default": false
          },
          "addressSupplement": {
            "type": "boolean",
            "default": false
          },
          "zip": {
            "type": "boolean",
            "default": false
          },
          "city": {
            "type": "boolean",
            "default": false
          },
          "country": {
            "type": "boolean",
            "default": false
          },
          "vatId": {
            "type": "boolean",
            "description": "USt-IdNr. / VAT ID, for B2B and reverse-charge invoicing",
            "default": false
          }
        }
      },
      "BankDetailsOptions": {
        "type": "object",
        "properties": {
          "showBic": {
            "type": "boolean",
            "default": true
          },
          "showAccountHolder": {
            "type": "boolean",
            "default": true
          },
          "showSignature": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "LicensePlateOptions": {
        "type": "object",
        "properties": {
          "countryFilter": {
            "type": "string",
            "enum": [
              "all",
              "de"
            ],
            "default": "all",
            "description": "Country format filter: all = any country, de = German format only"
          }
        }
      },
      "PdfTemplateOptions": {
        "type": "object",
        "properties": {
          "fileAssetId": {
            "type": "string",
            "description": "FileAsset ID of the uploaded PDF template"
          },
          "pdfmeTemplate": {
            "type": "object",
            "description": "pdfme template schema JSON (positions of fields on the PDF). Does not include the basePdf bytes."
          },
          "requireSignature": {
            "type": "boolean",
            "description": "When true, respondent must draw a signature before accepting the document.",
            "default": false
          },
          "requireSignatureOtp": {
            "type": "boolean",
            "description": "When true, respondent must verify their identity via email OTP (FES) before signing.",
            "default": false
          }
        },
        "required": [
          "fileAssetId",
          "pdfmeTemplate",
          "requireSignature"
        ]
      },
      "FileDownloadOptions": {
        "type": "object",
        "properties": {
          "fileAssetIds": {
            "description": "FileAsset IDs of library files to offer for download",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fileNames": {
            "type": "object",
            "description": "Map of fileAssetId → original filename for display without extra API calls",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "fileAssetIds"
        ]
      },
      "DataFieldRichText": {
        "type": "object",
        "properties": {
          "label": {
            "$ref": "#/components/schemas/RichTextDocument"
          },
          "helpText": {
            "$ref": "#/components/schemas/RichTextDocument"
          }
        }
      },
      "TestimonialItemOptions": {
        "type": "object",
        "properties": {
          "quote": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          },
          "rating": {
            "type": "number",
            "description": "Star rating, 1-5. Omit for no stars."
          }
        },
        "required": [
          "quote"
        ]
      },
      "FaqItemOptions": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          }
        },
        "required": [
          "question",
          "answer"
        ]
      },
      "LogoItemOptions": {
        "type": "object",
        "properties": {
          "imageUrl": {
            "type": "string"
          },
          "alt": {
            "type": "string"
          }
        },
        "required": [
          "imageUrl"
        ]
      },
      "ChecklistItemOptions": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ]
      },
      "CountdownBlockOptions": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "date",
              "duration"
            ]
          },
          "endsAt": {
            "type": "string",
            "description": "ISO 8601 instant, `date` mode only"
          },
          "durationSeconds": {
            "type": "number",
            "description": "Countdown length, `duration` mode only"
          },
          "expiredText": {
            "type": "string"
          },
          "hideWhenExpired": {
            "type": "boolean"
          }
        },
        "required": [
          "mode"
        ]
      },
      "LoadingBlockOptions": {
        "type": "object",
        "properties": {
          "durationSeconds": {
            "type": "number"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "durationSeconds"
        ]
      },
      "QuizRevealTierOptions": {
        "type": "object",
        "properties": {
          "minScorePercent": {
            "type": "number",
            "description": "Lowest score percentage (0-100) landing here"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          }
        },
        "required": [
          "minScorePercent",
          "title"
        ]
      },
      "QuizRevealBlockOptions": {
        "type": "object",
        "properties": {
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuizRevealTierOptions"
            }
          }
        },
        "required": [
          "tiers"
        ]
      },
      "HtmlBlockOptions": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "required": [
          "code"
        ]
      },
      "BlockOptions": {
        "type": "object",
        "properties": {
          "richText": {
            "description": "Rich presentation for this field's semantic label and help text.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DataFieldRichText"
              }
            ]
          },
          "testimonials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TestimonialItemOptions"
            }
          },
          "faqs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FaqItemOptions"
            }
          },
          "logos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogoItemOptions"
            }
          },
          "checklist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChecklistItemOptions"
            }
          },
          "countdown": {
            "$ref": "#/components/schemas/CountdownBlockOptions"
          },
          "loading": {
            "$ref": "#/components/schemas/LoadingBlockOptions"
          },
          "quizReveal": {
            "$ref": "#/components/schemas/QuizRevealBlockOptions"
          },
          "html": {
            "$ref": "#/components/schemas/HtmlBlockOptions"
          }
        }
      },
      "DataField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "target": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FormFieldTarget"
              }
            ]
          },
          "fieldType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FormFieldType"
              }
            ]
          },
          "order": {
            "type": "number",
            "description": "Where this field sits when its values are read back on a record.\n\nA contact's custom fields are a jsonb bag keyed by field name, so the card\nshowing them had no order but the one values happened to be written in —\nwhich put a postcode above the street it belongs under. Ordering the\ndefinitions gives every surface reading `additionalData` one answer.\nLower first; ties fall back to id, so untouched companies keep the order\nthey already see."
          },
          "locales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldLocale"
            }
          },
          "default": {
            "type": "boolean"
          },
          "required": {
            "type": "boolean"
          },
          "hidden": {
            "type": "boolean"
          },
          "hideUntilChange": {
            "type": "boolean"
          },
          "mutable": {
            "type": "boolean"
          },
          "defaultValue": {
            "type": "string"
          },
          "placeholder": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldOptions"
            }
          },
          "slideOptions": {
            "$ref": "#/components/schemas/SlideOptions"
          },
          "fileFieldOptions": {
            "description": "Configuration for file upload fields.\nOnly used when fieldType is 'file'.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileFieldOptions"
              }
            ]
          },
          "contactOptions": {
            "description": "Configuration for contact composite fields.\nControls which sub-inputs (name, email, phone, address, etc.) are shown.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactOptions"
              }
            ]
          },
          "hubspotContactField": {
            "type": "string"
          },
          "hubspotCompanyField": {
            "type": "string"
          },
          "smartWeContactField": {
            "type": "string"
          },
          "smartWeCompanyField": {
            "type": "string"
          },
          "pipedriveContactField": {
            "type": "string"
          },
          "closeContactField": {
            "type": "string"
          },
          "salesforceContactField": {
            "type": "string"
          },
          "salesforceLeadField": {
            "type": "string"
          },
          "salesforceCaseField": {
            "type": "string"
          },
          "salesforceOpportunityField": {
            "type": "string"
          },
          "salesforceAccountField": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "helpText": {
            "type": "string",
            "description": "Optional help text shown below the field in the booking form.\nProvides additional guidance to users filling out the form."
          },
          "bankDetailsOptions": {
            "description": "Configuration for bank details composite fields.\nControls which optional sub-inputs (BIC, account holder, signature) are shown.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BankDetailsOptions"
              }
            ]
          },
          "licensePlateOptions": {
            "description": "Configuration for license plate fields.\nControls country format validation.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LicensePlateOptions"
              }
            ]
          },
          "textFormatOptions": {
            "nullable": true,
            "description": "Format rule for short-text fields (character count, digit count, country\npreset or mask). Null means no rule, which is every pre-existing field.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TextFormatOptions"
              }
            ]
          },
          "pdfTemplateOptions": {
            "description": "Configuration for PDF template fields.\nHolds the uploaded template PDF reference and pdfme schema JSON.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfTemplateOptions"
              }
            ]
          },
          "fileDownloadOptions": {
            "description": "Configuration for file download display fields.\nHolds IDs of library files to offer for download.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileDownloadOptions"
              }
            ]
          },
          "blockOptions": {
            "description": "Configuration for the v2 funnel content blocks (testimonial, FAQ,\ncountdown, loading, quiz reveal, logos, checklist, html).\n\nOne column for all of them: the shapes are disjoint and each is only read\nby the block that owns it, so eight nullable columns would buy nothing but\neight migrations. Nullable, so release N-1 keeps serving these rows.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BlockOptions"
              }
            ]
          },
          "displayStyle": {
            "type": "object",
            "description": "Controls how options are displayed for radio/checkbox/select fields.\n'default' - Standard list view\n'card' - Card grid with optional icons"
          },
          "conditions": {
            "type": "object",
            "nullable": true,
            "description": "Conditional visibility expression. When set, the field is only shown\nto the visitor when the expression evaluates to true against current form values.\nUses the same Expression/ExpressionCondition structure as routing rules."
          },
          "headingLevel": {
            "type": "number",
            "description": "Heading level for heading fields (1–6).\nDefaults to 2 (renders as <h2>)."
          },
          "signingPaused": {
            "type": "boolean",
            "description": "Computed per request when a public form is served — not persisted.\nPopulated by `PublicFormController.withSigningAvailability`.\n\nTrue when the owning company has used this month's signature allowance, so\nthe renderer shows this field as temporarily unable to take a signature\ninstead of a signature pad. The rest of the form still renders and still\nsubmits: these forms are lead capture, and losing the lead would cost the\nowner far more than the unsigned document."
          },
          "showInfobox": {
            "type": "boolean",
            "description": "Only for data fields of type slide, enable to show an infobox."
          },
          "infoboxText": {
            "type": "string",
            "description": "Only for data fields of type slide, custom infobox text."
          },
          "companyId": {
            "type": "string"
          },
          "evalancheFieldId": {
            "type": "string"
          },
          "klicktippFieldId": {
            "type": "string"
          },
          "min": {
            "type": "number",
            "description": "Currently used by number field as min value.\nFor string field, it is minimum amount of characters."
          },
          "max": {
            "type": "number"
          },
          "style": {
            "type": "number",
            "description": "For Phone Number field - used to set the style of phone input.\n0 - Simple (Default)\n1 - With country code picker"
          },
          "defaultCountryCode": {
            "type": "string",
            "description": "For Phone Number field - default country code (e.g., \"+1\", \"+49\", \"+44\").\nUsed when style is WITH_COUNTRY_CODE_PICKER to set the initial country selection."
          },
          "useMarkdown": {
            "type": "boolean",
            "description": "When true, field.label is rendered through markdown-it (html: false).\nAllows **bold**, _italic_, `code`, and links in field labels."
          },
          "requireSignatureOtp": {
            "type": "boolean",
            "description": "When true, the signer must verify their email via OTP before the signature canvas is unlocked."
          }
        },
        "required": [
          "id",
          "label",
          "name",
          "target",
          "fieldType",
          "order",
          "locales",
          "default",
          "required",
          "hidden",
          "hideUntilChange",
          "mutable",
          "options",
          "createdAt",
          "updatedAt",
          "showInfobox",
          "companyId",
          "useMarkdown",
          "requireSignatureOtp"
        ]
      },
      "FormField": {
        "type": "object",
        "properties": {
          "form": {
            "$ref": "#/components/schemas/Form"
          },
          "formId": {
            "type": "string"
          },
          "dataField": {
            "$ref": "#/components/schemas/DataField"
          },
          "dataFieldId": {
            "type": "number"
          },
          "index": {
            "type": "number"
          }
        },
        "required": [
          "form",
          "formId",
          "dataField",
          "dataFieldId",
          "index"
        ]
      },
      "FunnelStepDataField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "funnelStep": {
            "$ref": "#/components/schemas/FunnelStep"
          },
          "funnelStepId": {
            "type": "string"
          },
          "funnelStepFormId": {
            "type": "string"
          },
          "dataField": {
            "$ref": "#/components/schemas/DataField"
          },
          "dataFieldId": {
            "type": "number"
          },
          "order": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "funnelStep",
          "funnelStepId",
          "dataField",
          "dataFieldId",
          "order"
        ]
      },
      "FunnelStep": {
        "type": "object",
        "properties": {
          "form": {
            "$ref": "#/components/schemas/Form"
          },
          "id": {
            "type": "string"
          },
          "index": {
            "type": "number"
          },
          "formId": {
            "type": "string"
          },
          "funnelStepDataFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FunnelStepDataField"
            }
          }
        },
        "required": [
          "form",
          "id",
          "index",
          "formId",
          "funnelStepDataFields"
        ]
      },
      "FunnelQualifier": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string"
          },
          "expression": {
            "$ref": "#/components/schemas/Expression"
          }
        },
        "required": [
          "fieldId",
          "expression"
        ]
      },
      "SelectionPageLayout": {
        "type": "string",
        "enum": [
          "grid",
          "list",
          "cards",
          "tiles",
          "spotlight",
          "minimal",
          "showcase"
        ]
      },
      "AvailabilityExceptionOwner": {
        "type": "string",
        "enum": [
          "company",
          "user"
        ]
      },
      "AvailabilityException": {
        "type": "object",
        "properties": {
          "ownerId": {
            "type": "string"
          },
          "ownerType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailabilityExceptionOwner"
              }
            ]
          },
          "available": {
            "type": "boolean"
          },
          "start": {
            "type": "string",
            "description": "Start time stored as clock time: \"YYYY-MM-DDTHH:mm\" (e.g., \"2026-01-20T10:00\").\nInterpreted in availability.timezone when querying.\n\nBACKWARDS COMPATIBILITY (migration in progress since Dec 2025):\nLegacy data has Z suffix (e.g., \"2026-01-20T10:00:00.000Z\") and is interpreted as UTC.\nWhen all legacy exceptions expire or are edited, the Z-suffix handling can be removed."
          },
          "end": {
            "type": "string",
            "description": "End time stored as clock time: \"YYYY-MM-DDTHH:mm\" (e.g., \"2026-01-20T17:00\").\nInterpreted in availability.timezone when querying.\n\nBACKWARDS COMPATIBILITY (migration in progress since Dec 2025):\nLegacy data has Z suffix (e.g., \"2026-01-20T17:00:00.000Z\") and is interpreted as UTC.\nWhen all legacy exceptions expire or are edited, the Z-suffix handling can be removed."
          },
          "title": {
            "type": "string",
            "description": "Optional title"
          },
          "note": {
            "type": "string",
            "description": "Optional note / description"
          },
          "id": {
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "availabilityId": {
            "type": "string"
          }
        },
        "required": [
          "ownerId",
          "ownerType",
          "available",
          "start",
          "end",
          "id",
          "createdAt",
          "updatedAt",
          "availabilityId"
        ]
      },
      "ResourceChannel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Optional name to show for resource channel, fall back to user name",
            "nullable": true
          },
          "resource": {
            "description": "Selected resource",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "groupName": {
            "type": "string",
            "description": "If resource channel is part of a group, this is the name of the group.\nMultiple resource channels can be part of the same group, in which case the name is the same.\nMultiple resources with the same group name are grouped and only the group name is shown as a\nresource. Any resource within the group can be selected according to the items `groupIndex`.\nIf resource channel is the only group member, this has no effect."
          },
          "groupMemberIndex": {
            "type": "number",
            "description": "If resource channel is part of a group, this is the zero-based index to determine order\nthat resource channel will be chosen within the group. Group members with index 0 will be chosen\nfirst, then 1, then 2, etc.\nIf `groupName` is null, this has no effect."
          },
          "availability": {
            "description": "Selected availability (fall back to default)",
            "allOf": [
              {
                "$ref": "#/components/schemas/Availability"
              }
            ]
          },
          "meetingType": {
            "description": "Must belong to a meeting type or a meeting type template",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "meetingTypeTemplate": {
            "description": "Must belong to a meeting type or a meeting type template",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeTemplate"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "resourceId": {
            "type": "string"
          },
          "availabilityId": {
            "type": "string"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "meetingTypeTemplateId": {
            "type": "string"
          }
        },
        "required": [
          "resource",
          "id",
          "resourceId"
        ]
      },
      "Availability": {
        "type": "object",
        "properties": {
          "timezone": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "schedule": {
            "$ref": "#/components/schemas/WeeklySchedule"
          },
          "useExplicitAvailability": {
            "type": "boolean",
            "description": "When enabled, calendar events with the specified title are offered as\nbookable slots IN ADDITION to the weekly schedule (they behave like\npositive exceptions, see `UserAvailabilityService`). The weekly grid\nstays editable. Not to be confused with `scheduleSource`, which decides\nwhere the grid itself comes from."
          },
          "scheduleSource": {
            "type": "object",
            "description": "Where the weekly schedule comes from. `manual` is the user typing it;\n`outlook` means it is read from the mailbox's Outlook working hours and\nthe editor refuses direct schedule/timezone edits until switched back.\nNever read during slot calculation: to the availability engine an\nOutlook-sourced schedule is just a schedule."
          },
          "scheduleSourceConnectionId": {
            "type": "string",
            "nullable": true
          },
          "scheduleSyncedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Last time Outlook was consulted for this schedule (success or not)."
          },
          "scheduleSyncError": {
            "type": "object",
            "nullable": true,
            "description": "Why the last consultation of Outlook could not update the schedule."
          },
          "explicitAvailabilityEventTitle": {
            "type": "string",
            "nullable": true,
            "description": "The calendar event title to look for when useExplicitAvailability is enabled.\nEvents with this title will be treated as available booking slots."
          },
          "userId": {
            "type": "string"
          },
          "availabilityExceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityException"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "meetingType": {
            "$ref": "#/components/schemas/MeetingType"
          },
          "meetingTypeTemplate": {
            "$ref": "#/components/schemas/MeetingTypeTemplate"
          },
          "resourceChannels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceChannel"
            }
          }
        },
        "required": [
          "timezone",
          "id",
          "name",
          "schedule",
          "useExplicitAvailability",
          "scheduleSource",
          "userId",
          "createdAt",
          "updatedAt",
          "resourceChannels"
        ]
      },
      "CompanyTier": {
        "type": "string",
        "enum": [
          "basic",
          "essentials",
          "growth",
          "teams",
          "light",
          "suite",
          "premium",
          "enterprise"
        ]
      },
      "SubscriptionStatus": {
        "type": "string",
        "enum": [
          "active",
          "past_due",
          "unpaid",
          "canceled",
          "incomplete",
          "incomplete_expired",
          "trialing"
        ]
      },
      "Currency": {
        "type": "string",
        "enum": [
          "USD",
          "EUR"
        ],
        "description": "User's preferred currency for billing.\nIf null, detected currency from billing address country is used."
      },
      "BrandType": {
        "type": "string",
        "enum": [
          "solo",
          "team"
        ],
        "description": "Reflects solo/team choice during onboarding\nbut doesn't affect anything else"
      },
      "EmailSender": {
        "type": "string",
        "enum": [
          "custom-smtp",
          "microsoft-smtp"
        ],
        "description": "Sender to use for sending emails. Defaults to null\nwhich uses the default sender. If a sender is configured\nthe configuration must still be fetched. If there is an\nerror with configuration, fall back to default and notify."
      },
      "BusinessCardBackground": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "solid",
              "gradient",
              "image"
            ]
          },
          "value": {
            "type": "string"
          }
        }
      },
      "BusinessCardTheme": {
        "type": "object",
        "properties": {
          "preset": {
            "type": "string",
            "description": "Theme preset key, e.g. classic, nocturne"
          },
          "accent": {
            "type": "string",
            "description": "Hex accent color override"
          },
          "background": {
            "$ref": "#/components/schemas/BusinessCardBackground"
          },
          "font": {
            "type": "string",
            "enum": [
              "sans",
              "serif",
              "grotesk",
              "mono",
              "condensed",
              "rounded"
            ]
          },
          "buttonShape": {
            "type": "string",
            "enum": [
              "sharp",
              "rounded",
              "pill"
            ]
          }
        }
      },
      "ConnectWaitingRoomSettings": {
        "type": "object",
        "properties": {
          "welcomeText": {
            "type": "string",
            "description": "Welcome text shown above the prejoin card"
          },
          "logoUrl": {
            "type": "string",
            "description": "Logo shown on the waiting screen, overrides the company logo"
          },
          "backgroundImageUrl": {
            "type": "string",
            "description": "Full-screen background image behind the prejoin card"
          },
          "backgroundVideoUrl": {
            "type": "string",
            "description": "Muted looping background video behind the prejoin card, takes precedence over the background image"
          },
          "brandColor": {
            "type": "string",
            "description": "Accent color for the join button, hex format",
            "example": "#2563eb"
          }
        }
      },
      "FeatureAccess": {
        "type": "object",
        "properties": {
          "polls": {
            "type": "boolean"
          },
          "advancedMeetingTypeSettings": {
            "type": "boolean"
          },
          "workflows": {
            "type": "boolean"
          },
          "maxWorkflows": {
            "type": "number",
            "description": "-1 means unlimited"
          },
          "meetingTypeCommunications": {
            "type": "boolean"
          },
          "multiHostBooking": {
            "type": "boolean"
          },
          "groupBooking": {
            "type": "boolean"
          },
          "enrichInvitee": {
            "type": "boolean"
          },
          "autoCreateSpace": {
            "type": "boolean"
          },
          "zapier": {
            "type": "boolean"
          },
          "personalizedBranding": {
            "type": "boolean"
          },
          "visualBranding": {
            "type": "boolean"
          },
          "crmIntegration": {
            "type": "boolean"
          },
          "cmpIntegration": {
            "type": "boolean"
          },
          "routingForms": {
            "type": "boolean"
          },
          "basicForms": {
            "type": "boolean"
          },
          "selectionPages": {
            "type": "boolean"
          },
          "dataFields": {
            "type": "boolean"
          },
          "roundRobin": {
            "type": "boolean"
          },
          "accountOwnerMatching": {
            "type": "boolean"
          },
          "handoff": {
            "type": "boolean"
          },
          "reschedule": {
            "type": "boolean"
          },
          "notifications": {
            "type": "boolean"
          },
          "workspaces": {
            "type": "boolean"
          },
          "api": {
            "type": "boolean"
          },
          "showcaseHubs": {
            "type": "boolean"
          },
          "meetergoConnect": {
            "type": "boolean"
          },
          "connectMaxParticipants": {
            "type": "number"
          },
          "connectMaxCallMinutes": {
            "type": "number"
          },
          "connectRecording": {
            "type": "boolean"
          },
          "connectBreakouts": {
            "type": "boolean"
          },
          "connectWebinars": {
            "type": "boolean"
          },
          "webhooks": {
            "type": "boolean"
          },
          "wallets": {
            "type": "boolean"
          },
          "dealSpace": {
            "type": "boolean"
          },
          "funnel": {
            "type": "boolean"
          },
          "unlimitedMeetingTypes": {
            "type": "boolean"
          },
          "salesforceIntegration": {
            "type": "boolean"
          },
          "salesforceStudioMapping": {
            "type": "boolean"
          },
          "salesforceRouting": {
            "type": "boolean"
          },
          "maximumCalendars": {
            "type": "number"
          },
          "disableIntercom": {
            "type": "boolean"
          },
          "supportChat": {
            "type": "boolean"
          },
          "evalancheIntegration": {
            "type": "boolean"
          },
          "analytics": {
            "type": "boolean"
          },
          "bookingFunnel": {
            "type": "boolean"
          },
          "funnelProgressAndInfobox": {
            "type": "boolean"
          },
          "contactsBeta": {
            "type": "boolean"
          },
          "paypalIntegration": {
            "type": "boolean"
          },
          "stripeIntegration": {
            "type": "boolean"
          },
          "mollieIntegration": {
            "type": "boolean"
          },
          "meetingTypeTemplates": {
            "type": "boolean"
          },
          "nextBeta": {
            "type": "boolean"
          },
          "video": {
            "type": "boolean"
          },
          "emailLayout": {
            "type": "boolean"
          },
          "reviews": {
            "type": "boolean"
          },
          "brevoIntegration": {
            "type": "boolean"
          },
          "getResponseIntegration": {
            "type": "boolean"
          },
          "customDomain": {
            "type": "boolean"
          },
          "maxCustomDomains": {
            "type": "number"
          },
          "maxViewers": {
            "type": "number",
            "description": "-1 means unlimited"
          },
          "apiPlatform": {
            "type": "boolean"
          },
          "slackIntegration": {
            "type": "boolean"
          },
          "calgent": {
            "type": "boolean"
          },
          "miraPipelineAutopilot": {
            "type": "boolean"
          },
          "fileUploads": {
            "type": "boolean"
          },
          "knowledgePageLimit": {
            "type": "number"
          },
          "storageQuotaMB": {
            "type": "number"
          },
          "recordingRetentionDays": {
            "type": "number"
          },
          "multiBooking": {
            "type": "boolean"
          },
          "bundles": {
            "type": "boolean"
          },
          "maxCrmDeals": {
            "type": "number"
          },
          "maxShowcaseHubs": {
            "type": "number"
          },
          "maxDealSpaces": {
            "type": "number"
          },
          "waitlist": {
            "type": "boolean"
          },
          "notetaker": {
            "type": "boolean"
          },
          "notetakerRecording": {
            "type": "boolean"
          },
          "maxNotetakerRecapsPerMonth": {
            "type": "number"
          },
          "maxLinkedInLookupsPerMonth": {
            "type": "number"
          },
          "quickMail": {
            "type": "boolean"
          },
          "enrichDealSpaceCompany": {
            "type": "boolean"
          },
          "whatsappAddon": {
            "type": "boolean"
          },
          "conversionWidgetNativeScheduling": {
            "type": "boolean"
          },
          "instagramDms": {
            "type": "boolean"
          },
          "bookingCoupons": {
            "type": "boolean"
          },
          "crmEmailSync": {
            "type": "boolean"
          },
          "websiteChat": {
            "type": "boolean"
          },
          "emailChannel": {
            "type": "boolean"
          },
          "teamChat": {
            "type": "boolean"
          },
          "aiPhoneAssistant": {
            "type": "boolean"
          },
          "aiPhoneAssistantAdvanced": {
            "type": "boolean"
          },
          "bookingLocations": {
            "type": "boolean"
          },
          "bookingBlocks": {
            "type": "boolean"
          },
          "invoicing": {
            "type": "boolean"
          },
          "purchaseDocuments": {
            "type": "boolean"
          },
          "hostedEvents": {
            "type": "boolean"
          },
          "hostedEventTicketing": {
            "type": "boolean"
          },
          "paymentLinks": {
            "type": "boolean"
          },
          "feedbackLoop": {
            "type": "boolean"
          },
          "newsletter": {
            "type": "boolean"
          },
          "maxFormSubmissionsPerMonth": {
            "type": "number"
          },
          "maxSignatureRequestsPerMonth": {
            "type": "number"
          },
          "advancedSignatures": {
            "type": "boolean"
          },
          "maxAdvancedSignatureRequestsPerMonth": {
            "type": "number"
          },
          "maxInvoicesPerMonth": {
            "type": "number"
          },
          "whatsappAiAgent": {
            "type": "boolean"
          },
          "customSmtp": {
            "type": "boolean"
          },
          "csvExport": {
            "type": "boolean"
          }
        },
        "required": [
          "polls",
          "advancedMeetingTypeSettings",
          "workflows",
          "maxWorkflows",
          "meetingTypeCommunications",
          "multiHostBooking",
          "groupBooking",
          "enrichInvitee",
          "autoCreateSpace",
          "zapier",
          "personalizedBranding",
          "visualBranding",
          "crmIntegration",
          "cmpIntegration",
          "routingForms",
          "basicForms",
          "selectionPages",
          "dataFields",
          "roundRobin",
          "accountOwnerMatching",
          "handoff",
          "reschedule",
          "notifications",
          "workspaces",
          "api",
          "showcaseHubs",
          "meetergoConnect",
          "connectMaxParticipants",
          "connectMaxCallMinutes",
          "connectRecording",
          "connectBreakouts",
          "connectWebinars",
          "webhooks",
          "wallets",
          "dealSpace",
          "funnel",
          "unlimitedMeetingTypes",
          "salesforceIntegration",
          "salesforceStudioMapping",
          "salesforceRouting",
          "maximumCalendars",
          "disableIntercom",
          "supportChat",
          "evalancheIntegration",
          "analytics",
          "bookingFunnel",
          "funnelProgressAndInfobox",
          "contactsBeta",
          "paypalIntegration",
          "stripeIntegration",
          "mollieIntegration",
          "meetingTypeTemplates",
          "nextBeta",
          "video",
          "emailLayout",
          "reviews",
          "brevoIntegration",
          "getResponseIntegration",
          "customDomain",
          "maxCustomDomains",
          "maxViewers",
          "apiPlatform",
          "slackIntegration",
          "calgent",
          "miraPipelineAutopilot",
          "fileUploads",
          "knowledgePageLimit",
          "storageQuotaMB",
          "recordingRetentionDays",
          "multiBooking",
          "bundles",
          "maxCrmDeals",
          "maxShowcaseHubs",
          "maxDealSpaces",
          "waitlist",
          "notetaker",
          "notetakerRecording",
          "maxNotetakerRecapsPerMonth",
          "maxLinkedInLookupsPerMonth",
          "quickMail",
          "enrichDealSpaceCompany",
          "whatsappAddon",
          "conversionWidgetNativeScheduling",
          "instagramDms",
          "bookingCoupons",
          "crmEmailSync",
          "websiteChat",
          "emailChannel",
          "teamChat",
          "aiPhoneAssistant",
          "aiPhoneAssistantAdvanced",
          "bookingLocations",
          "bookingBlocks",
          "invoicing",
          "purchaseDocuments",
          "hostedEvents",
          "hostedEventTicketing",
          "paymentLinks",
          "feedbackLoop",
          "newsletter",
          "maxFormSubmissionsPerMonth",
          "maxSignatureRequestsPerMonth",
          "advancedSignatures",
          "maxAdvancedSignatureRequestsPerMonth",
          "maxInvoicesPerMonth",
          "whatsappAiAgent",
          "customSmtp",
          "csvExport"
        ]
      },
      "OutlookConnectionRequirementScope": {
        "type": "string",
        "enum": [
          "teams",
          "outlookCalendar"
        ],
        "description": "Where the \"host needs a working Microsoft connection\" requirement applies.\nEmpty array = no enforcement. See `OutlookConnectionRequirementScope` for\nthe meaning of each scope. Default empty for backwards compatibility."
      },
      "OutlookConnectionType": {
        "type": "string",
        "enum": [
          "graph",
          "exchangeTeams"
        ],
        "description": "Which Microsoft connection types are accepted as \"active\" when any scope\nin `outlookConnectionRequirementScopes` is enabled. A host needs at least\none matching active connection. Defaults to both Graph and Exchange Teams."
      },
      "MiraDataAccess": {
        "type": "object",
        "properties": {
          "meetingTypes": {
            "type": "boolean"
          },
          "appointments": {
            "type": "boolean"
          },
          "workflows": {
            "type": "boolean"
          },
          "forms": {
            "type": "boolean"
          },
          "files": {
            "type": "boolean"
          },
          "contacts": {
            "type": "boolean"
          },
          "companies": {
            "type": "boolean"
          },
          "deals": {
            "type": "boolean"
          },
          "invoicing": {
            "type": "boolean"
          },
          "recordings": {
            "type": "boolean"
          }
        },
        "required": [
          "meetingTypes",
          "appointments",
          "workflows",
          "forms",
          "files",
          "contacts",
          "companies",
          "deals",
          "invoicing",
          "recordings"
        ]
      },
      "MiraWebChat": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "publicKey": {
            "type": "object",
            "nullable": true
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assistantName": {
            "type": "string"
          },
          "welcomeMessage": {
            "type": "string"
          },
          "accentColor": {
            "type": "string"
          },
          "logoUrl": {
            "type": "object",
            "nullable": true
          },
          "launcherPosition": {
            "type": "string",
            "enum": [
              "bottom-right",
              "bottom-left"
            ]
          },
          "launcherIcon": {
            "type": "string",
            "enum": [
              "chat",
              "sparkle",
              "question",
              "custom"
            ]
          },
          "launcherImageUrl": {
            "type": "object",
            "nullable": true
          },
          "launcherLabel": {
            "type": "string"
          },
          "quickActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "greetingEnabled": {
            "type": "boolean"
          },
          "greetingMessage": {
            "type": "string"
          },
          "autoOpen": {
            "type": "boolean"
          },
          "autoOpenDelay": {
            "type": "number"
          },
          "autoLocalize": {
            "type": "boolean"
          },
          "defaultLanguage": {
            "type": "string",
            "enum": [
              "de",
              "en"
            ]
          },
          "customPrompt": {
            "type": "string"
          },
          "qualify": {
            "type": "boolean"
          },
          "routingFormId": {
            "type": "object",
            "nullable": true
          },
          "bookingMeetingTypeId": {
            "type": "object",
            "nullable": true
          },
          "useKnowledge": {
            "type": "boolean"
          },
          "aiDisclosure": {
            "type": "boolean"
          },
          "privacyPolicyUrl": {
            "type": "object",
            "nullable": true
          },
          "imprintUrl": {
            "type": "object",
            "nullable": true
          },
          "transcriptRetentionDays": {
            "type": "number"
          },
          "humanHandoff": {
            "type": "boolean"
          },
          "handoffOfflineBehavior": {
            "type": "string",
            "enum": [
              "lead",
              "message"
            ]
          },
          "conversationRetentionDays": {
            "type": "number"
          }
        },
        "required": [
          "enabled",
          "publicKey",
          "allowedDomains",
          "assistantName",
          "welcomeMessage",
          "accentColor",
          "logoUrl",
          "launcherPosition",
          "launcherIcon",
          "launcherImageUrl",
          "launcherLabel",
          "quickActions",
          "greetingEnabled",
          "greetingMessage",
          "autoOpen",
          "autoOpenDelay",
          "autoLocalize",
          "defaultLanguage",
          "customPrompt",
          "qualify",
          "routingFormId",
          "bookingMeetingTypeId",
          "useKnowledge",
          "aiDisclosure",
          "privacyPolicyUrl",
          "imprintUrl",
          "transcriptRetentionDays",
          "humanHandoff",
          "handoffOfflineBehavior",
          "conversationRetentionDays"
        ]
      },
      "MiraAssistantProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "welcomeMessage": {
            "type": "string"
          },
          "logoUrl": {
            "type": "object",
            "nullable": true
          },
          "purpose": {
            "type": "string",
            "enum": [
              "sales",
              "support",
              "booking",
              "reception"
            ]
          },
          "tone": {
            "type": "string",
            "enum": [
              "friendly",
              "professional",
              "short",
              "formal",
              "concierge"
            ]
          },
          "instructions": {
            "type": "string"
          },
          "rawInstructions": {
            "type": "string"
          },
          "avoidInstructions": {
            "type": "string"
          },
          "outOfHoursMessage": {
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "boundaries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "knowledgeSourceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bookingMeetingTypeId": {
            "type": "object",
            "nullable": true
          },
          "qualificationQuestions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "routingFormId": {
            "type": "object",
            "nullable": true
          },
          "openingHoursAvailabilityId": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "welcomeMessage",
          "logoUrl",
          "purpose",
          "tone",
          "instructions",
          "rawInstructions",
          "avoidInstructions",
          "outOfHoursMessage",
          "capabilities",
          "boundaries",
          "knowledgeSourceIds",
          "bookingMeetingTypeId",
          "qualificationQuestions",
          "routingFormId",
          "openingHoursAvailabilityId"
        ]
      },
      "MiraTestDriveResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "passed": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "passed"
        ]
      },
      "MiraTestDrive": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string"
          },
          "passed": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MiraTestDriveResult"
            }
          }
        },
        "required": [
          "at",
          "passed",
          "total",
          "results"
        ]
      },
      "MiraWebChatChannel": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "publicKey": {
            "type": "object",
            "nullable": true
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assistantName": {
            "type": "string"
          },
          "welcomeMessage": {
            "type": "string"
          },
          "accentColor": {
            "type": "string"
          },
          "logoUrl": {
            "type": "object",
            "nullable": true
          },
          "launcherPosition": {
            "type": "string",
            "enum": [
              "bottom-right",
              "bottom-left"
            ]
          },
          "launcherIcon": {
            "type": "string",
            "enum": [
              "chat",
              "sparkle",
              "question",
              "custom"
            ]
          },
          "launcherImageUrl": {
            "type": "object",
            "nullable": true
          },
          "launcherLabel": {
            "type": "string"
          },
          "quickActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "greetingEnabled": {
            "type": "boolean"
          },
          "greetingMessage": {
            "type": "string"
          },
          "autoOpen": {
            "type": "boolean"
          },
          "autoOpenDelay": {
            "type": "number"
          },
          "autoLocalize": {
            "type": "boolean"
          },
          "defaultLanguage": {
            "type": "string",
            "enum": [
              "de",
              "en"
            ]
          },
          "customPrompt": {
            "type": "string"
          },
          "qualify": {
            "type": "boolean"
          },
          "routingFormId": {
            "type": "object",
            "nullable": true
          },
          "bookingMeetingTypeId": {
            "type": "object",
            "nullable": true
          },
          "useKnowledge": {
            "type": "boolean"
          },
          "aiDisclosure": {
            "type": "boolean"
          },
          "privacyPolicyUrl": {
            "type": "object",
            "nullable": true
          },
          "imprintUrl": {
            "type": "object",
            "nullable": true
          },
          "transcriptRetentionDays": {
            "type": "number"
          },
          "humanHandoff": {
            "type": "boolean"
          },
          "handoffOfflineBehavior": {
            "type": "string",
            "enum": [
              "lead",
              "message"
            ]
          },
          "conversationRetentionDays": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "assistantProfileId": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "publicKey",
          "allowedDomains",
          "assistantName",
          "welcomeMessage",
          "accentColor",
          "logoUrl",
          "launcherPosition",
          "launcherIcon",
          "launcherImageUrl",
          "launcherLabel",
          "quickActions",
          "greetingEnabled",
          "greetingMessage",
          "autoOpen",
          "autoOpenDelay",
          "autoLocalize",
          "defaultLanguage",
          "customPrompt",
          "qualify",
          "routingFormId",
          "bookingMeetingTypeId",
          "useKnowledge",
          "aiDisclosure",
          "privacyPolicyUrl",
          "imprintUrl",
          "transcriptRetentionDays",
          "humanHandoff",
          "handoffOfflineBehavior",
          "conversationRetentionDays",
          "id",
          "name",
          "assistantProfileId"
        ]
      },
      "MiraWhatsappChannel": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "assistantProfileId": {
            "type": "object",
            "nullable": true
          },
          "mode": {
            "type": "string",
            "enum": [
              "off",
              "draft",
              "auto"
            ]
          },
          "useTemplatesOutsideWindow": {
            "type": "boolean"
          },
          "fallbackTemplateName": {
            "type": "object",
            "nullable": true
          },
          "fallbackTemplateLanguage": {
            "type": "object",
            "nullable": true
          },
          "pauseOnHumanReply": {
            "type": "boolean"
          },
          "aiDisclosure": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "assistantProfileId",
          "mode",
          "useTemplatesOutsideWindow",
          "fallbackTemplateName",
          "fallbackTemplateLanguage",
          "pauseOnHumanReply",
          "aiDisclosure"
        ]
      },
      "MiraPhoneChannel": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "assistantProfileId": {
            "type": "object",
            "nullable": true
          },
          "phoneNumberId": {
            "type": "object",
            "nullable": true
          },
          "transferToHuman": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "assistantProfileId",
          "phoneNumberId",
          "transferToHuman"
        ]
      },
      "MiraChannels": {
        "type": "object",
        "properties": {
          "webChat": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MiraWebChatChannel"
            }
          },
          "whatsapp": {
            "$ref": "#/components/schemas/MiraWhatsappChannel"
          },
          "phone": {
            "$ref": "#/components/schemas/MiraPhoneChannel"
          }
        },
        "required": [
          "webChat",
          "whatsapp",
          "phone"
        ]
      },
      "MiraDealAutopilot": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "autonomy": {
            "type": "object"
          },
          "dailySendCap": {
            "type": "number"
          },
          "sendWindowStartHour": {
            "type": "number"
          },
          "sendWindowEndHour": {
            "type": "number"
          },
          "sendWeekdays": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludedPipelineIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "instructions": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "autonomy",
          "dailySendCap",
          "sendWindowStartHour",
          "sendWindowEndHour",
          "sendWeekdays",
          "excludedPipelineIds",
          "instructions",
          "model"
        ]
      },
      "MiraSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "activationPromptSeen": {
            "type": "boolean"
          },
          "dataAccess": {
            "$ref": "#/components/schemas/MiraDataAccess"
          },
          "webChat": {
            "$ref": "#/components/schemas/MiraWebChat"
          },
          "assistantProfiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MiraAssistantProfile"
            }
          },
          "lastTestDrive": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MiraTestDrive"
              }
            ]
          },
          "channels": {
            "$ref": "#/components/schemas/MiraChannels"
          },
          "customInstructions": {
            "type": "string"
          },
          "dealAutopilot": {
            "$ref": "#/components/schemas/MiraDealAutopilot"
          }
        },
        "required": [
          "enabled",
          "activationPromptSeen",
          "dataAccess",
          "webChat",
          "assistantProfiles",
          "channels",
          "customInstructions",
          "dealAutopilot"
        ]
      },
      "CompanyBillingAddress": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "vatNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "companyName",
          "country",
          "addressLine1",
          "addressLine2",
          "city",
          "postalCode"
        ]
      },
      "CompanyTutorialSteps": {
        "type": "object",
        "properties": {
          "downloadContract": {
            "type": "boolean",
            "default": false
          },
          "downloadPolicyText": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "CrmCustomField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "required": {
            "type": "boolean"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "order": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "key",
          "label",
          "type",
          "required",
          "order"
        ]
      },
      "CompanyMetaData": {
        "type": "object",
        "properties": {
          "companySize": {
            "type": "string"
          },
          "tutorialSteps": {
            "$ref": "#/components/schemas/CompanyTutorialSteps"
          },
          "campaignPriority": {
            "type": "string"
          },
          "preferences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "crmCustomFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmCustomField"
            }
          },
          "partner": {
            "type": "string",
            "description": "Identifies the partner integration that provisioned this company\n(e.g. 'placetel'). Set by the partner provisioning endpoint."
          },
          "trialExtended": {
            "type": "boolean",
            "description": "Set to true when the trial was manually extended (e.g. after a\ncustomer replied \"VERLÄNGERN\" to a trial-ending email). Used as a\nBrevo contact attribute to gate the post-extension email sequence."
          },
          "industry": {
            "type": "string",
            "description": "Suite vertical picked (or detected) during onboarding, e.g. 'healthcare'."
          },
          "website": {
            "type": "string",
            "description": "Company website domain collected during onboarding."
          },
          "enabledApps": {
            "description": "Suite apps the admin selected during onboarding. New members inherit\nthis as their default sidebar; each user can personalize via\nuser.metadata.suiteApps.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "brokerIntegrationRequest": {
            "type": "object",
            "properties": {
              "softwareId": {
                "type": "string"
              },
              "softwareName": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "activationSessionId": {
                "type": "string"
              },
              "notifiedAt": {
                "type": "string"
              }
            },
            "required": [
              "softwareId",
              "softwareName",
              "userId",
              "activationSessionId"
            ]
          },
          "onboarding": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "setupMode": {
                "type": "string"
              },
              "identitySource": {
                "type": "string"
              },
              "includeBusinessCard": {
                "type": "boolean"
              },
              "activationSessionId": {
                "type": "string"
              },
              "completedAt": {
                "type": "string"
              },
              "persona": {
                "type": "object"
              },
              "personaSource": {
                "type": "object"
              },
              "importResult": {
                "type": "object"
              },
              "goals": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "brokerSoftware": {
                "type": "string"
              },
              "brokerSoftwareName": {
                "type": "string"
              },
              "brokerPrep": {
                "type": "object",
                "properties": {
                  "meetingTypeId": {
                    "type": "string"
                  },
                  "sampleSpaceId": {
                    "type": "string"
                  },
                  "sampleSignatureRequestId": {
                    "type": "string"
                  },
                  "sampleSignatureSigningUrl": {
                    "type": "string"
                  },
                  "preparedAt": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "source",
              "setupMode",
              "identitySource",
              "includeBusinessCard",
              "activationSessionId",
              "completedAt",
              "brokerPrep"
            ]
          }
        }
      },
      "ScheduledReminder": {
        "type": "object",
        "properties": {
          "reminder": {
            "nullable": true,
            "description": "Links to the Reminder workflow configuration.\nSet when scheduled from a workflows reminder (has a Reminder entity).\nNull when scheduled from meeting type communication settings (inline config, no Reminder entity).",
            "allOf": [
              {
                "$ref": "#/components/schemas/Reminder"
              }
            ]
          },
          "appointment": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Appointment"
              }
            ]
          },
          "provisionalBooking": {
            "nullable": true,
            "description": "Set instead of `appointmentId` while the booking is still provisional. The\nappointment row does not exist yet at that point — it is created only when\nthe invitee confirms the double opt-in or the host accepts.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ProvisionalBookingPayload"
              }
            ]
          },
          "scheduledEmailIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "number"
          },
          "type": {
            "type": "object",
            "description": "Whether reminder is scheduled in email state machine or sms state machine (sms\nstate machine is a general one but called sms here for simplicity). At the time\nof migration all scheduled reminders are email."
          },
          "reminderId": {
            "type": "number",
            "nullable": true
          },
          "appointmentId": {
            "type": "string",
            "nullable": true
          },
          "provisionalBookingId": {
            "type": "string",
            "nullable": true
          },
          "estimatedSmsSegments": {
            "type": "number",
            "nullable": true,
            "description": "Estimate for the exact personalized SMS queued by this row."
          }
        },
        "required": [
          "scheduledEmailIds",
          "createdAt",
          "updatedAt",
          "id",
          "type",
          "appointmentId",
          "provisionalBookingId",
          "estimatedSmsSegments"
        ]
      },
      "HostingInfo": {
        "type": "object",
        "properties": {
          "mainHost": {
            "type": "object",
            "nullable": true
          },
          "meetingLink": {
            "type": "string",
            "nullable": true
          },
          "googleEventId": {
            "type": "string",
            "nullable": true
          },
          "googleConnectionSub": {
            "type": "string",
            "nullable": true
          },
          "calendarConnectionId": {
            "type": "string",
            "nullable": true
          },
          "zoomMeetingId": {
            "type": "string",
            "nullable": true
          },
          "connectChannelId": {
            "type": "string",
            "nullable": true
          },
          "wherebyMeetingId": {
            "type": "string",
            "nullable": true
          },
          "alfaviewMeetingId": {
            "type": "string",
            "nullable": true
          },
          "alfaviewModeratorLink": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "BookingActionSource": {
        "type": "string",
        "enum": [
          "attendee",
          "company",
          "host"
        ]
      },
      "BookingActionInfo": {
        "type": "object",
        "properties": {
          "actionAt": {
            "format": "date-time",
            "type": "string"
          },
          "actionBy": {
            "type": "object"
          },
          "actionSource": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingActionSource"
              }
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "actionAt",
          "actionBy",
          "actionSource",
          "reason"
        ]
      },
      "MeetingCRMOptions": {
        "type": "object",
        "properties": {
          "hubspotContactSync": {
            "type": "boolean"
          },
          "hubspotContactStage": {
            "type": "string"
          },
          "hubspotCompanySync": {
            "type": "boolean"
          },
          "hubspotCompanyStage": {
            "type": "string"
          },
          "hubspotCompanyMatchingField": {
            "type": "string"
          },
          "hubspotDealSync": {
            "type": "boolean"
          },
          "hubspotDealStage": {
            "type": "string"
          },
          "hubspotPipelineId": {
            "type": "string"
          },
          "pipedriveDealSync": {
            "type": "boolean"
          },
          "pipedriveContactSync": {
            "type": "boolean"
          },
          "pipedrivePipelineId": {
            "type": "number",
            "nullable": true
          },
          "pipedriveStageId": {
            "type": "number",
            "nullable": true
          },
          "pipedriveUseExistingDeal": {
            "type": "boolean"
          },
          "closeDealSync": {
            "type": "boolean"
          },
          "closeContactSync": {
            "type": "boolean"
          },
          "closePipelineId": {
            "type": "object",
            "nullable": true
          },
          "closeStatusId": {
            "type": "object",
            "nullable": true
          },
          "closeUseExistingDeal": {
            "type": "boolean"
          },
          "centralStationContactSync": {
            "type": "boolean"
          },
          "centralStationDealSync": {
            "type": "boolean"
          },
          "centralStationPipelineId": {
            "type": "number",
            "nullable": true
          },
          "centralStationStageId": {
            "type": "number",
            "nullable": true
          },
          "linkandoSyncEnabled": {
            "type": "boolean"
          },
          "linkandoPlaybookId": {
            "type": "number",
            "nullable": true
          },
          "linkandoTemplateId": {
            "type": "number",
            "nullable": true
          },
          "evalancheEnabled": {
            "type": "boolean"
          },
          "klicktippEnabled": {
            "type": "boolean"
          },
          "getResponseEnabled": {
            "type": "boolean"
          },
          "getResponseCampaignId": {
            "type": "string",
            "nullable": true
          },
          "brevoEnabled": {
            "type": "boolean"
          },
          "sevdeskEnabled": {
            "type": "boolean"
          },
          "sevdeskCategoryId": {
            "type": "number",
            "nullable": true
          },
          "lexwareEnabled": {
            "type": "boolean"
          },
          "professionalWorksEnabled": {
            "type": "boolean"
          },
          "abAgentaEnabled": {
            "type": "boolean"
          },
          "smartWeContactSync": {
            "type": "boolean"
          },
          "smartWeCompanySync": {
            "type": "boolean"
          },
          "smartWeDealSync": {
            "type": "boolean"
          },
          "smartWeDealStage": {
            "type": "string"
          },
          "salesforceSyncEnabled": {
            "type": "boolean"
          },
          "salesforceCaseSync": {
            "type": "boolean"
          },
          "salesforceLeadSync": {
            "type": "boolean"
          },
          "salesforceOpportunitySync": {
            "type": "boolean"
          },
          "salesforceLeadStatus": {
            "type": "string"
          },
          "salesforceCaseStatus": {
            "type": "string"
          },
          "salesforceOpportunityStage": {
            "type": "string"
          },
          "salesforceDefaultObjectType": {
            "type": "string"
          },
          "internalCrmPipelineId": {
            "type": "object",
            "nullable": true
          },
          "internalCrmStageId": {
            "type": "object",
            "nullable": true
          },
          "crmOptInFieldName": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "hubspotContactSync",
          "hubspotContactStage",
          "hubspotCompanySync",
          "hubspotCompanyStage",
          "hubspotCompanyMatchingField",
          "hubspotDealSync",
          "hubspotDealStage",
          "hubspotPipelineId",
          "pipedriveDealSync",
          "pipedriveContactSync",
          "pipedrivePipelineId",
          "pipedriveStageId",
          "pipedriveUseExistingDeal",
          "closeDealSync",
          "closeContactSync",
          "closePipelineId",
          "closeStatusId",
          "closeUseExistingDeal",
          "centralStationContactSync",
          "centralStationDealSync",
          "centralStationPipelineId",
          "centralStationStageId",
          "linkandoSyncEnabled",
          "linkandoPlaybookId",
          "linkandoTemplateId",
          "evalancheEnabled",
          "klicktippEnabled",
          "getResponseEnabled",
          "getResponseCampaignId",
          "brevoEnabled",
          "sevdeskEnabled",
          "sevdeskCategoryId",
          "lexwareEnabled",
          "professionalWorksEnabled",
          "abAgentaEnabled",
          "smartWeContactSync",
          "smartWeCompanySync",
          "smartWeDealSync",
          "smartWeDealStage",
          "salesforceSyncEnabled",
          "salesforceCaseSync",
          "salesforceLeadSync",
          "salesforceOpportunitySync",
          "salesforceLeadStatus",
          "salesforceCaseStatus",
          "salesforceOpportunityStage",
          "salesforceDefaultObjectType",
          "internalCrmPipelineId",
          "internalCrmStageId",
          "crmOptInFieldName"
        ]
      },
      "AttendeeBillingDetails": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2"
          },
          "vatId": {
            "type": "string",
            "description": "USt-IdNr."
          }
        }
      },
      "AttendeeEnrichment": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "description": "Three shapes live in this column, because the provider changed twice:\nflat `CompanyDetails`, then nested `CompanyV2` (both thecompaniesapi), and\nfrom 2026-07 `BrandDevResponse` (Brand.dev / context.dev). Old rows are\nnever rewritten, so every reader must handle all three —\n`crm/functions/map-enrichment.ts` is the one place that does."
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string",
            "description": "Not generated. Set to attendee id."
          },
          "attendee": {
            "$ref": "#/components/schemas/Attendee"
          }
        },
        "required": [
          "name",
          "data",
          "id",
          "attendee"
        ]
      },
      "Attendee": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Attendee email address. Present for all standard bookings.\nNull only for phone-only bookings (`BookingDto.phoneOnlyBooking`)\nwhere `phone` is the identifier instead.",
            "nullable": true
          },
          "fullname": {
            "type": "string"
          },
          "firstname": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "bringalongEmails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object"
          },
          "billingDetails": {
            "nullable": true,
            "description": "Billing details collected on the booking page when the meeting type asks\nfor them (`meetingPaymentInfo.collectBillingDetails`). Kept typed and\nseparate from `notes` so invoicing reads the buyer address directly\ninstead of guessing which free-form answer holds it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AttendeeBillingDetails"
              }
            ]
          },
          "receiveReminders": {
            "type": "boolean"
          },
          "phone": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "noShow": {
            "type": "boolean"
          },
          "noShowAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "dataPolicyAccepted": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          },
          "appointment": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Appointment"
              }
            ]
          },
          "attendeeEnrichment": {
            "$ref": "#/components/schemas/AttendeeEnrichment"
          },
          "doubleOptIn": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when user confirmed double opt in email. Null if user didn't\nconfirm. Only relevant if ^.doubleOptIn is enabled. Otherwise this\ncan be ignored"
          }
        },
        "required": [
          "bringalongEmails",
          "notes",
          "receiveReminders",
          "language",
          "timezone",
          "noShow",
          "dataPolicyAccepted",
          "createdAt",
          "updatedAt",
          "id",
          "secret"
        ]
      },
      "QueueType": {
        "type": "string",
        "enum": [
          "simpleRoundRobin",
          "advancedRoundRobin",
          "equalDistribution"
        ]
      },
      "RoutingAction": {
        "type": "string",
        "enum": [
          "customPage",
          "externalRedirect",
          "eventRedirect",
          "requestCallback",
          "contactForm",
          "instantCall",
          "formRedirect",
          "teamPageRedirect"
        ]
      },
      "ReviewSectionItem": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Primary label — e.g. stat value, step title, FAQ question, badge label"
          },
          "body": {
            "type": "string",
            "description": "Secondary text — e.g. stat caption, step description, FAQ answer"
          },
          "icon": {
            "type": "string",
            "description": "Optional icon identifier for trust badges (shield, lock, globe, check)"
          }
        }
      },
      "ReviewPageSection": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether this section is rendered on the public page",
            "default": true
          },
          "title": {
            "type": "string",
            "description": "Heading shown at the top of the section"
          },
          "body": {
            "type": "string",
            "description": "Rich-text body (sanitized HTML produced by the dashboard editor)"
          },
          "imageUrl": {
            "type": "string",
            "description": "Public URL of an image to render in this section"
          },
          "videoAssetId": {
            "type": "string",
            "description": "Reference to an uploaded VideoAsset. Used to look up the latest playlist URL when rendering."
          },
          "videoUrl": {
            "type": "string",
            "description": "HLS playlist URL for the section video (snapshot of the asset)"
          },
          "videoThumbnailUrl": {
            "type": "string",
            "description": "Thumbnail/poster URL for the section video"
          },
          "ctaLabel": {
            "type": "string",
            "description": "Optional CTA button label"
          },
          "ctaUrl": {
            "type": "string",
            "description": "Optional CTA destination URL"
          },
          "items": {
            "description": "Repeated entries for sections that contain lists (stats, steps, FAQ, trust badges)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewSectionItem"
            }
          }
        },
        "required": [
          "enabled"
        ]
      },
      "ReviewTemplate": {
        "type": "string",
        "enum": [
          "classic",
          "hero_video",
          "storytelling",
          "bold_cta"
        ]
      },
      "ReviewPageDesign": {
        "type": "object",
        "properties": {
          "template": {
            "default": "classic",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReviewTemplate"
              }
            ]
          },
          "accentColor": {
            "type": "string",
            "description": "Brand accent colour applied to buttons / highlights (hex)"
          },
          "sections": {
            "type": "object",
            "description": "Map of section key → content. Unknown keys are ignored by the renderer.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ReviewPageSection"
            }
          }
        },
        "required": [
          "template",
          "sections"
        ]
      },
      "ReviewShareSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Show the share panel after submission",
            "default": false
          },
          "headline": {
            "type": "string",
            "description": "Panel headline"
          },
          "body": {
            "type": "string",
            "description": "Short supporting copy under the headline"
          },
          "defaultMessage": {
            "type": "string",
            "description": "Template text pre-filled when the reviewer picks a share channel. Supports the literal tokens {{companyName}} and {{reviewUrl}}."
          },
          "channels": {
            "type": "array",
            "description": "Which channels to render",
            "default": [
              "linkedin",
              "x",
              "email",
              "copy"
            ],
            "items": {
              "type": "string",
              "enum": [
                "linkedin",
                "x",
                "email",
                "copy"
              ]
            }
          }
        },
        "required": [
          "enabled",
          "channels"
        ]
      },
      "WorkspaceReviewSettings": {
        "type": "object",
        "properties": {
          "reviewCollection": {
            "type": "boolean"
          },
          "autoApprove": {
            "type": "boolean"
          },
          "anonymousCollection": {
            "type": "boolean"
          },
          "showOnBooking": {
            "type": "boolean"
          },
          "enableGoogleSnippet": {
            "type": "boolean"
          },
          "emailDelay": {
            "type": "string",
            "enum": [
              "1h",
              "2h",
              "3h",
              "4h",
              "next-day",
              "1d",
              "2d",
              "3d"
            ]
          },
          "showFloatingWidget": {
            "type": "boolean"
          },
          "googleReviewUrl": {
            "type": "string"
          },
          "showGoogleCta": {
            "type": "boolean"
          },
          "googleCtaMode": {
            "type": "string",
            "enum": [
              "all",
              "gated"
            ]
          },
          "googleCtaThreshold": {
            "type": "number"
          },
          "trustpilotReviewUrl": {
            "type": "string",
            "description": "Trustpilot review URL to send reviewers to after submission"
          },
          "showTrustpilotCta": {
            "type": "boolean",
            "default": false
          },
          "trustpilotCtaMode": {
            "type": "string",
            "enum": [
              "all",
              "gated"
            ],
            "default": "all"
          },
          "trustpilotCtaThreshold": {
            "type": "number",
            "default": 4,
            "minimum": 1,
            "maximum": 5
          },
          "googlePlaceId": {
            "type": "string"
          },
          "reviewChannels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "sms",
                "whatsapp"
              ]
            }
          },
          "pageDesign": {
            "$ref": "#/components/schemas/ReviewPageDesign"
          },
          "shareSettings": {
            "$ref": "#/components/schemas/ReviewShareSettings"
          }
        }
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "connectWaitingRoom": {
            "nullable": true,
            "description": "Per-team branding override for the connect prejoin/waiting screen.\nNull = inherit the company-wide settings.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ConnectWaitingRoomSettings"
              }
            ]
          },
          "integrationPermissions": {
            "type": "object",
            "description": "Workspace-level integration permission overrides.\nCan override company settings (allow or deny specific integrations)."
          },
          "customBookingCSS": {
            "type": "string",
            "description": "Custom CSS for booking and confirmation pages.\nWhen set, this overrides the company-level customBookingCSS for this workspace's meeting types.\nApplied to both booking pages and confirmation/reschedule/cancel pages."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "Slug must be unique"
          },
          "picture": {
            "type": "string",
            "description": "Full url to workspace picture hosted statically"
          },
          "description": {
            "type": "string"
          },
          "primaryColor": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "no",
              "nl",
              "it",
              "pl",
              "se",
              "tr",
              "da"
            ]
          },
          "salesforceStudioId": {
            "type": "string",
            "description": "Salesforce Studio__c Record ID\nUsed for Küche&Co integration to link Cases to Studios",
            "example": "a027R00000rdOS1QAM"
          },
          "useCompanyDefaultColor": {
            "type": "boolean"
          },
          "useCompanyDefaultLanguage": {
            "type": "boolean"
          },
          "useCompanyDefaultLogo": {
            "type": "boolean"
          },
          "useCompanyDefaultContactInfo": {
            "type": "boolean"
          },
          "showTeamSection": {
            "type": "boolean"
          },
          "showServicesSection": {
            "type": "boolean"
          },
          "showCompanyDetails": {
            "type": "boolean"
          },
          "showContactInfo": {
            "type": "boolean"
          },
          "emailAddress": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "privacyUrl": {
            "type": "string"
          },
          "imprintUrl": {
            "type": "string"
          },
          "emailSenderName": {
            "type": "string",
            "description": "Email sender name. Only name part of sender string without email."
          },
          "emailSenderAddress": {
            "type": "string",
            "description": "Email sender address. Only email part of sender string.\nOnly active if custom smtp is active. Otherwise this is ignored."
          },
          "enableCustomLegalText": {
            "type": "string",
            "description": "Enable/disable custom legal text",
            "enum": [
              "Enable",
              "Disable",
              "Inherit"
            ]
          },
          "customLegalText": {
            "type": "string",
            "description": "Custom legal text HTML, shown above booking button if enabled"
          },
          "reviewSettings": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkspaceReviewSettings"
              }
            ]
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "adminUsers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "analyticsViewers": {
            "description": "Analytics-only viewers of this team. They can see this workspace's\nanalytics (scoped to its members) but get no admin or edit rights —\ndeliberately separate from `adminUsers`, which the meeting-type edit\ngates key off. Used for the \"analytics for employees\" role.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "meetingTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingType"
            }
          },
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Queue"
            }
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reminder"
            }
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Form"
            }
          }
        },
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "name",
          "slug",
          "useCompanyDefaultColor",
          "useCompanyDefaultLanguage",
          "useCompanyDefaultLogo",
          "useCompanyDefaultContactInfo",
          "showTeamSection",
          "showServicesSection",
          "showCompanyDetails",
          "showContactInfo",
          "enableCustomLegalText",
          "companyId"
        ]
      },
      "Qualifier": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number"
          },
          "routingAction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoutingAction"
              }
            ]
          },
          "isFallback": {
            "type": "boolean"
          },
          "queue": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Queue"
              }
            ]
          },
          "meetingType": {
            "nullable": true,
            "description": "Meeeting type to redirect to",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "routeToCrmOwner": {
            "type": "boolean",
            "description": "Route to the Salesforce owner of the record matched by attendee email:\nwhen true and the routing lookup matched a Contact/Lead, the owner's\nmeetergo user is pinned as host (same mechanism as `meetingTypeUser`,\nwhich — being an explicit choice — still wins when set). Falls back to\nthe normal queue when the owner can't be resolved to an eligible host."
          },
          "crmOwnerField": {
            "type": "string",
            "nullable": true,
            "description": "Which Salesforce User-lookup field supplies the host when\n`routeToCrmOwner` is on, as a condition-style path\n(`Contact.OwnerId`, `Account.OwnerId`, `Contact.SDR__c`).\n\nNull means \"owner of whichever record matched\", which is what every rule\nwritten before this column existed meant — so null must keep behaving\nexactly that way."
          },
          "meetingTypeUser": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "form": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Form"
              }
            ]
          },
          "redirectForm": {
            "nullable": true,
            "description": "Form to redirect to",
            "allOf": [
              {
                "$ref": "#/components/schemas/Form"
              }
            ]
          },
          "teamPage": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Workspace"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "contactFormEmail": {
            "type": "string"
          },
          "externalRedirectLink": {
            "type": "string"
          },
          "customPageContent": {
            "$ref": "#/components/schemas/LocalisedContent"
          },
          "customFormTitle": {
            "$ref": "#/components/schemas/LocalisedContent"
          },
          "showThankYouOnCustomPage": {
            "type": "boolean"
          },
          "expression": {
            "$ref": "#/components/schemas/Expression"
          },
          "queueId": {
            "type": "string"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "meetingTypeUserId": {
            "type": "string"
          },
          "formId": {
            "type": "string"
          },
          "redirectFormId": {
            "type": "string"
          },
          "teamPageId": {
            "type": "string"
          }
        },
        "required": [
          "index",
          "routingAction",
          "isFallback",
          "routeToCrmOwner",
          "form",
          "createdAt",
          "updatedAt",
          "id",
          "showThankYouOnCustomPage",
          "expression",
          "formId"
        ]
      },
      "UserCapacity": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User ID"
          },
          "capacity": {
            "type": "number",
            "description": "Capacity value"
          }
        },
        "required": [
          "userId",
          "capacity"
        ]
      },
      "UserPriority": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User ID"
          },
          "priority": {
            "type": "number",
            "description": "Priority level (higher = booked first)"
          }
        },
        "required": [
          "userId",
          "priority"
        ]
      },
      "UserCustomLink": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User ID"
          },
          "link": {
            "type": "string",
            "description": "Per-host override for the custom meeting link. Empty string means fall back to the meeting type default."
          }
        },
        "required": [
          "userId",
          "link"
        ]
      },
      "Queue": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/QueueType"
              }
            ]
          },
          "roundRobinEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoundRobinEntry"
            }
          },
          "meetingType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "qualifiers": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Qualifier"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "workspace": {
            "nullable": true,
            "description": "Workspace the queue is in. Before team update, all queues\nwere always created in a workspace. Now, does not need to\nbelong to workspace, as there can be round robin meeting\ntypes without workspace but with queue (rr/collective)",
            "allOf": [
              {
                "$ref": "#/components/schemas/Workspace"
              }
            ]
          },
          "workspaceId": {
            "type": "string"
          },
          "oldMeetingType": {
            "nullable": true,
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "meetingTypeId": {
            "type": "string",
            "description": "Currently, there are several fields with value null in prod.\nI'm not sure if that does anything. I suspect that all\nrows with null meeting type id are orphaned.\n@todo confirm theory and migrate to non nullable"
          },
          "userCapacities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserCapacity"
            }
          },
          "userPriorities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserPriority"
            }
          },
          "userCustomLinks": {
            "description": "Per-host overrides resolved by `CalendarLinkService.addMeetingLink` (CUSTOM channel).",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserCustomLink"
            }
          },
          "maxLeadThreshold": {
            "type": "number",
            "description": "Maximum number of bookings a host can be ahead of the least-booked host\nbefore their availability is hidden. Ensures fair distribution."
          },
          "distributionPeriod": {
            "type": "object",
            "description": "Period over which bookings are counted for equal distribution.\nCounts reset at the start of each period."
          },
          "prioritizeNearTermAvailability": {
            "type": "boolean",
            "description": "When true, if fairness filtering (maxLeadThreshold) would push the next\navailable slot more than 14 days beyond the meeting type's minimum booking\nnotice, temporarily include over-lead hosts so bookers aren't penalized by\nfairness enforcement. Disable only if strict fairness must never yield to\nbooker-visible availability."
          },
          "userGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueueUserGroup"
            }
          },
          "userGroupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "companyId": {
            "type": "string",
            "description": "Not null"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "type",
          "roundRobinEntries",
          "createdAt",
          "updatedAt",
          "id",
          "meetingTypeId",
          "userCapacities",
          "userPriorities",
          "userCustomLinks",
          "maxLeadThreshold",
          "distributionPeriod",
          "prioritizeNearTermAvailability",
          "userGroups",
          "userGroupIds",
          "companyId",
          "userIds"
        ]
      },
      "QueueUserGroup": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "capacity": {
            "type": "number"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "queue": {
            "$ref": "#/components/schemas/Queue"
          },
          "queueId": {
            "type": "string"
          },
          "mainGroupHost": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "mainGroupHostId": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "name",
          "capacity",
          "users",
          "userIds",
          "queueId"
        ]
      },
      "RoundRobinEntry": {
        "type": "object",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "number"
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "group": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/QueueUserGroup"
              }
            ]
          },
          "groupId": {
            "type": "string",
            "nullable": true
          },
          "appointmentId": {
            "type": "string",
            "nullable": true
          },
          "queue": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Queue"
              }
            ]
          },
          "queueId": {
            "type": "string"
          },
          "selectionReason": {
            "type": "string",
            "description": "Reason why host was selected.\n- `queue`: Host was the next host in queue\n- `nextAvailableHost`: Next queue host was not available\ndue to calendar event so host was chosen\n- Past entries are null so that information is not known"
          }
        },
        "required": [
          "createdAt",
          "id"
        ]
      },
      "AppointmentResolvableError": {
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string"
          },
          "appointment": {
            "$ref": "#/components/schemas/Appointment"
          },
          "errorCode": {
            "type": "string",
            "description": "Error code identifies the error, defined in ErrorCode enum.\nDefined as string to avoid having to migrate DB every time new error is implemented."
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "appointmentId",
          "errorCode"
        ]
      },
      "BufferReservation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "appointment": {
            "description": "The appointment this buffer is reserved for.\nWhen appointment is deleted, buffer reservations are cascade deleted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Appointment"
              }
            ]
          },
          "appointmentId": {
            "type": "string"
          },
          "bufferType": {
            "type": "string",
            "description": "Whether this is a buffer before or after the meeting",
            "enum": [
              "before",
              "after"
            ]
          },
          "start": {
            "format": "date-time",
            "type": "string",
            "description": "Start time of this buffer segment"
          },
          "end": {
            "format": "date-time",
            "type": "string",
            "description": "End time of this buffer segment"
          },
          "duration": {
            "type": "number",
            "description": "Duration of this specific segment in minutes"
          },
          "segmentIndex": {
            "type": "number",
            "description": "Index of this segment (0-based) when buffer is split"
          },
          "totalSegments": {
            "type": "number",
            "description": "Total number of segments for this buffer"
          },
          "originalBufferMinutes": {
            "type": "number",
            "description": "Original total buffer requirement in minutes"
          },
          "companyId": {
            "type": "string",
            "description": "Company ID for multi-tenant isolation"
          },
          "calendarEventId": {
            "type": "string",
            "description": "Calendar event ID for synced buffer event\nStored when buffer is synced to user's calendar (Google, Outlook, etc.)\nUsed for updating/deleting the calendar event"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "appointment",
          "appointmentId",
          "bufferType",
          "start",
          "end",
          "duration",
          "segmentIndex",
          "totalSegments",
          "originalBufferMinutes",
          "companyId",
          "createdAt"
        ]
      },
      "RecurringSeries": {
        "type": "object",
        "properties": {
          "mode": {
            "description": "Mode of the series - recurring pattern or multi-slot selection",
            "enum": [
              "recurring",
              "multi_slot"
            ],
            "type": "string"
          },
          "frequency": {
            "nullable": true,
            "description": "Frequency of the recurring series (only set for RECURRING mode)",
            "enum": [
              "weekly",
              "biweekly",
              "monthly"
            ],
            "type": "string"
          },
          "totalOccurrences": {
            "type": "number",
            "description": "Total number of occurrences in this series"
          },
          "isCancelled": {
            "type": "boolean",
            "description": "Whether the entire series has been cancelled"
          },
          "cancelledAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the series was cancelled"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "secret": {
            "type": "string",
            "description": "Secret for booker access to cancel the series"
          },
          "appointments": {
            "description": "All appointments in this series",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appointment"
            }
          },
          "meetingType": {
            "description": "Meeting type this series belongs to",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "meetingTypeId": {
            "type": "string"
          },
          "company": {
            "description": "Company this series belongs to",
            "allOf": [
              {
                "$ref": "#/components/schemas/Company"
              }
            ]
          },
          "companyId": {
            "type": "string"
          },
          "paymentId": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "totalOccurrences",
          "isCancelled",
          "createdAt",
          "updatedAt",
          "id",
          "secret",
          "meetingTypeId",
          "companyId"
        ]
      },
      "BundleLocalizedContent": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "locale",
          "name"
        ]
      },
      "MeetingTypeBundle": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "localizedContent": {
            "description": "Localized content for bundle name and description in different languages.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleLocalizedContent"
            }
          },
          "meetingTypeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meetingTypeCategories": {
            "type": "object",
            "description": "Custom category mapping for meeting types. Keys are meeting type IDs, values are category names.",
            "example": {
              "uuid-1": "Consultation",
              "uuid-2": "Treatment"
            }
          },
          "categoryOrder": {
            "description": "Order of categories for display purposes.",
            "example": [
              "Consultation",
              "Treatment",
              "Follow-up"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hideHeader": {
            "type": "boolean",
            "description": "Whether to hide the header (company name, bundle title, description) on the booking page."
          },
          "minSelections": {
            "type": "number"
          },
          "maxSelections": {
            "type": "number"
          },
          "hostSelectionMode": {
            "enum": [
              "per_meeting_type",
              "single",
              "queue"
            ],
            "type": "string"
          },
          "discountType": {
            "enum": [
              "none",
              "percentage",
              "fixed"
            ],
            "type": "string"
          },
          "discountValue": {
            "type": "number"
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appointment"
            }
          }
        },
        "required": [
          "id",
          "companyId",
          "name",
          "slug",
          "meetingTypeIds",
          "minSelections",
          "hostSelectionMode",
          "enabled",
          "createdAt",
          "updatedAt"
        ]
      },
      "AppointmentBundleItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "appointmentId": {
            "type": "string"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "duration": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "hostIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "appointment": {
            "$ref": "#/components/schemas/Appointment"
          },
          "meetingType": {
            "$ref": "#/components/schemas/MeetingType"
          }
        },
        "required": [
          "id",
          "appointmentId",
          "meetingTypeId",
          "duration",
          "hostIds",
          "sortOrder",
          "createdAt"
        ]
      },
      "Appointment": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "isCancelled": {
            "type": "boolean",
            "description": "Determines whether appointment was cancelled"
          },
          "spots": {
            "type": "string",
            "nullable": true,
            "description": "Per-appointment capacity for group bookings. Copied from meetingType.spots\nat creation time. Can be reduced to limit new bookees without cancelling\nexisting attendees.\n\nWhen null, falls back to meetingType.spots.\n\nTODO: Ideally spots should be part of MeetingInfo (alongside groupBooking)\nso it gets copied naturally via the meetingInfo spread. Kept as top-level\nfor now to avoid refactoring the existing meetingType.spots column + V4 API DTOs."
          },
          "rescheduledAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when appointment was rescheduled. Null if appointment is\nnot rescheduled."
          },
          "rescheduledBy": {
            "type": "string",
            "nullable": true,
            "description": "Email address of the attendee, host, or operator who last rescheduled it."
          },
          "rescheduleCount": {
            "type": "number",
            "description": "Number of times this appointment has been rescheduled.\nUsed as the ICS SEQUENCE number so calendar clients recognize updates."
          },
          "bookedByUserId": {
            "type": "string",
            "nullable": true
          },
          "emailDeliveryIssues": {
            "type": "array",
            "nullable": true,
            "description": "Mails the provider could not deliver for this appointment, one entry per\naddress and kind. Written from AhaSend bounce webhooks so a typo in the\nattendee's address is visible before the appointment is missed.",
            "items": {
              "type": "object"
            }
          },
          "location": {
            "type": "string"
          },
          "scheduledReminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledReminder"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "couponCode": {
            "type": "string",
            "description": "Coupon code applied to this booking's payment (null if no coupon used)"
          },
          "couponDiscountAmount": {
            "type": "number",
            "description": "Discount amount applied via coupon (in the payment currency)"
          },
          "note": {
            "type": "string"
          },
          "transcription": {
            "type": "string",
            "nullable": true,
            "description": "Full meeting transcription in markdown format"
          },
          "summary": {
            "type": "string",
            "nullable": true,
            "description": "AI-generated summary of the meeting in markdown format"
          },
          "actualStartAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the conversation actually ran, as whatever was in the call\nwitnessed it: the first captured word for a recording, the first person\nin the room for a Connect call. `start` and `end` say when the meeting\nwas booked for; these say what happened. Null until something that was\nthere reports, and permanently null for a call nothing attended."
          },
          "actualEndAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "attendanceCheckedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When something that could have witnessed the call finished looking.\n\nWhat tells \"nobody came\" apart from \"nothing was watching\": a past\nbooking with this set and no `actualStartAt` is one a notetaker or the\nConnect room waited for and nobody joined, which the dashboard offers as\na no-show to confirm. Never marks the no-show itself — that reaches the\ncontact and their automations, and stays a person's decision."
          },
          "miraBrief": {
            "type": "string",
            "nullable": true,
            "description": "Mira's pre-meeting brief: who is coming, what was discussed last time,\nwhat is open. Written once on first request and kept, so opening the\nbooking twice does not pay for the model twice."
          },
          "miraBriefAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "occurrenceNumber": {
            "type": "number",
            "nullable": true,
            "description": "Position of this appointment within the recurring series (1-based).\nNull for non-recurring appointments."
          },
          "isBundleBooking": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          },
          "ics": {
            "type": "string"
          },
          "meetingInfo": {
            "$ref": "#/components/schemas/MeetingInfo"
          },
          "hostingInfo": {
            "$ref": "#/components/schemas/HostingInfo"
          },
          "cancel": {
            "$ref": "#/components/schemas/BookingActionInfo"
          },
          "crmOptions": {
            "$ref": "#/components/schemas/MeetingCRMOptions"
          },
          "bookedBy": {
            "nullable": true,
            "description": "Company member who created this booking on the attendee's behalf (instant\nbooker, dashboard). Null for self-service bookings. Lets cancellation and\nreschedule notices and the \"booked by\" workflow recipient reach the person\nwho set the appointment up even when someone else hosts it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "utmSource": {
            "type": "string",
            "nullable": true
          },
          "utmMedium": {
            "type": "string",
            "nullable": true
          },
          "utmCampaign": {
            "type": "string",
            "nullable": true
          },
          "utmContent": {
            "type": "string",
            "nullable": true
          },
          "utmTerm": {
            "type": "string",
            "nullable": true
          },
          "referrerUrl": {
            "type": "string",
            "nullable": true
          },
          "sourceChannel": {
            "type": "object",
            "nullable": true
          },
          "formRecipientId": {
            "type": "string",
            "nullable": true,
            "description": "`FormRecipient.id` when a personal form link routed this booking.\n\nWithout it nothing connects an appointment to the person a printed link\nwas minted for, so a returning recipient could only be offered a second\ncalendar. With it they are shown the booking they already hold.\n\nPlain uuid, no FK: an appointment is a real commitment and must survive\nthe deletion of the form that routed it."
          },
          "attendees": {
            "description": "`cascade: true` exists to INSERT attendees together with a new\nappointment. Never `save()` an EXISTING appointment with a loaded\n`attendees` array: the cascade diffs against a stale snapshot and\norphan-nullifies attendees linked concurrently (group-booking joins).\nLink/unlink attendee rows individually instead.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attendee"
            }
          },
          "attendeeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "roundRobinEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoundRobinEntry"
            }
          },
          "meetingType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "meetingTypeId": {
            "type": "string",
            "description": "@todo should not be nullable, but prod has some null values also recently"
          },
          "bookingBlockId": {
            "type": "string",
            "nullable": true,
            "description": "The booking block this appointment was booked into, set only when the\ninvitee arrived through that block's customer link.\n\nIt is the sole answer to \"which bookings are in this reserved day\", and\ndeleting the day cancels exactly these. Matching on host and time instead\nwould sweep in ordinary meetings that merely overlap. Deliberately no\nforeign key: the row must outlive the block it names."
          },
          "hostIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "companyId": {
            "type": "string"
          },
          "resolvableErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppointmentResolvableError"
            }
          },
          "bufferReservations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BufferReservation"
            }
          },
          "paymentId": {
            "type": "string"
          },
          "recapSharedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the host turned this meeting's recap into a shareable link, or null\nwhile it is private.\n\nA timestamp rather than a boolean because \"when did we start sharing this\"\nis the question asked after a recap turns up somewhere unexpected. Sharing\nis off until the host asks for it: a transcript is the most sensitive thing\nthe product stores, and a link that exists by default is a link that leaks\nby default."
          },
          "notetakerNoticeEmailedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the invitees were told by email that this meeting will be recorded.\n\nStamped by the confirmation email when its footer carried the recording\ndisclosure, and otherwise by the advance-notice sweep when it sends the\ndedicated notice 24 hours ahead. One column, two writers, one rule: a\nnull here on a meeting that will be recorded is a notice still owed."
          },
          "preCallBriefWarmedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the structured Connect brief was generated ahead of the call.\n\nBookkeeping for the warming sweep, not a third brief: the text itself\nlives in the cache the in-call panel already reads, and this is only how\nthe sweep knows it has done a booking. Null means the panel would still\npay for the model on first open, which is the wait this removes."
          },
          "recurringSeries": {
            "nullable": true,
            "description": "Reference to the recurring series this appointment belongs to.\nNull for non-recurring appointments.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringSeries"
              }
            ]
          },
          "recurringSeriesId": {
            "type": "string",
            "nullable": true
          },
          "bundle": {
            "nullable": true,
            "description": "Reference to the bundle this appointment was booked from.\nNull for non-bundle bookings.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeBundle"
              }
            ]
          },
          "bundleId": {
            "type": "string",
            "nullable": true
          },
          "bundleItems": {
            "description": "Bundle items for this appointment (details of each meeting type in the bundle).\nOnly populated for bundle bookings.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppointmentBundleItem"
            }
          }
        },
        "required": [
          "start",
          "end",
          "isCancelled",
          "rescheduleCount",
          "createdAt",
          "updatedAt",
          "isBundleBooking",
          "id",
          "secret",
          "ics",
          "meetingInfo",
          "hostingInfo",
          "cancel",
          "crmOptions",
          "attendeeIds",
          "meetingTypeId",
          "bookingBlockId",
          "hostIds",
          "companyId"
        ]
      },
      "TemplateCategory": {
        "type": "string",
        "enum": [
          "bookingConfirmed",
          "bookingCanceled",
          "bookingRescheduled",
          "other"
        ]
      },
      "EmailTemplateRichTextBlock": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "richText"
            ]
          },
          "html": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "html"
        ]
      },
      "EmailSystemSlot": {
        "type": "string",
        "enum": [
          "appointmentDetails"
        ]
      },
      "EmailAppointmentField": {
        "type": "string",
        "enum": [
          "location",
          "host",
          "join"
        ],
        "description": "Appointment-card rows the author chose to hide. Date and time are always shown."
      },
      "EmailTemplateSystemBlock": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "system"
            ]
          },
          "slot": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailSystemSlot"
              }
            ]
          },
          "hide": {
            "type": "array",
            "description": "Appointment-card rows the author chose to hide. Date and time are always shown.",
            "items": {
              "$ref": "#/components/schemas/EmailAppointmentField"
            }
          }
        },
        "required": [
          "type",
          "slot"
        ]
      },
      "EmailActionTarget": {
        "type": "string",
        "enum": [
          "primary",
          "reschedule",
          "cancel"
        ]
      },
      "EmailTemplateActionBlock": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "action"
            ]
          },
          "target": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailActionTarget"
              }
            ]
          },
          "label": {
            "type": "string",
            "description": "Customer button-text override. The href is never stored here — it is resolved from producer data at send time."
          }
        },
        "required": [
          "type",
          "target"
        ]
      },
      "EmailTemplateDividerBlock": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "divider"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "EmailTemplateButtonBlock": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "button"
            ]
          },
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Static author-owned URL (http/https/mailto)."
          }
        },
        "required": [
          "type",
          "label",
          "url"
        ]
      },
      "StructuredEmailKind": {
        "type": "string",
        "enum": [
          "confirmation",
          "reminder",
          "cancellation",
          "reschedule",
          "provisional",
          "review-request"
        ]
      },
      "EmailTemplateDocumentV1": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StructuredEmailKind"
              }
            ]
          },
          "blocks": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/EmailTemplateRichTextBlock"
                },
                {
                  "$ref": "#/components/schemas/EmailTemplateSystemBlock"
                },
                {
                  "$ref": "#/components/schemas/EmailTemplateActionBlock"
                },
                {
                  "$ref": "#/components/schemas/EmailTemplateDividerBlock"
                },
                {
                  "$ref": "#/components/schemas/EmailTemplateButtonBlock"
                }
              ]
            }
          }
        },
        "required": [
          "version",
          "kind",
          "blocks"
        ]
      },
      "EmailTemplateContent": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "document": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplateDocumentV1"
              }
            ]
          }
        },
        "required": [
          "locale",
          "title",
          "content"
        ]
      },
      "ReminderChannel": {
        "type": "string",
        "enum": [
          "email",
          "sms",
          "whatsapp"
        ],
        "description": "Channel that the message is intended for. There are different requirements\nfor each channel. For example, \"sms\" has a shorter character limit."
      },
      "ReminderActionType": {
        "type": "string",
        "enum": [
          "send-message",
          "add-label",
          "remove-label",
          "assign-conversation",
          "mark-done",
          "create-note",
          "edit-contact-attribute",
          "call-webhook",
          "request-review",
          "ai-generate",
          "move-deal-stage",
          "mark-deal-won",
          "mark-deal-lost",
          "create-deal-task",
          "assign-deal-owner",
          "create-deal"
        ],
        "description": "What the action does. Legacy actions default to `SEND_MESSAGE` so\nexisting rows keep their behaviour. Conversation-mutation variants\n(label, assign, note, ...) only fire on inbound WhatsApp triggers."
      },
      "ReminderRecipient": {
        "type": "string",
        "enum": [
          "guest-all",
          "host-all",
          "everyone",
          "company-user",
          "custom-email",
          "booked-by",
          "form-recipient",
          "form-sender",
          "deal-owner",
          "deal-primary-contact",
          "deal-contacts",
          "lead-contact"
        ]
      },
      "ConditionBranch": {
        "type": "string",
        "enum": [
          "true",
          "false"
        ],
        "description": "Which branch of the condition this action runs on. Only meaningful when\n`conditionId` is set; ignored (and cleared) once the condition is gone."
      },
      "ReminderTrigger": {
        "type": "object",
        "properties": {
          "trigger": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReminderTrigger"
              }
            ]
          },
          "id": {
            "type": "number"
          },
          "triggerTiming": {
            "type": "number",
            "description": "Time in minutes before or after specified trigger to wait for, before sending the reminder"
          },
          "targetStageId": {
            "type": "string",
            "nullable": true,
            "description": "Optional target stage ID for DEAL_ENTERED_STAGE trigger.\nWhen set, the trigger only fires when a deal enters this specific stage."
          },
          "conditions": {
            "nullable": true,
            "description": "Optional gating conditions for the trigger.\nUsed by inbound WhatsApp triggers and booking-created workflows to match\ntheir inputs before firing the action chain.\n\nAND across the array; OR within `values`. Null/empty means \"no filter\".",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "reminder": {
            "$ref": "#/components/schemas/Reminder"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderAction"
            }
          },
          "conditionNodes": {
            "description": "Condition nodes branching this trigger's action chain. Named\n`conditionNodes` (not `conditions`) because the legacy jsonb column above\nalready owns that name for trigger-level gating filters.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderCondition"
            }
          }
        },
        "required": [
          "trigger",
          "id",
          "triggerTiming",
          "actions",
          "conditionNodes"
        ]
      },
      "ReminderCondition": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Display name shown on the canvas node, e.g. \"Booked a demo call\"."
          },
          "ruleSet": {
            "type": "object",
            "nullable": true,
            "description": "Groups combined with the top-level operator; rules within a group\ncombined with the group operator. Null/empty always evaluates to true.",
            "additionalProperties": true
          },
          "placement": {
            "type": "string",
            "nullable": true,
            "description": "Where the condition sits relative to the trigger's wait on the canvas.\n`before-wait` = dropped on the trigger→wait line (the split is drawn\nabove the wait); null = after the wait (default). Evaluation always\nhappens at scheduling time either way — this is placement, not timing."
          },
          "id": {
            "type": "number"
          },
          "reminderTrigger": {
            "$ref": "#/components/schemas/ReminderTrigger"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderAction"
            }
          }
        },
        "required": [
          "id"
        ]
      },
      "ReminderAction": {
        "type": "object",
        "properties": {
          "channel": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReminderChannel"
              }
            ]
          },
          "actionType": {
            "description": "What the action does. Legacy actions default to `SEND_MESSAGE` so\nexisting rows keep their behaviour. Conversation-mutation variants\n(label, assign, note, ...) only fire on inbound WhatsApp triggers.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReminderActionType"
              }
            ]
          },
          "conversationActionConfig": {
            "type": "object",
            "nullable": true,
            "description": "Configuration blob for non-message action types — ignored when\n`actionType === SEND_MESSAGE`. Stored as JSONB so we can extend the\nshape per action variant without further schema changes.",
            "additionalProperties": true
          },
          "recipient": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReminderRecipient"
              }
            ]
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailTemplateContent"
            }
          },
          "whatsappTemplateName": {
            "type": "string",
            "nullable": true
          },
          "messageText": {
            "type": "string",
            "nullable": true,
            "description": "Free-form WhatsApp text body. Used by inbound automation actions that\nreply inside the 24h customer service window — no template needed.\n\nSet independently from `whatsappTemplateName`. The inbound automation\nrunner only consults `messageText`; outbound (template-based) reminders\nonly consult `whatsappTemplateName`. Whichever channel/runner picks up\nthe action decides which field to read."
          },
          "messageButtons": {
            "type": "array",
            "nullable": true,
            "description": "Optional WhatsApp interactive reply buttons to attach to a free-form\n`messageText` reply. When set, the inbound automation listener will send\nan `interactive` (type: button) message instead of plain text. Inactive\noutside the 24-hour customer service window — Meta only allows\ninteractive messages as session messages or via approved templates.\n\nConstraints:\n  • Up to 3 buttons (Meta limit).\n  • `title` ≤ 20 characters.\n  • `id` is the value reported back via webhook when a user taps a\n    button. Default to a slug of the title when the user doesn't pick\n    one explicitly.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                }
              }
            }
          },
          "variableMappings": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            }
          },
          "whatsappChannelId": {
            "type": "string",
            "nullable": true
          },
          "whatsappPhoneNumberId": {
            "type": "string",
            "nullable": true,
            "description": "Phone number ID to send from for direct Meta integration (overrides default from config)"
          },
          "whatsappTemplateLanguage": {
            "type": "string",
            "nullable": true,
            "description": "Language code for the Meta WhatsApp template (e.g. 'en_US'). Only used with direct Meta integration."
          },
          "lastSendErrorAt": {
            "type": "string",
            "nullable": true,
            "description": "Whether the provider is currently refusing to send this action, and why.\n\nA provider can accept a workflow as valid and still refuse every message\nit produces — a WhatsApp template whose button has no link assigned is\nrejected by Meta on send, long after the action was saved. Set when a send\nis rejected, cleared on the next successful one, so the editor warns only\nwhile the problem is live. Current state, not history.\n\nDistinct from the two neighbouring mechanisms, neither of which can see\nthis failure:\n  - `reminder_delivery` logs which channel an SMS actually went out on\n    (fallback tracking). Only `reminder-sms.service` writes it, and it has\n    no action reference, so it cannot answer \"is this step broken?\".\n  - `whatsapp_message.errorCode` comes from Meta's async status webhook,\n    keyed by `waMessageId`. A synchronous 400 never yields a message id,\n    so no row is ever created for exactly the case recorded here.\n\nIf `reminder_delivery` ever grows real multi-channel coverage, fold this\ninto it rather than letting the two disagree.\n\nDeliberately not part of `CreateReminderActionDto`: recorded by the send\npath only, never settable from the client.",
            "format": "date-time"
          },
          "lastSendErrorCode": {
            "type": "number",
            "nullable": true,
            "description": "Provider error code, when the provider supplies one (e.g. Meta 131008)."
          },
          "lastSendErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "conditionId": {
            "type": "number",
            "nullable": true,
            "description": "Condition node this action hangs under, or null for actions that run\ndirectly under the trigger. `SET NULL` on delete re-attaches orphaned\nactions to the trigger instead of deleting the user's configured steps."
          },
          "conditionBranch": {
            "nullable": true,
            "description": "Which branch of the condition this action runs on. Only meaningful when\n`conditionId` is set; ignored (and cleared) once the condition is gone.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ConditionBranch"
              }
            ]
          },
          "sortOrder": {
            "type": "number",
            "nullable": true,
            "description": "Position of the action within its chain (trigger fan-in or condition\nbranch). Fractional so mid-chain inserts never renumber neighbours.\nNull on legacy rows — ordering falls back to the id (creation order)."
          },
          "delayBeforeMinutes": {
            "type": "number",
            "nullable": true,
            "description": "Wait before this step, in minutes, on top of everything earlier in its\nchain. The canvas draws it as a Wait node between the previous step and\nthis one. Null or 0 means the step is due together with the one before.\n\nA wait is a property of the step it precedes rather than a step of its\nown so that every runner that iterates `trigger.actions` keeps working:\na release that does not know the column schedules the step without the\nwait instead of trying to send an empty message. See\n`docs/decisions/2026-09-16-workflow-waits-are-due-date-offsets.md`."
          },
          "recipientEmail": {
            "type": "string",
            "nullable": true,
            "description": "recipient email if reminder recipient is set to company user, null otherwise"
          },
          "attachmentConfig": {
            "type": "array",
            "description": "Configuration for email attachments.\nSupports library files and booking form file fields.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "library",
                    "form_field"
                  ]
                },
                "fileAssetId": {
                  "type": "string",
                  "nullable": true
                },
                "dataFieldName": {
                  "type": "string",
                  "nullable": true
                },
                "filename": {
                  "type": "string",
                  "nullable": true
                }
              }
            },
            "nullable": true
          },
          "id": {
            "type": "number"
          },
          "reminderTrigger": {
            "$ref": "#/components/schemas/ReminderTrigger"
          },
          "condition": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ReminderCondition"
              }
            ]
          },
          "template": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "templateId": {
            "type": "string"
          }
        },
        "required": [
          "channel",
          "actionType",
          "recipient",
          "content",
          "recipientEmail",
          "id"
        ]
      },
      "EmailTemplate": {
        "type": "object",
        "properties": {
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TemplateCategory"
              }
            ]
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailTemplateContent"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "reminderChannel": {
            "description": "Channel that the message is intended for. There are different requirements\nfor each channel. For example, \"sms\" has a shorter character limit.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReminderChannel"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "reminderActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderAction"
            }
          },
          "permament": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string"
          }
        },
        "required": [
          "category",
          "content",
          "createdAt",
          "updatedAt",
          "reminderChannel",
          "id",
          "name",
          "permament"
        ]
      },
      "EmailTemplateSelection": {
        "type": "object",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "attendeeMeetingConfirmation": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "attendeeMeetingConfirmationId": {
            "type": "string"
          },
          "hostMeetingConfirmation": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "hostMeetingConfirmationId": {
            "type": "string"
          },
          "attendeeMeetingCancelled": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "attendeeMeetingCancelledId": {
            "type": "string"
          },
          "hostMeetingCancelled": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "hostMeetingCancelledId": {
            "type": "string"
          },
          "attendeeMeetingRescheduled": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "attendeeMeetingRescheduledId": {
            "type": "string"
          },
          "hostMeetingRescheduled": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "hostMeetingRescheduledId": {
            "type": "string"
          },
          "bringalongMeetingConfirmation": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "bringalongMeetingConfirmationId": {
            "type": "string"
          },
          "hostMeetingReassigned": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "hostMeetingReassignedId": {
            "type": "string"
          },
          "attendeeMeetingHostChanged": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "attendeeMeetingHostChangedId": {
            "type": "string"
          },
          "attendeeMeetingCancelRequest": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "attendeeMeetingCancelRequestId": {
            "type": "string"
          },
          "attendeeMeetingRescheduleRequest": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "attendeeMeetingRescheduleRequestId": {
            "type": "string"
          },
          "doubleOptInRequest": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "doubleOptInRequestId": {
            "type": "string"
          },
          "requireHostConfirmation": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "requireHostConfirmationId": {
            "type": "string"
          },
          "reviewRequestTemplate": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "reviewRequestTemplateId": {
            "type": "string"
          },
          "waitlistNotification": {
            "$ref": "#/components/schemas/EmailTemplate"
          },
          "waitlistNotificationId": {
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "updatedAt",
          "id"
        ]
      },
      "DateMeta": {
        "type": "object",
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "updated": {
            "format": "date-time",
            "type": "string"
          },
          "deleted": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "created",
          "updated"
        ]
      },
      "CompanyInvite": {
        "type": "object",
        "properties": {
          "secret": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "expiry": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string",
            "nullable": true,
            "default": null
          },
          "inviteType": {
            "type": "string",
            "description": "The type of user this invite will create.\n'standard' for regular team members, 'partner' for partner users.",
            "enum": [
              "standard",
              "resource",
              "api-platform",
              "partner",
              "viewer"
            ]
          },
          "partnerPermissions": {
            "type": "object",
            "nullable": true,
            "description": "Permissions to apply when a partner invite is accepted. Null for non-partner invites."
          },
          "meta": {
            "$ref": "#/components/schemas/DateMeta"
          }
        },
        "required": [
          "secret",
          "companyId",
          "expiry",
          "email",
          "inviteType",
          "meta"
        ]
      },
      "HubspotConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string"
          },
          "synchronizedFields": {
            "type": "boolean",
            "description": "Used for existing users to create custom properties on booking"
          }
        },
        "required": [
          "companyId",
          "refreshToken",
          "accessToken",
          "accessTokenExpiration",
          "synchronizedFields"
        ]
      },
      "PipedriveConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string"
          },
          "apiDomain": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "synchronizedFields": {
            "type": "boolean",
            "description": "Used for existing users to create custom properties on booking"
          }
        },
        "required": [
          "companyId",
          "refreshToken",
          "accessToken",
          "accessTokenExpiration",
          "apiDomain",
          "scopes",
          "synchronizedFields"
        ]
      },
      "CloseConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string"
          },
          "apiDomain": {
            "type": "string",
            "description": "Close has no per-tenant API domain like Pipedrive — every request\ngoes to api.close.com. Persisted for symmetry with other CRM\nconnections."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "synchronizedFields": {
            "type": "boolean",
            "description": "Set after custom fields are auto-created on first connect."
          }
        },
        "required": [
          "companyId",
          "refreshToken",
          "accessToken",
          "accessTokenExpiration",
          "apiDomain",
          "scopes",
          "synchronizedFields"
        ]
      },
      "CentralStationCrmConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string",
            "nullable": true,
            "description": "Refresh token. 42he issues rotating refresh tokens on every refresh\nexchange — each one is single-use, with a 3-month idle expiry (after\nwhich the user must reconnect). The column is nullable to accommodate\nlegacy connections created before refresh tokens were enabled\n(2026-04); those rows will hit the \"please reconnect\" path on first\nrefresh and pick up a refresh token from there."
          },
          "accessToken": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string",
            "nullable": true,
            "description": "ISO timestamp at which `accessToken` expires. Currently ~2 hours from\nissue per 42he's config, but we always read `expires_in` from the\ntoken response rather than hard-coding. `null` only for legacy rows\ncreated before expiry was tracked. We pre-empt expiry by 60 seconds\nto avoid tight-edge races on long-running booking flows."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "companyId",
          "refreshToken",
          "accessToken",
          "accessTokenExpiration",
          "scopes"
        ]
      },
      "AmeiseConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "tenantName": {
            "type": "string"
          },
          "tokenName": {
            "type": "string"
          },
          "tokenExpiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "companyId",
          "tenant",
          "baseUrl"
        ]
      },
      "AbAgentaConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "customerObjectTypeId": {
            "type": "string"
          },
          "fieldMapping": {
            "type": "object"
          },
          "noteMapping": {
            "type": "object",
            "nullable": true
          },
          "syncCrmNotesAndDocuments": {
            "type": "boolean"
          },
          "lastValidatedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "companyId",
          "baseUrl",
          "customerObjectTypeId",
          "fieldMapping",
          "syncCrmNotesAndDocuments"
        ]
      },
      "SalesforceConnection": {
        "type": "object",
        "properties": {
          "utmFieldMappings": {
            "type": "object",
            "description": "UTM parameter to Salesforce field mappings"
          },
          "isSandbox": {
            "type": "boolean",
            "description": "Whether this connection uses a Salesforce Sandbox org"
          },
          "autoConnectUserCalendars": {
            "type": "boolean",
            "description": "Automatically connect members' Salesforce calendars when their email matches"
          },
          "companyId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "instanceUrl": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "issuedAt": {
            "type": "string"
          }
        },
        "required": [
          "isSandbox",
          "autoConnectUserCalendars",
          "companyId",
          "id",
          "refreshToken",
          "accessToken",
          "signature",
          "instanceUrl",
          "scopes",
          "issuedAt"
        ]
      },
      "SlackConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "teamName": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "channelMappings": {
            "type": "object",
            "description": "Mapping of meeting type IDs to channel IDs\nFormat: { \"meetingTypeId\": { channelId: \"C123\", channelName: \"sales\" }, ... }\nEmpty object means no notifications"
          },
          "enabledEvents": {
            "description": "Which booking events trigger notifications",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "teamId",
          "teamName",
          "botUserId",
          "channelMappings",
          "enabledEvents",
          "createdAt"
        ]
      },
      "IntercomMessengerConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "description": "Intercom workspace identifier (`app.id_code`). Surfaced in the\nsettings UI so admins can verify they connected the right\nworkspace.\n\nUnique because a single Intercom workspace is the authoritative\nsource for canvas requests — if two meetergo Companies both\nconnected the same workspace, every Canvas Kit request would\nresolve to a non-deterministic Company. Re-installing from the\nsame workspace deletes the prior connection in\n`IntercomMessengerAuthService.connect`."
          },
          "workspaceName": {
            "type": "string",
            "nullable": true
          },
          "region": {
            "type": "object",
            "description": "Hosting region — Intercom serves EU and AU workspaces from\nseparate API hostnames (`api.eu.intercom.io`, `api.au.intercom.io`).\nDefaults to \"us\" when Intercom does not report a region.\n`varchar(8)` leaves headroom for future regional shards Intercom\nmight add (e.g. `latam`) without a column-resize migration."
          },
          "installedByAdminId": {
            "type": "string",
            "nullable": true,
            "description": "Intercom admin id (the user who installed the app). Used for posting admin notes."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "workspaceId",
          "region",
          "createdAt",
          "updatedAt"
        ]
      },
      "HubSubscription": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "stripeSubscriptionId": {
            "type": "string"
          },
          "stripeSubscriptionItemId": {
            "type": "string",
            "nullable": true,
            "description": "Stripe subscription item ID — set when this add-on is bundled as a line\nitem on the plan subscription. Null for legacy standalone subscriptions."
          },
          "subscriptionStatus": {
            "type": "object"
          },
          "slotsAmount": {
            "type": "number"
          },
          "assignedTo": {
            "description": "Users that can use this subscription. Cannot exceed slotsAmount * 2\n(each workspace covers 2 users). Empty means all company users have access.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cancelAtPeriodEnd": {
            "type": "boolean",
            "description": "True when the user has cancelled but the subscription is still in its paid period."
          },
          "currentPeriodEnd": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "The date the subscription ends (only set when cancelAtPeriodEnd is true)."
          }
        },
        "required": [
          "companyId",
          "stripeSubscriptionId",
          "subscriptionStatus",
          "slotsAmount",
          "assignedTo",
          "cancelAtPeriodEnd"
        ]
      },
      "CrmSubscription": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "stripeSubscriptionId": {
            "type": "string"
          },
          "stripeSubscriptionItemId": {
            "type": "string",
            "nullable": true,
            "description": "Stripe subscription item ID — set when this add-on is bundled as a line\nitem on the plan subscription. Null for legacy standalone subscriptions."
          },
          "subscriptionStatus": {
            "type": "object"
          },
          "slotsAmount": {
            "type": "number",
            "description": "Number of user seats purchased for CRM"
          },
          "assignedTo": {
            "description": "Users that can use this subscription. Cannot exceed slotsAmount.\nEmpty means all company users have access (backward compatibility).",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cancelAtPeriodEnd": {
            "type": "boolean",
            "description": "True when the user has cancelled but the subscription is still in its paid period."
          },
          "currentPeriodEnd": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "The date the subscription ends (only set when cancelAtPeriodEnd is true)."
          }
        },
        "required": [
          "companyId",
          "stripeSubscriptionId",
          "subscriptionStatus",
          "slotsAmount",
          "assignedTo",
          "cancelAtPeriodEnd"
        ]
      },
      "WhatsappSubscription": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "stripeSubscriptionId": {
            "type": "string"
          },
          "stripeSubscriptionItemId": {
            "type": "string",
            "nullable": true,
            "description": "Stripe subscription item ID — set when this add-on is bundled as a line\nitem on the plan subscription. Null for legacy standalone subscriptions."
          },
          "subscriptionStatus": {
            "type": "object"
          },
          "phoneNumbersAmount": {
            "type": "number",
            "description": "Number of phone numbers purchased for WhatsApp."
          },
          "cancelAtPeriodEnd": {
            "type": "boolean",
            "description": "True when the user has cancelled but the subscription is still in its paid period."
          },
          "currentPeriodEnd": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "The date the subscription ends (only set when cancelAtPeriodEnd is true)."
          }
        },
        "required": [
          "companyId",
          "stripeSubscriptionId",
          "subscriptionStatus",
          "phoneNumbersAmount",
          "cancelAtPeriodEnd"
        ]
      },
      "KlicktippConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "customerKey": {
            "type": "string",
            "description": "Klicktipp customer key"
          },
          "doiFieldId": {
            "type": "string",
            "description": "Klicktipp field id for double opt in process to use"
          },
          "appointmentStartFieldId": {
            "type": "string",
            "description": "Klicktipp field id for appointmennt start time"
          },
          "meetingLocationFieldId": {
            "type": "string",
            "description": "Klicktipp field id for the meeting location\nresolves to meeting link for online channels\nresolves to address for local channel\notherwise resolves to channel name"
          },
          "meetingTypeNameFieldId": {
            "type": "string",
            "description": "Klicktipp field id for meeting type name"
          },
          "meetingTypeDescriptionFieldId": {
            "type": "string",
            "description": "Klicktipp field id for meeting type description"
          },
          "cancellationLinkFieldId": {
            "type": "string",
            "description": "Klicktipp field id for booking cancellation link"
          },
          "rescheduleLinkFieldId": {
            "type": "string",
            "description": "Klicktipp field id for booking reschedule link"
          },
          "bookingDateFieldId": {
            "type": "string",
            "description": "Klicktipp field id for booking date"
          },
          "globalTagIds": {
            "description": "Global tag that is assigned to all contacts in klicktipp",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enableForAllMeetingTypes": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "company",
          "companyId",
          "customerKey",
          "globalTagIds",
          "enableForAllMeetingTypes",
          "createdAt",
          "updatedAt"
        ]
      },
      "SmartWeCRMConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "expiresAfter": {
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "email",
          "accessToken",
          "refreshToken",
          "tokenType",
          "scope",
          "expiresAfter",
          "createdAt",
          "updatedAt"
        ]
      },
      "StripeFeatureConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "stripeUserId": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          },
          "stripePublishableKey": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "accessToken",
          "accessTokenExpiration"
        ]
      },
      "PaypalFeatureConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "paypalPayerId": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string"
          },
          "paypalEmailAddress": {
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "accessToken",
          "paypalPayerId",
          "accessTokenExpiration"
        ]
      },
      "MollieFeatureConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "mollieOrganizationId": {
            "type": "string",
            "description": "Mollie organization ID (org_xxxxxx); stored for ops/debugging."
          },
          "mollieProfileId": {
            "type": "string",
            "description": "Profile ID — payments are tied to a specific Mollie profile (pfl_xxxxxx)."
          },
          "tokenType": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string"
          },
          "webhookSecret": {
            "type": "string",
            "description": "Per-company random secret embedded in this merchant's webhook URL\n(`/mollie-feature/hooks/:webhookSecret`). Anyone hitting the\nwebhook without the secret gets a 404; Mollie itself does not sign\nrequests so the unguessable path is the only inbound auth. The\nunique index lets webhook lookup hit O(1) without a full scan and\nguarantees no two merchants ever share the same path."
          },
          "needsReauth": {
            "type": "boolean",
            "description": "Set when token refresh fails (revoked grant, scopes changed).\n`getConnection` rejects so callers surface \"reconnect Mollie\"."
          }
        },
        "required": [
          "companyId",
          "accessToken",
          "webhookSecret",
          "needsReauth"
        ]
      },
      "AircallConnection": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "accessToken",
          "tokenType",
          "createdAt",
          "updatedAt"
        ]
      },
      "ReviewSettings": {
        "type": "object",
        "properties": {
          "reviewCollection": {
            "type": "boolean",
            "description": "Send a review request automatically after every meeting. Does not affect the public review page.",
            "default": true
          },
          "pageEnabled": {
            "type": "boolean",
            "description": "Serve the public review collection page",
            "default": true
          },
          "autoApprove": {
            "type": "boolean",
            "description": "Automatically approve new reviews",
            "default": false
          },
          "showOnBooking": {
            "type": "boolean",
            "description": "Show reviews on booking pages",
            "default": true
          },
          "anonymousCollection": {
            "type": "boolean",
            "description": "Allow anonymous reviews",
            "default": false
          },
          "enableGoogleSnippet": {
            "type": "boolean",
            "description": "Show Google reviews",
            "default": true
          },
          "emailDelay": {
            "type": "string",
            "description": "Delay before sending review request email after meeting",
            "enum": [
              "1h",
              "2h",
              "3h",
              "4h",
              "next-day",
              "1d",
              "2d",
              "3d"
            ],
            "default": "1d"
          },
          "showFloatingWidget": {
            "type": "boolean",
            "description": "Display the floating review widget on the website",
            "default": true
          },
          "collectionLevel": {
            "type": "string",
            "description": "Level at which reviews are collected (company or workspace)",
            "enum": [
              "company",
              "workspace"
            ],
            "default": "company"
          },
          "googleReviewUrl": {
            "type": "string",
            "description": "Google review URL where customers can leave a Google review (e.g. https://g.page/r/abc/review)"
          },
          "showGoogleCta": {
            "type": "boolean",
            "description": "Show a Google review CTA after review submission",
            "default": false
          },
          "googleCtaMode": {
            "type": "string",
            "description": "Google CTA mode: \"all\" shows to everyone, \"gated\" shows only to positive reviewers",
            "enum": [
              "all",
              "gated"
            ],
            "default": "all"
          },
          "googleCtaThreshold": {
            "type": "number",
            "description": "Minimum star rating to show Google CTA (only used when googleCtaMode is \"gated\")",
            "default": 4,
            "minimum": 1,
            "maximum": 5
          },
          "googlePlaceId": {
            "type": "string",
            "description": "Google Place ID for importing Google reviews"
          },
          "provenExpertReviewUrl": {
            "type": "string",
            "description": "ProvenExpert survey/profile URL to send reviewers to after they submit (e.g. https://www.provenexpert.com/<slug>/)"
          },
          "showProvenExpertCta": {
            "type": "boolean",
            "description": "Show a ProvenExpert CTA after review submission",
            "default": false
          },
          "provenExpertSurveyCode": {
            "type": "string",
            "description": "ProvenExpert survey code, used to generate a personalised invite link per reviewer"
          },
          "provenExpertCtaMode": {
            "type": "string",
            "description": "ProvenExpert CTA mode: \"all\" shows to everyone, \"gated\" shows only to positive reviewers",
            "enum": [
              "all",
              "gated"
            ],
            "default": "all"
          },
          "provenExpertCtaThreshold": {
            "type": "number",
            "description": "Minimum star rating to show the ProvenExpert CTA (only used when provenExpertCtaMode is \"gated\")",
            "default": 4,
            "minimum": 1,
            "maximum": 5
          },
          "trustpilotReviewUrl": {
            "type": "string",
            "description": "Trustpilot review URL to send reviewers to after submission"
          },
          "showTrustpilotCta": {
            "type": "boolean",
            "default": false
          },
          "trustpilotCtaMode": {
            "type": "string",
            "enum": [
              "all",
              "gated"
            ],
            "default": "all"
          },
          "trustpilotCtaThreshold": {
            "type": "number",
            "default": 4,
            "minimum": 1,
            "maximum": 5
          },
          "cituroRatingsUrl": {
            "type": "string",
            "description": "Public cituro ratings profile (URL or slug, e.g. https://app.cituro.com/ratings/erzengel) used for a one-time import of the business’s own reviews when switching from cituro"
          },
          "reviewChannels": {
            "type": "array",
            "description": "Channels to use for sending review invitations after meetings",
            "default": [
              "email"
            ],
            "items": {
              "type": "string",
              "enum": [
                "email",
                "sms",
                "whatsapp"
              ]
            }
          },
          "pageDesign": {
            "$ref": "#/components/schemas/ReviewPageDesign"
          },
          "shareSettings": {
            "$ref": "#/components/schemas/ReviewShareSettings"
          }
        },
        "required": [
          "reviewCollection",
          "pageEnabled",
          "autoApprove",
          "showOnBooking",
          "anonymousCollection",
          "enableGoogleSnippet",
          "emailDelay",
          "showFloatingWidget",
          "collectionLevel",
          "showGoogleCta",
          "googleCtaMode",
          "googleCtaThreshold",
          "showProvenExpertCta",
          "provenExpertCtaMode",
          "provenExpertCtaThreshold",
          "reviewChannels"
        ]
      },
      "ReferralTier": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "object",
            "nullable": true
          },
          "imageUrl": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "count",
          "label",
          "description",
          "imageUrl"
        ]
      },
      "ReferralSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "headline": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "mediaType": {
            "type": "string",
            "enum": [
              "none",
              "image",
              "video"
            ]
          },
          "mediaUrl": {
            "type": "object",
            "nullable": true
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferralTier"
            }
          },
          "verificationNote": {
            "type": "string"
          },
          "termsText": {
            "type": "string"
          },
          "showAfterReview": {
            "type": "boolean"
          },
          "qualificationMode": {
            "type": "string",
            "enum": [
              "auto_booking",
              "manual_confirm"
            ]
          },
          "meetingTypeId": {
            "type": "object",
            "nullable": true
          },
          "standalonePage": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "headline",
          "body",
          "mediaType",
          "mediaUrl",
          "tiers",
          "verificationNote",
          "termsText",
          "showAfterReview",
          "qualificationMode",
          "standalonePage"
        ]
      },
      "Group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "description": "Relation to company with FK, cascade delete, index"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "name": {
            "type": "string",
            "description": "Group name/title"
          },
          "users": {
            "description": "Non-admin users relation. A soft limit should be enforced.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "admins": {
            "description": "Admins of the group. Admins should only be in this relation\nand not a user as well. A soft limit should be enforced.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/DateMeta"
          }
        },
        "required": [
          "id",
          "companyId",
          "name",
          "meta"
        ]
      },
      "BookingBillingDetailsDto": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 255
          },
          "postalCode": {
            "type": "string",
            "maxLength": 16
          },
          "city": {
            "type": "string",
            "maxLength": 120
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2",
            "maxLength": 2
          },
          "vatId": {
            "type": "string",
            "description": "USt-IdNr.",
            "maxLength": 32
          }
        }
      },
      "CreateAttendeeDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Attendee email address. Required for all standard bookings.\nOptional only when `BookingDto.phoneOnlyBooking` is true.\nValidated as email format when provided.",
            "format": "email"
          },
          "firstname": {
            "type": "string",
            "description": "Either fullname or firstname/lastname is required",
            "maxLength": 150
          },
          "lastname": {
            "type": "string",
            "description": "Either fullname or firstname/lastname is required",
            "maxLength": 150
          },
          "fullname": {
            "type": "string",
            "description": "Either fullname or firstname/lastname is required",
            "maxLength": 150
          },
          "receiveReminders": {
            "type": "boolean"
          },
          "bringalongEmails": {
            "description": "Additional attendee emails (max 5)",
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "notes": {
            "type": "object",
            "description": "An object containing attendee form entries.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "billingDetails": {
            "nullable": true,
            "description": "Billing details from the booking page's billing block, shown when the\nmeeting type sets `meetingPaymentInfo.collectBillingDetails`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingBillingDetailsDto"
              }
            ]
          },
          "phone": {
            "type": "string"
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Language"
              }
            ]
          },
          "timezone": {
            "type": "string"
          },
          "dataPolicyAccepted": {
            "type": "boolean"
          }
        },
        "required": [
          "receiveReminders",
          "notes"
        ]
      },
      "UtmDto": {
        "type": "object",
        "properties": {
          "utm_source": {
            "type": "string",
            "maxLength": 255
          },
          "utm_medium": {
            "type": "string",
            "maxLength": 255
          },
          "utm_campaign": {
            "type": "string",
            "maxLength": 255
          },
          "utm_content": {
            "type": "string",
            "maxLength": 255
          },
          "utm_term": {
            "type": "string",
            "maxLength": 255
          }
        }
      },
      "PaymentProvider": {
        "type": "string",
        "enum": [
          "paypal",
          "stripe",
          "mollie",
          "none"
        ],
        "description": "Selected payment provider for this booking.\nRequired when the meeting type has multiple payment providers enabled.\nIf not provided, falls back to the first enabled provider."
      },
      "BookingDto": {
        "type": "object",
        "properties": {
          "attendee": {
            "$ref": "#/components/schemas/CreateAttendeeDto"
          },
          "meetingTypeId": {
            "type": "string",
            "description": "ID of the meeting type to book."
          },
          "hostIds": {
            "description": "Host IDs for the booking.\nRequired for one-on-one bookings (specific host selection).\nOptional for round-robin/queue bookings where queueId is provided instead.\nWhen sent TOGETHER with `queueId`, these IDs scope the round-robin to a\nsubset of the queue: the backend rotates only among these hosts (used by\n`?hosts=` subset links). Empty/omitted with `queueId` = the whole queue.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "start": {
            "type": "string"
          },
          "appointmentId": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "locationSelectionContextId": {
            "type": "string",
            "description": "Opaque Finder context exchanged immediately before entering booking.",
            "maxLength": 128,
            "pattern": "/^[A-Za-z0-9_-]+$/"
          },
          "queueId": {
            "type": "string",
            "description": "required when meeting type has a queue (round-robin / co-host)\nmust be undefined for non-queue meetings (one-to-one / group)\nif host selection is true, queue id is required if fastest host selection is chosen\nif hosts selection is true, queue id must be undefined if a specific host is chosen\nto round-robin within a SUBSET of the queue, send queueId together with the\nsubset `hostIds` (the backend rotates only among those hosts)"
          },
          "bookingTargetToken": {
            "type": "string",
            "description": "Opaque booking-block audience context from booking info.",
            "maxLength": 64,
            "pattern": "/^[A-Za-z0-9_-]+$/"
          },
          "channel": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeChannel"
              }
            ]
          },
          "duration": {
            "type": "number",
            "description": "Duration in minutes for the booking. Optional.\nIf not provided, uses the meeting type's default duration.\nIf provided, must match either the default duration or one of the allowed durations configured for the meeting type.\nPrimarily needed when meeting type has multiple duration options (allowedDurations)."
          },
          "routingFormId": {
            "type": "string"
          },
          "utm": {
            "$ref": "#/components/schemas/UtmDto"
          },
          "referrerUrl": {
            "type": "string",
            "maxLength": 2048
          },
          "sourceChannel": {
            "type": "string",
            "enum": [
              "booking_page",
              "embed",
              "web_widget",
              "whatsapp_agent",
              "phone_agent",
              "form",
              "gbp",
              "manual",
              "business_card"
            ]
          },
          "ignoreAvailability": {
            "type": "boolean",
            "description": "Skips availability, working-hours, conflict and group-capacity checks\n(instant booker, Platform API). Only honored when the caller is\nauthenticated as a member of the meeting type's company, by JWT or by\nAPI key plus `x-meetergo-api-user-id`; anonymous bookings have it\nnormalized to false server-side."
          },
          "isTest": {
            "type": "boolean",
            "description": "Marks the booking as a rehearsal the host made for themselves, so it is\nexcluded from the activation milestone (`firstBookingAt` must only ever\ncome from a real third party). The appointment itself is real: the\ncalendar entry and the confirmation mail are produced exactly as they\nwould be for an invitee, which is the point of the onboarding self-test.\n\nSame trust model as `ignoreAvailability`: only honored for authenticated\ncallers from the meeting type's own company, so a public attendee cannot\nsuppress a host's activation by sending the flag."
          },
          "attendeePendingId": {
            "type": "number",
            "description": "ID of pending attendee that will be deleted after successful booking.\nThis is only needed when \"collect during form entry\" feature is used.\nIf not provided, a successful booking may show up in pending contacts."
          },
          "paymentId": {
            "type": "string"
          },
          "paymentProvider": {
            "description": "Selected payment provider for this booking.\nRequired when the meeting type has multiple payment providers enabled.\nIf not provided, falls back to the first enabled provider.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentProvider"
              }
            ]
          },
          "couponCode": {
            "type": "string",
            "description": "Coupon code for a discount on paid bookings.\nValidated during payment order creation and re-validated at booking time.",
            "maxLength": 32
          },
          "resourceChannelIds": {
            "description": "Ids of the resource channel entity",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "oneTimeLinkId": {
            "type": "string",
            "description": "Id of the one time booking link.\nRequired in order to invalidate the booking link, once booking is done"
          },
          "bookingProposalId": {
            "type": "string",
            "description": "The booking proposal the invitee arrived through. Lets the booking pass\nthe proposal's own hold on the chosen slot and consumes the proposal\nonce the booking is made.",
            "format": "uuid"
          },
          "skipNotifications": {
            "type": "boolean",
            "description": "Skip sending email notifications to the attendee for this booking"
          },
          "phoneOnlyBooking": {
            "type": "boolean",
            "description": "When true, attendee email is not required and phone becomes the identifier.\nRequires the meeting type to have `allowPhoneOnlyBooking` enabled in its options.\nDesigned for voice agent / phone scheduling use cases where collecting email\nfrom the caller is not viable."
          },
          "icsTitle": {
            "type": "string",
            "description": "Custom ICS calendar invite title. If provided, overrides the configured\nmeeting type ICS title for this specific booking.\nUseful for AI-generated titles based on conversation context (e.g., from calgent).",
            "maxLength": 200
          },
          "icsDescription": {
            "type": "string",
            "description": "Custom ICS calendar invite description. If provided, overrides the configured\nmeeting type ICS description for this specific booking.\nUseful for AI-generated descriptions based on conversation context (e.g., from calgent).",
            "maxLength": 2000
          },
          "rwgToken": {
            "type": "string",
            "description": "Google Actions Center token for conversion tracking.\nThis token is passed via the rwg_token URL parameter when users\nclick through from Google Maps/Search.",
            "maxLength": 500
          },
          "rwgMerchantId": {
            "type": "string",
            "description": "Merchant ID associated with the rwg_token for Google Actions Center.\nUsed to determine if merchant changed during booking flow."
          },
          "bookingPassword": {
            "type": "string",
            "description": "Password for accessing a password-protected booking page.\nRequired when the meeting type has password protection enabled."
          },
          "referralCode": {
            "type": "string",
            "description": "Advocate referral code (from the /r/<code> referred-person landing).\nIn `auto_booking` qualification mode the booking creates a pending\nreferral recommendation for that advocate; otherwise it is ignored.",
            "maxLength": 32
          },
          "formRecipientToken": {
            "type": "string",
            "description": "Token of the personal form link that routed here (the `?fr=` URL param a\nrouting form appends when it sends a recipient to a booking page).\n\nLinks the appointment to the recipient, so a returning recipient is shown\nthe booking they hold instead of an empty calendar, and a second booking\nthrough the same link is refused. Identifies only: an unknown token is\nignored rather than failing the booking.",
            "maxLength": 64
          },
          "waitlistToken": {
            "type": "string",
            "description": "Waitlist unsubscribe token. When provided (from the ?wl= URL param on the booking link),\nthe corresponding waitlist entry is removed after successful booking and the attendee\nis tagged as originating from the waitlist."
          }
        },
        "required": [
          "attendee",
          "meetingTypeId",
          "start"
        ]
      },
      "NextQueueHostsSelectionReasonDto": {
        "type": "object",
        "properties": {
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupId": {
            "type": "string"
          },
          "selectionReason": {
            "type": "object"
          }
        },
        "required": [
          "userIds",
          "selectionReason"
        ]
      },
      "ProvisionalBookingPayload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Generated ID"
          },
          "dto": {
            "description": "Booking dto",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingDto"
              }
            ]
          },
          "locationSelectionContext": {
            "type": "object",
            "nullable": true,
            "description": "Trusted Finder selection retained across confirmation flows."
          },
          "type": {
            "type": "string",
            "enum": [
              "doubleOptIn",
              "requireHostConfirmation"
            ]
          },
          "company": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Company"
              }
            ]
          },
          "hosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "meetingType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "Appointment": {
            "$ref": "#/components/schemas/Appointment"
          },
          "appointmentId": {
            "type": "string"
          },
          "queueBookingInfo": {
            "description": "queue booking info required for post booking side effects at the time of confirmation.",
            "allOf": [
              {
                "$ref": "#/components/schemas/NextQueueHostsSelectionReasonDto"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status of the provisional booking request",
            "enum": [
              "pending",
              "confirmed",
              "expired",
              "declined_by_host"
            ]
          },
          "declineReason": {
            "type": "string",
            "description": "Reason provided by host when declining (optional)"
          },
          "resolvedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the booking was declined or expired"
          },
          "expiryWarningSent": {
            "type": "boolean",
            "description": "Whether the \"expiring soon\" warning email has been sent to the host"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "description": "When this provisional booking expires.\nSet at creation time based on company's provisionalBookingExpiryHours or default 72h."
          },
          "start": {
            "format": "date-time",
            "type": "string",
            "description": "Reserved slot start. Used by availability checks so pending payloads\nblock the slot for other bookers until the payload is confirmed,\ndeclined, or expired."
          },
          "end": {
            "format": "date-time",
            "type": "string",
            "description": "Reserved slot end."
          }
        },
        "required": [
          "id",
          "dto",
          "locationSelectionContext",
          "type",
          "company",
          "meetingType",
          "createdAt",
          "deletedAt",
          "status",
          "expiryWarningSent"
        ]
      },
      "Reseller": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "Human-readable stable identifier used in the provisioning API and as\n`metadata.partner` string on legacy Companies. Lowercase, URL-safe.\nExample: 'placetel'."
          },
          "name": {
            "type": "string"
          },
          "provisioningSecretHash": {
            "type": "string",
            "description": "Bcrypt hash of the provisioning secret. Compared in constant-time in\nResellerAuthGuard. Rotate by regenerating the hash and updating this\nfield; the reseller updates their secret on their end."
          },
          "dashboardPasswordHash": {
            "type": "string",
            "nullable": true,
            "description": "Bcrypt hash of the dashboard login password. Separate from the\nprovisioning secret so the two can be rotated independently."
          },
          "billingModel": {
            "type": "string",
            "enum": [
              "external",
              "internal"
            ]
          },
          "defaultTier": {
            "type": "string",
            "nullable": true,
            "description": "Tier granted to newly provisioned companies when billingModel=EXTERNAL.\nIgnored when billingModel=INTERNAL (company gets a trial like normal).",
            "enum": [
              "basic",
              "essentials",
              "growth",
              "teams",
              "light",
              "suite",
              "premium",
              "enterprise"
            ]
          },
          "autoVerifyEmail": {
            "type": "boolean",
            "description": "Auto-confirm Cognito user + mark email verified on provisioning."
          },
          "issuePatOnProvision": {
            "type": "boolean",
            "description": "Generate a PAT and return it in the provisioning response."
          },
          "commissionPercentage": {
            "type": "number",
            "description": "Commission percentage retained by the reseller when billingModel=INTERNAL.\nUnused for EXTERNAL resellers (they keep 100% of end-user revenue)."
          },
          "pricePerSeatEur": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency for billing."
          },
          "testEmailDomains": {
            "description": "Email domains whose accounts are test/internal and excluded from\nbilling (contract §6 for Placetel). Matched as `%@<domain>`. Empty =\nbill everything. Single source of truth for the billing extract.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "billingStartDate": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "First day billing accrues from (go-live). Used for the arrears\nschedule. Null until the reseller goes live."
          },
          "billingSeatBasis": {
            "type": "object",
            "description": "Defines which contractual population the reseller billing extract counts.\nLegacy resellers keep the account-activity basis; partner-program\nresellers use the same live licensed-user population as Stripe seats."
          },
          "sevdeskCustomerId": {
            "type": "string",
            "nullable": true,
            "description": "sevDesk customer id this reseller's invoices are raised against."
          },
          "defaultAllowPhoneOnlyBooking": {
            "type": "boolean"
          },
          "defaultChannel": {
            "type": "string",
            "nullable": true,
            "enum": [
              "local",
              "local-attendee",
              "google",
              "zoom",
              "phone",
              "phone-incoming",
              "whatsapp",
              "connect",
              "webex",
              "skypeForConsumer",
              "skypeForBusiness",
              "teamsForBusiness",
              "teamsForBusiness2",
              "teamsForExchange",
              "teams2ForExchange",
              "custom",
              "resource",
              "whereby",
              "kmeet",
              "zava",
              "jitsi",
              "nextcloudTalk",
              "openTalk",
              "alfaview"
            ]
          },
          "defaultAutoEnableSmsConfirmation": {
            "type": "boolean",
            "description": "When true, the default meeting type seeds an SMS confirmation workflow\nout of the box. Requires the reseller to fund SMS credits\n(smsCreditsPerAccount > 0 + a live pool) for it to actually send."
          },
          "smsCreditsPerAccount": {
            "type": "number"
          },
          "active": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "provisioningSecretHash",
          "billingModel",
          "autoVerifyEmail",
          "issuePatOnProvision",
          "commissionPercentage",
          "currency",
          "testEmailDomains",
          "billingSeatBasis",
          "defaultAllowPhoneOnlyBooking",
          "defaultAutoEnableSmsConfirmation",
          "smsCreditsPerAccount",
          "active",
          "createdAt",
          "updatedAt"
        ]
      },
      "PermissionSettings": {
        "type": "object",
        "properties": {
          "meetingTypeCreate": {
            "type": "string"
          },
          "workflows": {
            "type": "string"
          },
          "forms": {
            "type": "string"
          },
          "inviteNewUsers": {
            "type": "string"
          },
          "handoffTarget": {
            "type": "string"
          },
          "filterAccess": {
            "type": "string"
          },
          "contactsVisibiltyPermission": {
            "type": "string"
          },
          "crmDelete": {
            "type": "string"
          },
          "aiPhoneAssistant": {
            "type": "string"
          },
          "excludeAdminsFromTeamAnalytics": {
            "type": "boolean"
          },
          "slugChange": {
            "type": "string"
          }
        },
        "required": [
          "meetingTypeCreate",
          "workflows",
          "forms",
          "inviteNewUsers",
          "handoffTarget",
          "filterAccess",
          "contactsVisibiltyPermission",
          "crmDelete",
          "aiPhoneAssistant",
          "excludeAdminsFromTeamAnalytics",
          "slugChange"
        ]
      },
      "CustomDomain": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/User"
          },
          "createdById": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "active"
            ]
          },
          "acmValidationCnameName": {
            "type": "string",
            "nullable": true,
            "description": "ACM DNS-validation record (cloudfront rows only). Bunny proves control\nthrough the routing CNAME itself, so these are null there."
          },
          "acmValidationCnameValue": {
            "type": "string",
            "nullable": true
          },
          "acmValidationCnameTTL": {
            "type": "number"
          },
          "routingCnameName": {
            "type": "string"
          },
          "routingCnameValue": {
            "type": "string"
          },
          "routingCnameTTL": {
            "type": "number"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "usercentricsSettingsId": {
            "type": "string",
            "nullable": true,
            "description": "Per-domain override of the company's Usercentrics Settings-ID. Only\ntakes effect while the company has `featureAccess.cmpIntegration`,\nsame as the company-level field. See design spec 2.1."
          },
          "gtmContainerId": {
            "type": "string",
            "nullable": true,
            "description": "Per-domain override of the company's GTM Container ID. See design\nspec 2.1."
          },
          "gtmServerContainerUrl": {
            "type": "string",
            "nullable": true,
            "description": "Per-domain override of the company's server-side GTM loader URL. See\ndesign spec 2.1."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "certificateArn": {
            "type": "string",
            "nullable": true
          },
          "edgeProvider": {
            "type": "object"
          },
          "bunnyPullZoneId": {
            "type": "number",
            "nullable": true,
            "description": "Bunny pull zone the hostname lives on (bunny rows once the CNAME was\nseen). Hostnames are spread over several zones, 100 per zone cap."
          },
          "verificationError": {
            "type": "string",
            "nullable": true,
            "description": "Why verification cannot proceed even though the customer did their part,\ne.g. `caa-blocks-letsencrypt`. Shown in the dashboard; null when clear."
          },
          "cloudfrontDistroId": {
            "type": "string",
            "nullable": true
          },
          "cdnEtag": {
            "type": "string",
            "nullable": true,
            "description": "ETag of the CloudFront distribution needed for deleting it."
          },
          "cdnEndpoint": {
            "type": "string",
            "nullable": true,
            "description": "URL of the CloudFront distribution"
          }
        },
        "required": [
          "domain",
          "createdBy",
          "createdById",
          "status",
          "acmValidationCnameName",
          "acmValidationCnameValue",
          "acmValidationCnameTTL",
          "routingCnameName",
          "routingCnameValue",
          "routingCnameTTL",
          "company",
          "companyId",
          "usercentricsSettingsId",
          "gtmContainerId",
          "gtmServerContainerUrl",
          "createdAt",
          "updatedAt",
          "certificateArn",
          "edgeProvider",
          "bunnyPullZoneId",
          "verificationError",
          "cloudfrontDistroId",
          "cdnEtag",
          "cdnEndpoint"
        ]
      },
      "Company": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "logo": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "allowedLanguages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowAITranslation": {
            "type": "boolean"
          },
          "timezone": {
            "type": "string",
            "description": "Company timezone acts as default for new users and other presets.\nIt is set after onboarding is completed to the owner's timezone chosen during onboarding.\nIf not set, it defaults to UTC. If timezone is UTC it may suggest that onboarding was not completed."
          },
          "referralId": {
            "type": "string",
            "deprecated": true
          },
          "tier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyTier"
              }
            ]
          },
          "subscriptionStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionStatus"
              }
            ]
          },
          "preferredCurrency": {
            "nullable": true,
            "description": "User's preferred currency for billing.\nIf null, detected currency from billing address country is used.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ]
          },
          "users": {
            "description": "Comma-seperated IDs of users.",
            "deprecated": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "description": "Reflects solo/team choice during onboarding\nbut doesn't affect anything else",
            "allOf": [
              {
                "$ref": "#/components/schemas/BrandType"
              }
            ]
          },
          "emailSender": {
            "description": "Sender to use for sending emails. Defaults to null\nwhich uses the default sender. If a sender is configured\nthe configuration must still be fetched. If there is an\nerror with configuration, fall back to default and notify.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailSender"
              }
            ]
          },
          "primaryColor": {
            "type": "string"
          },
          "useBrandStyling": {
            "type": "boolean"
          },
          "hideMeetergoBranding": {
            "type": "boolean"
          },
          "businessCardTheme": {
            "nullable": true,
            "description": "Company-wide business card theme; members without an own theme inherit it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BusinessCardTheme"
              }
            ]
          },
          "enforceBusinessCardTheme": {
            "type": "boolean",
            "description": "When true, the company theme overrides every member's own card design."
          },
          "googleAnalyticsMeasurementId": {
            "type": "string",
            "nullable": true,
            "description": "Google Analytics 4 Measurement ID (e.g., G-XXXXXXXXXX)"
          },
          "gtmContainerId": {
            "type": "string",
            "nullable": true,
            "description": "Google Tag Manager Container ID (e.g., GTM-XXXXXXX)"
          },
          "gtmServerContainerUrl": {
            "type": "string",
            "nullable": true,
            "description": "Custom server-side GTM loader URL (e.g., https://metrics.example.com/gtm.js). When set, the booking page loads the GTM container from this first-party endpoint instead of googletagmanager.com."
          },
          "matomoUrl": {
            "type": "string",
            "nullable": true,
            "description": "Base URL of the company Matomo instance (e.g. https://stats.example.com). Booking pages load the Matomo tracker from here when a Site ID is also set."
          },
          "matomoSiteId": {
            "type": "string",
            "nullable": true,
            "description": "Matomo Site ID of the tracked website, as shown in the Matomo UI."
          },
          "googleActionsCenterEnabled": {
            "type": "boolean",
            "description": "Enable Reserve with Google integration"
          },
          "googleActionsCenterMeetingTypeIds": {
            "nullable": true,
            "description": "Meeting type IDs for Reserve with Google",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "connectWaitingRoom": {
            "nullable": true,
            "description": "Company-wide branding for the connect prejoin/waiting screen.\nWorkspaces can override via their own connectWaitingRoom settings.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ConnectWaitingRoomSettings"
              }
            ]
          },
          "featureAccess": {
            "description": "Derived, never stored. Kept a plain own property rather than a getter:\n`assembleUserVm` hands the raw entity to the dashboard, and a prototype\ngetter does not survive JSON serialization — the whole dashboard reads\n`company.featureAccess`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FeatureAccess"
              }
            ]
          },
          "detectedCurrency": {
            "description": "Currency detected from billing address country.\nUS and US territories use USD, all others use EUR.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ]
          },
          "effectiveCurrency": {
            "description": "Effective currency used for billing.\nUses preferred currency if set, otherwise detected currency.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Currency"
              }
            ]
          },
          "useNoReplyAddress": {
            "type": "boolean"
          },
          "sendEmailsAsPlainText": {
            "type": "boolean",
            "description": "When enabled, outgoing emails for this company are sent as plain text\ninstead of HTML. The HTML body is converted to text and replaces the\npayload; templates and React Email layouts are still rendered first\nand then stripped. Used by customers whose mail servers/recipients\nmangle rich HTML or who need accessibility/compliance-grade plain\nmessages."
          },
          "integrationPermissions": {
            "type": "object",
            "description": "Granular per-integration permissions.\nControls which integrations are available to company members.\nWorkspace-level overrides can further refine these settings."
          },
          "outlookConnectionRequirementScopes": {
            "type": "array",
            "description": "Where the \"host needs a working Microsoft connection\" requirement applies.\nEmpty array = no enforcement. See `OutlookConnectionRequirementScope` for\nthe meaning of each scope. Default empty for backwards compatibility.",
            "items": {
              "$ref": "#/components/schemas/OutlookConnectionRequirementScope"
            }
          },
          "outlookConnectionRequirementTypes": {
            "type": "array",
            "description": "Which Microsoft connection types are accepted as \"active\" when any scope\nin `outlookConnectionRequirementScopes` is enabled. A host needs at least\none matching active connection. Defaults to both Graph and Exchange Teams.",
            "items": {
              "$ref": "#/components/schemas/OutlookConnectionType"
            }
          },
          "storageUsedBytes": {
            "type": "number",
            "description": "Total storage used by this company in bytes.\nUpdated when files are uploaded or deleted."
          },
          "defaultLandingPage": {
            "type": "string",
            "nullable": true,
            "description": "Company-level setting for the default page users see after login.\nWhen null, defaults to /meeting-types."
          },
          "miraSettings": {
            "nullable": true,
            "description": "Company-wide configuration for the Mira AI assistant: a master on/off\nswitch plus per-category data-access toggles. Null = never configured, in\nwhich case {@link getMiraSettings} resolves the master switch by signup\ndate: off (opt-in) for companies created before the rollout cutoff, on for\nnewer ones. Enforced in apps/next's chat route, not here.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MiraSettings"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "usersRelation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "owner": {
            "type": "string"
          },
          "emailDomain": {
            "type": "string",
            "description": "Top level domain of email address\nOnly used for team type companies\nIf undefined, public email is used which can be considered as solo user initially"
          },
          "cancelsAt": {
            "format": "date-time",
            "type": "string",
            "description": "If subscription is canceled, date is set to cancelation date.\nNull if not canceled."
          },
          "stripeCustomerId": {
            "type": "string"
          },
          "stripeSubscriptionId": {
            "type": "string",
            "nullable": true
          },
          "prorationBehaviorCreateProration": {
            "type": "boolean",
            "description": "How proration is handled in stripe. Default is false,\nwhich corresponds to `always_invoice`, which bills subscription\nchanges immediately. If set to true, use `create_prorations`,\nwhich bills on the next invoice.\nCurrently this is only set manually for enterprise clients with\nSLA."
          },
          "samlIdp": {
            "type": "string",
            "description": "Defined if company uses enterprise SSO. This is the identifier\npassed to cognito. A SAML IDP must be created in cognito.\nCurrently this is only set manually for enterprise clients."
          },
          "requireMfa": {
            "type": "boolean",
            "description": "Every member must sign in with a second factor. Enforced through Keycloak\nrequired actions (`MfaEnforcementService`): members without an\nauthenticator app or passkey are made to enroll at their next login.\nNever set on a company with `samlIdp`; their identity provider owns MFA."
          },
          "billingAddress": {
            "$ref": "#/components/schemas/CompanyBillingAddress"
          },
          "lifetimePremium": {
            "type": "boolean",
            "deprecated": true
          },
          "trialEndDate": {
            "type": "string"
          },
          "onboardingTrialExtendedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Server-owned redemption marker. Shared by all users and onboarding links."
          },
          "showTrialOverModal": {
            "type": "boolean"
          },
          "maxUsers": {
            "type": "number"
          },
          "maxPartners": {
            "type": "number",
            "description": "Maximum number of partner **users** allowed for this company.\n\nNOTE: \"Partner users\" here are a seat role inside a Company — they\ndon't count toward seat limits and can't access billing or host\nevents. This is NOT the `Reseller` concept (an external\norganisation that provisions meetergo accounts). See `resellerId`\nfor that relation."
          },
          "showDataPolicyLink": {
            "type": "boolean"
          },
          "hideDataPolicyCheckbox": {
            "type": "boolean"
          },
          "enableWithdrawalFunction": {
            "type": "boolean",
            "description": "Master switch for the statutory withdrawal function (§ 356a BGB, from\n19.06.2026). Publishes the public withdrawal page, the embed widget and\nthe \"Vertrag widerrufen\" link in the booking pages' legal footer.\n\nWhich bookings actually offer a withdrawal button is scoped per meeting\ntype via `MeetingType.enableWithdrawalButton`, because only paid B2C\ndistance contracts carry the statutory right."
          },
          "withdrawalIntroText": {
            "type": "string",
            "nullable": true,
            "description": "Replaces the opening sentence of the public withdrawal page. Null keeps the\nbuilt-in one, which is translated into every booking language; a custom\ntext is shown as typed, in whatever language it was written, the same\ntrade-off `customLegalText` already makes.\n\nExists because the built-in sentence states the statutory 14 days as fact,\nand a trader who grants longer is then bound by a period their own page\ncontradicts. Validated against {@link findShortenedWithdrawalPeriod} so the\nescape hatch cannot be used to announce a shorter one."
          },
          "withdrawalPolicyLink": {
            "type": "string",
            "nullable": true,
            "description": "The trader's own Widerrufsbelehrung, linked under the intro text. The\nalternative to restating the terms on our page: link them where they are\nalready maintained."
          },
          "dataPolicyLink": {
            "type": "string",
            "nullable": true
          },
          "imprintLink": {
            "type": "string",
            "nullable": true
          },
          "hideEmptyWeekend": {
            "type": "boolean"
          },
          "useFormalBookingLanguage": {
            "type": "boolean"
          },
          "allowAttendeeDataDeletion": {
            "type": "boolean"
          },
          "allowNotetakerRecording": {
            "type": "boolean",
            "description": "Whether anyone in this workspace may have the notetaker record a meeting.\n\nA gate, not a default: it only ever subtracts. An admin closes it and no\nhost, meeting type or single meeting in the workspace can reopen it, which\nis what makes it usable as the compliance control it exists to be. There is\ndeliberately no \"record everything\" direction — the bot is a visible third\nparticipant recording people who never signed up for meetergo, and Germany\nis a two-party-consent country, so switching recording *on* stays a\ndecision each host makes for their own calls.\n\nDefault true because closing it is the exceptional act; the entitlement\nabove it and the host default below it both already start at \"no\"."
          },
          "preCallBriefEmailDefault": {
            "type": "boolean",
            "description": "Whether hosts here are emailed their pre-call brief unless they say\notherwise.\n\nThe workspace's answer, which a host can override either way. Default\nfalse so no existing workspace starts mailing briefs because a release\nshipped; an admin turning it on is the deliberate act that starts it."
          },
          "notetakerBotName": {
            "type": "string",
            "nullable": true,
            "description": "What the notetaker is called in the participant list, or `null` for ours.\n\nIdentity rather than configuration: the name is the notice everyone on the\ncall who never booked anything actually receives, and on a customer's own\ncall our brand names the wrong company. Null means the platform default,\nso a workspace that never thought about it still discloses something a\nparticipant can check against the list.\n\nValidated on the way in ({@link parseBotName}) rather than at dispatch: a\nname the capture backend refuses would fail minutes before the meeting,\nwith nobody watching.",
            "maxLength": 64
          },
          "metadata": {
            "$ref": "#/components/schemas/CompanyMetaData"
          },
          "customBookingCSS": {
            "type": "string"
          },
          "customConfirmationPageCSS": {
            "type": "string"
          },
          "isSoloFeaturesUnlocked": {
            "type": "boolean"
          },
          "metaPixelId": {
            "type": "string",
            "nullable": true
          },
          "tiktokPixelId": {
            "type": "string",
            "nullable": true
          },
          "usercentricsSettingsId": {
            "type": "string",
            "nullable": true,
            "description": "Usercentrics CMP Settings-ID. Presence = integration connected."
          },
          "usercentricsConfig": {
            "type": "object",
            "nullable": true,
            "description": "Options for the Usercentrics integration (validated jsonb, see parseUsercentricsConfig)."
          },
          "appointmentDeleteTimer": {
            "type": "number",
            "nullable": true,
            "description": "Time in minutes. Default 90 days"
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Form"
            }
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reminder"
            }
          },
          "meetingTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingType"
            }
          },
          "meetingTypeTemplates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingTypeTemplate"
            }
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appointment"
            }
          },
          "emailTemplates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailTemplate"
            }
          },
          "workspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workspace"
            }
          },
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Queue"
            }
          },
          "dataFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataField"
            }
          },
          "emailTemplateSelection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplateSelection"
              }
            ]
          },
          "invites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyInvite"
            }
          },
          "hubspotConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/HubspotConnection"
              }
            ]
          },
          "pipedriveConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PipedriveConnection"
              }
            ]
          },
          "closeConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CloseConnection"
              }
            ]
          },
          "centralStationCrmConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CentralStationCrmConnection"
              }
            ]
          },
          "ameiseConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AmeiseConnection"
              }
            ]
          },
          "abAgentaConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AbAgentaConnection"
              }
            ]
          },
          "salesforceConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SalesforceConnection"
              }
            ]
          },
          "slackConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SlackConnection"
              }
            ]
          },
          "intercomMessengerConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/IntercomMessengerConnection"
              }
            ]
          },
          "hubSubscription": {
            "$ref": "#/components/schemas/HubSubscription"
          },
          "crmSubscription": {
            "$ref": "#/components/schemas/CrmSubscription"
          },
          "whatsappSubscription": {
            "description": "WhatsApp add-on subscription.\nLoaded eagerly so featureAccess.whatsappAddon is always computed correctly.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappSubscription"
              }
            ]
          },
          "klickTippConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/KlicktippConnection"
              }
            ]
          },
          "smartWeCRMConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SmartWeCRMConnection"
              }
            ]
          },
          "stripeFeatureConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/StripeFeatureConnection"
              }
            ]
          },
          "paypalFeatureConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PaypalFeatureConnection"
              }
            ]
          },
          "mollieFeatureConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MollieFeatureConnection"
              }
            ]
          },
          "aircallConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AircallConnection"
              }
            ]
          },
          "reviewSettings": {
            "$ref": "#/components/schemas/ReviewSettings"
          },
          "referralSettings": {
            "nullable": true,
            "description": "Customer-facing referral program (reward ladder, explainer, destination).\n\nIts own column rather than a corner of {@link reviewSettings}: the program\nis surfaced on the review thank-you screen today, but it is not a property\nof reviews and will outlive that one placement.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReferralSettings"
              }
            ]
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            }
          },
          "provisionalBookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProvisionalBookingPayload"
            }
          },
          "voiceTrialExpiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "voiceBilling": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "packSize": {
                "type": "object"
              },
              "maxPacksPerMonth": {
                "type": "number"
              },
              "lastFailureAt": {
                "type": "string",
                "nullable": true
              },
              "lastAttemptAt": {
                "type": "string"
              },
              "pendingTopUp": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "packSize": {
                    "type": "object"
                  },
                  "invoiceId": {
                    "type": "string"
                  }
                }
              },
              "alertPeriod": {
                "type": "string"
              },
              "alerted80": {
                "type": "boolean"
              },
              "alerted100": {
                "type": "boolean"
              }
            },
            "required": [
              "pendingTopUp"
            ]
          },
          "commissionPercentage": {
            "type": "number",
            "description": "Affiliate commission percentage for the company's referral/partner\nuser program. This is about *partner users* inside a Company and\nthe Cello affiliate program — NOT the `Reseller` entity's\ncommission (which lives on `Reseller.commissionPercentage`)."
          },
          "resellerId": {
            "type": "string",
            "nullable": true,
            "description": "Reseller that provisioned this Company (e.g. Placetel). Nullable:\nCompanies registered through the regular signup flow have no\nreseller. Replaces the legacy `metadata.partner` string marker.\n\nSet during provisioning via the unified `signUpNewAdmin` flow. Used\nby the reseller dashboard to scope its queries to the reseller's\nown companies."
          },
          "reseller": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Reseller"
              }
            ]
          },
          "emailFromName": {
            "type": "string",
            "description": "Value to use as from email name.\nIf not defined, company name should be used."
          },
          "footerEmail": {
            "type": "string",
            "nullable": true,
            "description": "Contact shown in the email footer. Without these the footer falls back to\nthe company OWNER's personal contact email/phone, which leaks a person\nwhere a role address belongs (JoFinanz, 2026-08-24). Precedence in the\nrenderer: workspace override → these → owner. Null = today's behavior."
          },
          "footerPhone": {
            "type": "string",
            "nullable": true
          },
          "permissions": {
            "$ref": "#/components/schemas/PermissionSettings"
          },
          "doubleOptIn": {
            "type": "boolean",
            "description": "Double opt in feature, default disabled."
          },
          "enableCustomLegalText": {
            "type": "boolean",
            "description": "Enable/disable custom legal text"
          },
          "customLegalText": {
            "type": "string",
            "description": "Custom legal text HTML, shown above booking button if enabled"
          },
          "requireInvite": {
            "type": "boolean",
            "deprecated": true
          },
          "flag": {
            "type": "number",
            "description": "Used to flag suspicious accounts or ban. Smallint is\nused as to not expose any descriptive value.\nCurrently, only two values are used.\n`null` = Account is not flagged\n`1` = Banned. Account is banned from doing anything."
          },
          "registrationIp": {
            "type": "string",
            "nullable": true
          },
          "signupChannel": {
            "type": "string",
            "nullable": true,
            "description": "Lead-source attribution captured on the marketing site (first touch on\nmeetergo.com) and handed over at signup via the `mg_attribution` cookie.\nWritten once by POST /me/signup-complete for the admin who created the\ncompany; never overwritten. Channel is the classified bucket\n(paid_search | organic_search | ai_assistant | social | referral | …)."
          },
          "signupChannelSource": {
            "type": "string",
            "nullable": true,
            "description": "Normalized source of the first touch, e.g. \"google\", \"chatgpt\", \"linkedin\"."
          },
          "signupSource": {
            "type": "string",
            "nullable": true,
            "description": "Legacy signup-source bucket (utm_source_medium or referrer-derived)."
          },
          "signupReferrer": {
            "type": "string",
            "nullable": true,
            "description": "External referrer hostname of the first marketing-site touch."
          },
          "signupLandingPage": {
            "type": "string",
            "nullable": true,
            "description": "Landing page path of the first marketing-site touch."
          },
          "signupSourceUrl": {
            "type": "string",
            "nullable": true,
            "description": "Page the signup click happened on (source_url param)."
          },
          "signupUtmSource": {
            "type": "string",
            "nullable": true
          },
          "signupUtmMedium": {
            "type": "string",
            "nullable": true
          },
          "signupUtmCampaign": {
            "type": "string",
            "nullable": true
          },
          "signupUtmTerm": {
            "type": "string",
            "nullable": true
          },
          "signupUtmContent": {
            "type": "string",
            "nullable": true
          },
          "signupFirstTouchAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the lead first touched the marketing site."
          },
          "finishedOnboarding": {
            "type": "boolean",
            "description": "Determines whether company has completed onboarding"
          },
          "requireHostConfirmation": {
            "type": "boolean",
            "description": "Require host confirmation feature, default disabled.\nWhen enabled, hosts need to confirm before the appointment is created."
          },
          "provisionalBookingExpiryHours": {
            "type": "number",
            "description": "Expiry time for provisional bookings in hours.\nIf null, uses the default of 72 hours."
          },
          "enableNextBooking": {
            "type": "boolean",
            "deprecated": true
          },
          "enableCookieBanner": {
            "type": "boolean"
          },
          "useDedicatedIP": {
            "type": "boolean",
            "description": "Enable dedicated IP support for Exchange connections.\nWhen true, Exchange traffic will be routed through a proxy\nto ensure all requests come from a single determined IP.\n@todo store the actual proxy credentials to be able to support\ndifferent proxies per client."
          },
          "useCustomSmtpDedicatedIP": {
            "type": "boolean",
            "description": "Enable dedicated IP support for Custom SMTP connections.\nWhen true, Custom SMTP traffic will be routed through a proxy\nto ensure all emails originate from the configured dedicated IP.\nThis applies to all SMTP configurations for this company.\nProxy is used during both verification and email sending."
          },
          "sallyEnabled": {
            "type": "boolean",
            "description": "When enabled, invite@sally.io is automatically added to online meetings\nas an attendee for AI meeting transcription."
          },
          "defaultDomainEntity": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomDomain"
              }
            ]
          },
          "defaultDomain": {
            "type": "string"
          },
          "jitsiCustomDomain": {
            "type": "string",
            "nullable": true,
            "description": "Custom domain for Jitsi Meet video conferencing (e.g., 'meet.example.com')\nWhen set, Jitsi rooms will use this domain instead of the default meet.jit.si\nFormat: https://{customDomain}/{roomId}"
          },
          "lowStorageNotifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When low storage notification was last sent (null = not sent).\nUsed to prevent duplicate notifications."
          },
          "crmSettings": {
            "type": "object",
            "nullable": true,
            "description": "Per-company CRM configuration that is too small to deserve its own table:\ntoday the lost-reason list and whether one is mandatory.\n\nUnset means \"never configured\" and resolves to the built-in reasons, so\nevery existing account keeps the list it already had."
          }
        },
        "required": [
          "name",
          "slug",
          "description",
          "language",
          "timezone",
          "tier",
          "subscriptionStatus",
          "users",
          "type",
          "primaryColor",
          "useBrandStyling",
          "hideMeetergoBranding",
          "enforceBusinessCardTheme",
          "googleActionsCenterEnabled",
          "featureAccess",
          "detectedCurrency",
          "effectiveCurrency",
          "useNoReplyAddress",
          "sendEmailsAsPlainText",
          "outlookConnectionRequirementScopes",
          "outlookConnectionRequirementTypes",
          "storageUsedBytes",
          "id",
          "createdAt",
          "updatedAt",
          "owner",
          "prorationBehaviorCreateProration",
          "requireMfa",
          "billingAddress",
          "lifetimePremium",
          "onboardingTrialExtendedAt",
          "showTrialOverModal",
          "maxUsers",
          "maxPartners",
          "showDataPolicyLink",
          "hideDataPolicyCheckbox",
          "enableWithdrawalFunction",
          "withdrawalIntroText",
          "withdrawalPolicyLink",
          "dataPolicyLink",
          "imprintLink",
          "hideEmptyWeekend",
          "useFormalBookingLanguage",
          "allowAttendeeDataDeletion",
          "allowNotetakerRecording",
          "preCallBriefEmailDefault",
          "customBookingCSS",
          "customConfirmationPageCSS",
          "isSoloFeaturesUnlocked",
          "appointmentDeleteTimer",
          "voiceTrialExpiresAt",
          "voiceBilling",
          "commissionPercentage",
          "footerEmail",
          "footerPhone",
          "permissions",
          "doubleOptIn",
          "enableCustomLegalText",
          "requireInvite",
          "finishedOnboarding",
          "requireHostConfirmation",
          "enableNextBooking",
          "enableCookieBanner",
          "useDedicatedIP",
          "useCustomSmtpDedicatedIP",
          "sallyEnabled"
        ]
      },
      "PipelineStage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "isWon": {
            "type": "boolean"
          },
          "isLost": {
            "type": "boolean"
          },
          "winProbability": {
            "type": "number"
          },
          "rottingDays": {
            "type": "number"
          },
          "requiredCustomFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "salesMilestone": {
            "type": "string",
            "nullable": true,
            "description": "What entering this stage means for the Sales Learning report, or null for\na stage that means nothing to it.\n\nOn the stage rather than in company settings because the answer is\nper-pipeline: an outbound pipeline's demo stage and a partner pipeline's\nare different rows, and a company running both needs both stamped. Null on\nevery existing stage, which is the pre-feature behaviour exactly — the\ndates stay manual until somebody says which stage is which.",
            "enum": [
              "start",
              "demo",
              "offer"
            ]
          },
          "pipeline": {
            "$ref": "#/components/schemas/Pipeline"
          },
          "pipelineId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "order",
          "isWon",
          "isLost",
          "winProbability",
          "pipeline",
          "pipelineId"
        ]
      },
      "Pipeline": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "isDefault": {
            "type": "boolean"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PipelineStage"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "position",
          "isDefault",
          "company",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "Reminder": {
        "type": "object",
        "properties": {
          "meetingTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingType"
            }
          },
          "meetingTypeTemplates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingTypeTemplate"
            }
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Form"
            }
          },
          "pipelines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Pipeline"
            }
          },
          "workspace": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Workspace"
              }
            ]
          },
          "scheduledReminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledReminder"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "scope": {
            "type": "object"
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderTrigger"
            }
          },
          "companyId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "userId": {
            "type": "string",
            "description": "Maybe shouldnt be nullable"
          }
        },
        "required": [
          "createdAt",
          "updatedAt",
          "id",
          "name",
          "enabled",
          "scope",
          "triggers",
          "companyId"
        ]
      },
      "HostBookingFrequency": {
        "type": "object",
        "properties": {
          "perDay": {
            "type": "number",
            "description": "Maximum bookings allowed per day"
          },
          "perWeek": {
            "type": "number",
            "description": "Maximum bookings allowed per week"
          },
          "perMonth": {
            "type": "number",
            "description": "Maximum bookings allowed per month"
          },
          "perYear": {
            "type": "number",
            "description": "Maximum bookings allowed per year"
          }
        }
      },
      "BookingTimeFormat": {
        "type": "string",
        "enum": [
          "12",
          "24"
        ]
      },
      "IcsInfo": {
        "type": "object",
        "properties": {
          "title": {
            "$ref": "#/components/schemas/LocalisedContent"
          },
          "description": {
            "$ref": "#/components/schemas/LocalisedContent"
          },
          "location": {
            "$ref": "#/components/schemas/LocalisedContent"
          },
          "requireGuestConfirmation": {
            "type": "boolean"
          }
        },
        "required": [
          "title",
          "description",
          "location"
        ]
      },
      "DaysIntoFutureSetting": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "bookingLimit": {
            "type": "number"
          },
          "countMode": {
            "type": "string"
          },
          "rangeMin": {
            "format": "date-time",
            "type": "string"
          },
          "rangeMax": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "mode"
        ]
      },
      "MeetingTypeCommunicationTemplateStatus": {
        "type": "string",
        "enum": [
          "useCompanyTemplate",
          "useMeetingTypeTemplate",
          "disabled"
        ],
        "description": "@todo migrate to boolean, only disabled does something"
      },
      "MeetingTypeNotificationConfig": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "timing": {
            "type": "number"
          },
          "content": {
            "$ref": "#/components/schemas/EmailTemplateContent"
          },
          "attachmentConfig": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "library",
                    "form_field"
                  ]
                },
                "fileAssetId": {
                  "type": "string",
                  "nullable": true
                },
                "dataFieldName": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          }
        },
        "required": [
          "enable",
          "timing",
          "content"
        ]
      },
      "CommunicationSettings": {
        "type": "object",
        "properties": {
          "attendeeMeetingConfirmationStatus": {
            "description": "@todo migrate to boolean, only disabled does something",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "attendeeMeetingConfirmation": {
            "nullable": true,
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "hostMeetingConfirmationStatus": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "hostMeetingConfirmation": {
            "nullable": true,
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "attendeeMeetingCancelledStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "attendeeMeetingCancelled": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "hostMeetingCancelledStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "hostMeetingCancelled": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "attendeeMeetingRescheduledStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "attendeeMeetingRescheduled": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "hostMeetingRescheduledStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "hostMeetingRescheduled": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "bringalongMeetingConfirmationStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "bringalongMeetingConfirmation": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "hostMeetingReassignedStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "hostMeetingReassigned": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "attendeeMeetingHostChangedStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "attendeeMeetingHostChanged": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "attendeeMeetingCancelRequestStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "attendeeMeetingCancelRequest": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "attendeeMeetingRescheduleRequestStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeCommunicationTemplateStatus"
              }
            ]
          },
          "attendeeMeetingRescheduleRequest": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "confirmationAttachmentConfig": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "library",
                    "form_field"
                  ]
                },
                "fileAssetId": {
                  "type": "string",
                  "nullable": true
                },
                "dataFieldName": {
                  "type": "string",
                  "nullable": true
                },
                "filename": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "reminderTemplate": {
            "nullable": true,
            "description": "Optional saved company email template used as the reminder body for this\nmeeting type, mirroring the \"Use a saved template\" option that\nconfirmation/cancellation already offer.\n\nNULL for every pre-existing row (the column is added nullable, no backfill).\nWhen NULL the send path resolves the reminder exactly as before — inline\n`reminder.content`, then the built-in default. Only an explicit user pick\nlinks a template here and diverts the body. See `resolveReminderContent`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailTemplate"
              }
            ]
          },
          "reminderRecipient": {
            "enum": [
              "guest-all",
              "host-all",
              "everyone",
              "company-user",
              "custom-email",
              "booked-by",
              "form-recipient",
              "form-sender",
              "deal-owner",
              "deal-primary-contact",
              "deal-contacts",
              "lead-contact"
            ],
            "type": "string"
          },
          "followupRecipient": {
            "enum": [
              "guest-all",
              "host-all",
              "everyone",
              "company-user",
              "custom-email",
              "booked-by",
              "form-recipient",
              "form-sender",
              "deal-owner",
              "deal-primary-contact",
              "deal-contacts",
              "lead-contact"
            ],
            "type": "string"
          },
          "id": {
            "type": "number"
          },
          "meetingType": {
            "$ref": "#/components/schemas/MeetingType"
          },
          "meetingTypeTemplate": {
            "$ref": "#/components/schemas/MeetingTypeTemplate"
          },
          "confirmation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailTemplateContent"
            }
          },
          "reminder": {
            "$ref": "#/components/schemas/MeetingTypeNotificationConfig"
          },
          "followup": {
            "$ref": "#/components/schemas/MeetingTypeNotificationConfig"
          },
          "sms": {
            "$ref": "#/components/schemas/MeetingTypeNotificationConfig"
          }
        },
        "required": [
          "attendeeMeetingConfirmationStatus",
          "attendeeMeetingConfirmation",
          "hostMeetingConfirmationStatus",
          "hostMeetingConfirmation",
          "attendeeMeetingCancelledStatus",
          "attendeeMeetingCancelled",
          "hostMeetingCancelledStatus",
          "hostMeetingCancelled",
          "attendeeMeetingRescheduledStatus",
          "attendeeMeetingRescheduled",
          "hostMeetingRescheduledStatus",
          "hostMeetingRescheduled",
          "bringalongMeetingConfirmationStatus",
          "bringalongMeetingConfirmation",
          "hostMeetingReassignedStatus",
          "hostMeetingReassigned",
          "attendeeMeetingHostChangedStatus",
          "attendeeMeetingHostChanged",
          "attendeeMeetingCancelRequestStatus",
          "attendeeMeetingCancelRequest",
          "attendeeMeetingRescheduleRequestStatus",
          "attendeeMeetingRescheduleRequest",
          "reminderTemplate",
          "reminderRecipient",
          "followupRecipient",
          "id",
          "confirmation",
          "reminder",
          "followup",
          "sms"
        ]
      },
      "WebinarSettings": {
        "type": "object",
        "properties": {
          "accessPolicy": {
            "type": "string",
            "enum": [
              "registered-only",
              "public-link"
            ]
          },
          "attendeeMicrophone": {
            "type": "boolean"
          },
          "attendeeCamera": {
            "type": "boolean"
          },
          "attendeeScreenShare": {
            "type": "boolean"
          },
          "attendeeChat": {
            "type": "boolean"
          },
          "handRaising": {
            "type": "boolean"
          },
          "attendeeListVisible": {
            "type": "boolean"
          },
          "autoAdmit": {
            "type": "boolean"
          },
          "qaEnabled": {
            "type": "boolean"
          },
          "qaRequiresApproval": {
            "type": "boolean"
          },
          "qaUpvotes": {
            "type": "boolean"
          },
          "capacity": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "accessPolicy",
          "attendeeMicrophone",
          "attendeeCamera",
          "attendeeScreenShare",
          "attendeeChat",
          "handRaising",
          "attendeeListVisible",
          "autoAdmit",
          "qaEnabled",
          "qaRequiresApproval",
          "qaUpvotes"
        ]
      },
      "LanguageSetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "default": {
            "type": "string"
          },
          "allowed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enable",
          "default",
          "allowed"
        ]
      },
      "CustomTextSelectChannelSetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "enable",
          "body"
        ]
      },
      "TimezonePresetSetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "timezonePreset": {
            "type": "string"
          }
        },
        "required": [
          "enable"
        ]
      },
      "MeetingPaymentInfo": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "paymentTerms": {
            "type": "string"
          },
          "suffix": {
            "type": "string"
          },
          "provider": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentProvider"
              }
            ]
          },
          "providers": {
            "type": "array",
            "description": "Enabled payment providers. When set, takes precedence over provider.",
            "items": {
              "type": "string",
              "enum": [
                "paypal",
                "stripe",
                "mollie",
                "none"
              ]
            }
          },
          "collectBillingDetails": {
            "type": "boolean"
          },
          "autoInvoice": {
            "type": "boolean"
          },
          "invoiceOnlinePayment": {
            "type": "boolean"
          },
          "invoiceTaxExempt": {
            "type": "boolean"
          },
          "durationPrices": {
            "type": "object",
            "description": "Price per duration in minutes",
            "example": {
              "30": 50,
              "60": 90,
              "90": 120
            }
          }
        },
        "required": [
          "enable"
        ]
      },
      "VideoSetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "immersive": {
            "type": "boolean"
          },
          "src": {
            "type": "string"
          },
          "thumbnailUrl": {
            "type": "string"
          }
        },
        "required": [
          "enable",
          "immersive"
        ]
      },
      "CancellationPolicySetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "mode": {
            "type": "string",
            "enum": [
              "disabled",
              "hours",
              "days"
            ]
          },
          "duration": {
            "type": "object"
          }
        },
        "required": [
          "enable"
        ]
      },
      "ReschedulingPolicySetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "mode": {
            "type": "string",
            "enum": [
              "disabled",
              "hours",
              "days"
            ]
          },
          "duration": {
            "type": "object"
          }
        },
        "required": [
          "enable"
        ]
      },
      "RecurringSetting": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "mode": {
            "type": "string",
            "enum": [
              "recurring",
              "multi_slot"
            ]
          },
          "frequency": {
            "type": "string",
            "enum": [
              "weekly",
              "biweekly",
              "monthly"
            ]
          },
          "maxOccurrences": {
            "type": "number"
          },
          "minOccurrences": {
            "type": "number"
          },
          "maxSlots": {
            "type": "number"
          },
          "minSlots": {
            "type": "number"
          }
        },
        "required": [
          "enable"
        ]
      },
      "MeetingTypeTemplate": {
        "type": "object",
        "properties": {
          "meetingInfo": {
            "description": "Common information for Meeting types and appointments",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "meetingOptions": {
            "description": "Options for Meeting Type",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingOptions"
              }
            ]
          },
          "timeslotInterval": {
            "type": "number"
          },
          "spots": {
            "type": "number"
          },
          "bookingMinimum": {
            "type": "number",
            "description": "Time in minutes. Default 30 mins"
          },
          "schedule": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/WeeklySchedule"
              }
            ]
          },
          "hideAddressField": {
            "type": "boolean",
            "description": "Hide address field for LOCAL_ATTENDEE channel type"
          },
          "form": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Form"
              }
            ]
          },
          "availability": {
            "$ref": "#/components/schemas/Availability"
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reminder"
            }
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bookingFrequencies": {
            "description": "@todo this doesn't need to be OneToMany and maybe not even a relation (unless different frequencies per user for a queue are needed)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HostBookingFrequency"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "connectGuestJoinMinutesBeforeStart": {
            "type": "number",
            "nullable": true,
            "description": "Guest may enter this many minutes before a scheduled Connect call.",
            "minimum": 0,
            "maximum": 525600
          },
          "connectGuestJoinMinutesAfterEnd": {
            "type": "number",
            "nullable": true,
            "description": "Guest may enter until this many minutes after a scheduled Connect call.",
            "minimum": 0,
            "maximum": 525600
          },
          "timeFormat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingTimeFormat"
              }
            ]
          },
          "useHostAvailability": {
            "type": "boolean"
          },
          "meetingTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingType"
            }
          },
          "id": {
            "type": "string"
          },
          "crmOptions": {
            "$ref": "#/components/schemas/MeetingCRMOptions"
          },
          "ics": {
            "$ref": "#/components/schemas/IcsInfo"
          },
          "daysIntoFuture": {
            "$ref": "#/components/schemas/DaysIntoFutureSetting"
          },
          "enableCalendarInviteNotification": {
            "type": "boolean",
            "description": "New notification setting - use calendar invites instead\nof email notifications. When this option is enabled,\nbooking confirmation notification and cancellation notification\nare handled by calendar connection.\nA google/outlook connection is required. It will be used\nto create calendar invite with notification.\nAll meeting types pre-migration use email notifications.\nIntroduced in order to mitigate duplicate invites, cancellation\nhandling in calendar and overall improve both host and attendee\nexperience."
          },
          "useSchedule": {
            "type": "boolean",
            "description": "Override individual host's availability\nIf true, availability selected for that meeting type will be used\nas common availability for all hosts.\nMove to meetingOptions?"
          },
          "useCompanyLogo": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "useTeamLogo": {
            "type": "boolean",
            "description": "Show team logo instead of company logo (for queue/round-robin meeting types)"
          },
          "useCustomInvite": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "disableActionButtons": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "showConfetti": {
            "type": "boolean",
            "description": "Whether to show confetti animation on the confirmation page"
          },
          "enableWithdrawalButton": {
            "type": "boolean",
            "description": "Show the EU/German withdrawal button on the booking confirmation page (§ 356a BGB, from 19.06.2026)"
          },
          "useCustomForm": {
            "type": "boolean"
          },
          "formId": {
            "type": "string"
          },
          "inCompanyPage": {
            "type": "boolean",
            "deprecated": true
          },
          "formFirst": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "communicationSettings": {
            "$ref": "#/components/schemas/CommunicationSettings"
          },
          "communicationSettingsId": {
            "type": "number",
            "nullable": true
          },
          "availabilityId": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "description": "Not null"
          },
          "reminderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdBy": {
            "description": "User who originally created the meeting type.\nUsers can create meeting type for others.",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "createdById": {
            "type": "string"
          },
          "compact": {
            "type": "boolean"
          },
          "disableTeamsEmail": {
            "type": "boolean",
            "description": "If enabled, booking confirmation email won't be sent for Microsoft Teams meeting"
          },
          "calendarGuestListVisible": {
            "type": "boolean",
            "description": "Whether guests on the synced calendar event can see each other. Off by\ndefault so strangers on a group booking never see each other's address;\non for teams that invite colleagues and known contacts who expect a\nnormal shared invite. Only Google honours it; Outlook has no such flag."
          },
          "enableWaitlist": {
            "type": "boolean"
          },
          "runAsWebinar": {
            "type": "boolean",
            "description": "Run bookings of this meeting type as a Connect webinar. Stamped onto\nmembers' meeting types like every other shared setting — a setting that\nlived only on MeetingType would silently drop when a template is applied."
          },
          "webinarDefaults": {
            "nullable": true,
            "description": "Default webinar policy, stamped onto members' meeting types.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WebinarSettings"
              }
            ]
          },
          "notetakerRecording": {
            "type": "string",
            "nullable": true,
            "description": "Whether the notetaker joins bookings of members' meeting types. Null lets\neach host's own default decide. Stamped like every other shared setting.",
            "enum": [
              "on",
              "off"
            ]
          },
          "languageSetting": {
            "description": "Languages to be used for booking page and notifications.\nDefaults to '[]', to default to our current default behavious\n(all languages active).",
            "allOf": [
              {
                "$ref": "#/components/schemas/LanguageSetting"
              }
            ]
          },
          "customTextSelectChannel": {
            "description": "If null, default channel selection text is shown.\nAllows customizing the text \"Where do you want the meeting to take place?\"",
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomTextSelectChannelSetting"
              }
            ]
          },
          "timezonePreset": {
            "$ref": "#/components/schemas/TimezonePresetSetting"
          },
          "cssSetting": {
            "$ref": "#/components/schemas/CssSetting"
          },
          "meetingPaymentInfo": {
            "$ref": "#/components/schemas/MeetingPaymentInfo"
          },
          "videoSetting": {
            "$ref": "#/components/schemas/VideoSetting"
          },
          "cancellationPolicy": {
            "$ref": "#/components/schemas/CancellationPolicySetting"
          },
          "reschedulingPolicy": {
            "$ref": "#/components/schemas/ReschedulingPolicySetting"
          },
          "recurringSetting": {
            "$ref": "#/components/schemas/RecurringSetting"
          },
          "templateType": {
            "type": "string",
            "enum": [
              "individual",
              "team"
            ]
          },
          "queueType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "simpleRoundRobin",
              "advancedRoundRobin",
              "equalDistribution"
            ]
          },
          "assignedToCount": {
            "type": "number",
            "description": "number of meetings assigned to this template"
          },
          "lockedFields": {
            "description": "Field keys locked by the admin. Users cannot modify the\ncorresponding settings on meeting types created from this template.\nCopied to meeting types on assign and push.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string",
            "nullable": true,
            "description": "Optional canonical URL slug. When set, this is the source of truth for\nthe URL of meeting types created from (or synced from) this template:\n  - Used as the base slug on `assignHost` / `assignWorkspace`.\n  - Propagated to assigned meeting types on push.\nWhen NULL, slugs behave exactly as before: derived from the template\nname on assign, never touched on push. Per-user uniqueness still\napplies via `getAvailableMeetingTypeSlug`."
          },
          "resourceChannels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceChannel"
            }
          }
        },
        "required": [
          "meetingInfo",
          "meetingOptions",
          "timeslotInterval",
          "spots",
          "bookingMinimum",
          "schedule",
          "hideAddressField",
          "locations",
          "createdAt",
          "updatedAt",
          "timeFormat",
          "useHostAvailability",
          "id",
          "crmOptions",
          "ics",
          "daysIntoFuture",
          "enableCalendarInviteNotification",
          "useSchedule",
          "useCompanyLogo",
          "useTeamLogo",
          "useCustomInvite",
          "disableActionButtons",
          "showConfetti",
          "enableWithdrawalButton",
          "useCustomForm",
          "inCompanyPage",
          "formFirst",
          "communicationSettingsId",
          "companyId",
          "reminderIds",
          "createdById",
          "compact",
          "disableTeamsEmail",
          "calendarGuestListVisible",
          "enableWaitlist",
          "runAsWebinar",
          "webinarDefaults",
          "notetakerRecording",
          "languageSetting",
          "customTextSelectChannel",
          "timezonePreset",
          "cssSetting",
          "meetingPaymentInfo",
          "videoSetting",
          "cancellationPolicy",
          "reschedulingPolicy",
          "recurringSetting",
          "templateType",
          "lockedFields"
        ]
      },
      "FormStandaloneKind": {
        "type": "string",
        "enum": [
          "routing",
          "selection",
          "locationFinder"
        ],
        "description": "Explicit discriminator for standalone public experiences. Null preserves\nthe legacy relation-based classification during the mixed-version rollout."
      },
      "FormThemeDecoration": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "none",
              "bubbles",
              "dots",
              "grid",
              "waves",
              "mesh"
            ]
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "opacity": {
            "type": "number"
          }
        }
      },
      "FormThemeBackground": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "color",
              "gradient",
              "image"
            ]
          },
          "value": {
            "type": "string"
          },
          "brightness": {
            "type": "number"
          },
          "decoration": {
            "$ref": "#/components/schemas/FormThemeDecoration"
          }
        }
      },
      "FormThemeFont": {
        "type": "object",
        "properties": {
          "family": {
            "type": "string"
          },
          "size": {
            "type": "string",
            "enum": [
              "sm",
              "md",
              "lg"
            ]
          }
        }
      },
      "FormThemeProgressBar": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "primaryColor": {
            "type": "string"
          },
          "pageSteps": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "FormThemeFooterLink": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "FormThemeFooter": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "subtext": {
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormThemeFooterLink"
            }
          }
        }
      },
      "FormThemeLabel": {
        "type": "object",
        "properties": {
          "size": {
            "type": "string",
            "enum": [
              "sm",
              "md",
              "lg"
            ]
          },
          "align": {
            "type": "string",
            "enum": [
              "left",
              "center"
            ]
          },
          "color": {
            "type": "string"
          }
        }
      },
      "FormTheme": {
        "type": "object",
        "properties": {
          "preset": {
            "type": "string",
            "enum": [
              "light",
              "dark",
              "eco",
              "charcoal",
              "bold",
              "custom"
            ]
          },
          "accent": {
            "type": "string"
          },
          "textColor": {
            "type": "string"
          },
          "surfaceColor": {
            "type": "string"
          },
          "inputColor": {
            "type": "string"
          },
          "borderColor": {
            "type": "string"
          },
          "background": {
            "$ref": "#/components/schemas/FormThemeBackground"
          },
          "font": {
            "$ref": "#/components/schemas/FormThemeFont"
          },
          "progressBar": {
            "$ref": "#/components/schemas/FormThemeProgressBar"
          },
          "footer": {
            "$ref": "#/components/schemas/FormThemeFooter"
          },
          "buttonRadius": {
            "type": "number"
          },
          "inputRadius": {
            "type": "number"
          },
          "buttonStyle": {
            "type": "string",
            "enum": [
              "solid",
              "outline",
              "soft"
            ]
          },
          "label": {
            "$ref": "#/components/schemas/FormThemeLabel"
          },
          "formWidth": {
            "type": "string",
            "enum": [
              "narrow",
              "normal",
              "wide"
            ]
          },
          "formLayout": {
            "type": "string",
            "enum": [
              "card",
              "classic"
            ]
          },
          "logoUrl": {
            "type": "string"
          },
          "multiColumn": {
            "type": "boolean"
          },
          "customCss": {
            "type": "string"
          },
          "themeId": {
            "type": "string"
          }
        }
      },
      "FormStructureType": {
        "type": "string",
        "enum": [
          "FORM_ONLY",
          "FUNNEL_WITH_FORM",
          "FUNNEL_ONLY"
        ],
        "description": "slug used in routing form only."
      },
      "PrefillLock": {
        "type": "object",
        "properties": {
          "editable": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "editable"
        ]
      },
      "SalesforceAccountMatch": {
        "type": "object",
        "properties": {
          "accountField": {
            "type": "string"
          },
          "formField": {
            "type": "string"
          }
        },
        "required": [
          "accountField",
          "formField"
        ]
      },
      "MarketplaceStatus": {
        "type": "string",
        "enum": [
          "none",
          "pending",
          "approved",
          "rejected"
        ],
        "description": "Marketplace lifecycle. Only `approved` forms appear in the public read\nAPI and the in-app gallery. See {@link MarketplaceStatus}."
      },
      "Form": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "title": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Title to be displayed in booking in multiple languages. Key is Language Code, Value is title in specified locale."
          },
          "actionButtonText": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Button text to be displayed in booking in multiple languages. Key is Language Code, Value is title in specified locale."
          },
          "blockedEmails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormField"
            }
          },
          "funnelSteps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FunnelStep"
            }
          },
          "default": {
            "type": "boolean",
            "description": "Indicates default form that can be modified, but should not be deleted"
          },
          "funnelConditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FunnelQualifier"
            }
          },
          "useFullName": {
            "type": "boolean"
          },
          "skipForm": {
            "type": "boolean"
          },
          "showProgressBar": {
            "type": "boolean"
          },
          "useMeetingTypeSelection": {
            "type": "boolean"
          },
          "selectMeetingTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingType"
            }
          },
          "selectMeetingTypeOrder": {
            "description": "Stores the order of meeting types for selection pages.\nIf empty/null, use default order from selectMeetingTypeIds.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "selectionPageLayout": {
            "default": "showcase",
            "allOf": [
              {
                "$ref": "#/components/schemas/SelectionPageLayout"
              }
            ]
          },
          "selectionPageDescription": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Intro text shown under the selection page title, per language code."
          },
          "selectionPageSocialLinks": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Social and contact links shown on the selection page."
          },
          "meetingType": {
            "$ref": "#/components/schemas/MeetingType"
          },
          "meetingTypeTemplate": {
            "$ref": "#/components/schemas/MeetingTypeTemplate"
          },
          "standaloneKind": {
            "nullable": true,
            "description": "Explicit discriminator for standalone public experiences. Null preserves\nthe legacy relation-based classification during the mixed-version rollout.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FormStandaloneKind"
              }
            ]
          },
          "qualifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Qualifier"
            }
          },
          "workspace": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Workspace"
              }
            ]
          },
          "formTheme": {
            "nullable": true,
            "description": "Form-scoped theme (Fillout-style). Decoupled from CssSetting so a form\ncan carry its own visual identity without touching shared meeting-type\nstyling. Nullable: falls back to company branding when absent.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FormTheme"
              }
            ]
          },
          "structureType": {
            "description": "slug used in routing form only.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FormStructureType"
              }
            ]
          },
          "sendRoutingFormSubmissionNotification": {
            "type": "boolean"
          },
          "notificationUserId": {
            "type": "string",
            "nullable": true
          },
          "notificationEmail": {
            "type": "string",
            "nullable": true
          },
          "contactTags": {
            "description": "Tags written onto the contact a submission creates or updates. Additive:\na submission never removes a tag. This is where a newsletter audience\ngrows by itself, and where a sequence trigger gets its tag from\n(`functions/contact-tags.ts`, configured in the Newsletter app).",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "marketingConsentDoubleOptIn": {
            "type": "boolean",
            "description": "Whether a ticked marketing-consent field is only recorded after the\ncontact confirms it from their inbox. Off: the tick itself is the\nconsent. On: the submission sends a confirmation mail and the ledger row\nis written when its link is used (`FormMarketingConsentService`)."
          },
          "redirectAfterSubmission": {
            "type": "boolean"
          },
          "redirectUrl": {
            "type": "string",
            "nullable": true
          },
          "allowSaveAndReturn": {
            "type": "boolean"
          },
          "prefillLock": {
            "nullable": true,
            "description": "Null (the default, and what every form had before this column existed)\nmeans recipients may edit everything. Non-null means values arriving\npre-filled from a recipient link are shown locked, except the field names\nlisted in `editable`. See {@link PrefillLock}.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PrefillLock"
              }
            ]
          },
          "salesforceAccountMatch": {
            "nullable": true,
            "description": "Match the submitter's company in Salesforce by an Account field instead\nof matching the person by email. Null (the default) keeps the email\nmatch every form used before this column existed.\n\nForm-level rather than per-rule: it describes how a submission is\nidentified, which cannot differ between two rules of the same form.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SalesforceAccountMatch"
              }
            ]
          },
          "showCompanyLogo": {
            "type": "boolean"
          },
          "webhookUrl": {
            "type": "string",
            "nullable": true
          },
          "cssWorkspaceId": {
            "type": "string",
            "nullable": true,
            "description": "Which workspace's CSS to use when cssSetting.mode is Company.\nIf null, falls back to the form's own workspace, then company CSS."
          },
          "hasPassword": {
            "type": "boolean",
            "readOnly": true
          },
          "submissionDeadline": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "maxSubmissions": {
            "type": "number",
            "nullable": true
          },
          "defaultRecipientExpiryDays": {
            "type": "number",
            "nullable": true
          },
          "allowRecipientResubmission": {
            "type": "boolean",
            "description": "Whether a personal recipient link may be submitted more than once.\n\nFalse (the default) is the survey/one-response-per-person shape: the second\nsubmission through the same link is refused. True is the shape where a form\ncarries several outcomes a recipient reaches on separate visits (book a\ncall now, sign the contract later), so the answers may come again.\n\nThis governs ANSWERS only. The outcomes the platform itself owns stay\nonce-per-recipient either way: a signature cannot be collected twice\n(`assertSignatureNotCollected`) and an active booking is not made twice\n(`assertNoActiveRecipientBooking`). Those are properties of the outcome,\nnot preferences of the form."
          },
          "publishedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "requiresPublish": {
            "type": "boolean",
            "description": "New v2-created forms set this true: the form is not publicly visible\nuntil its first publish. Existing forms stay false (grandfathered: the\nlive entities keep serving until the owner first publishes)."
          },
          "allowCopy": {
            "type": "boolean",
            "description": "Opt-in gate for copying this form's structure. Default false: a public\nlink does NOT make a form copyable. Owner must turn this on (or publish\nto the marketplace, which implies consent). Enforced in the import path\nand the marketplace \"use template\" path. Stops the one-click clone; it\ncannot stop someone manually recreating fields off the public page."
          },
          "marketplaceStatus": {
            "description": "Marketplace lifecycle. Only `approved` forms appear in the public read\nAPI and the in-app gallery. See {@link MarketplaceStatus}.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MarketplaceStatus"
              }
            ]
          },
          "marketplaceOfficial": {
            "type": "boolean",
            "description": "\"by meetergo\" curated form. Operator-set. Controls badge + sort order."
          },
          "marketplaceCategory": {
            "type": "string",
            "nullable": true,
            "description": "Category slug for marketplace filtering (e.g. \"lead-gen\", \"recruiting\")."
          },
          "marketplaceDescription": {
            "type": "string",
            "nullable": true,
            "description": "Public listing description used for the gallery card and SEO copy."
          },
          "marketplaceListedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the form was first approved/listed in the marketplace."
          },
          "marketplaceUseCount": {
            "type": "number",
            "description": "How many times this form has been copied from the marketplace."
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reminder"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "blockEmails": {
            "type": "boolean"
          },
          "fieldIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "funnelStepIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disableModalInEmbed": {
            "type": "boolean"
          },
          "language": {
            "type": "string",
            "nullable": true,
            "description": "Language of the public form's own wording (buttons, placeholders, date\npickers). Null follows the company language, which is what every form\ndid before this column; set it when a form's questions are in another\nlanguage, as a PDF import in German for an English account."
          },
          "selectMeetingTypeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meetingTypeId": {
            "type": "string"
          },
          "meetingTypeTemplateId": {
            "type": "string"
          },
          "locationFinderId": {
            "type": "string",
            "nullable": true
          },
          "locationFinderVersionId": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "string",
            "description": "Shouldn't be nullable?"
          },
          "qualifierIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workspaceId": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string"
          },
          "crmOptions": {
            "$ref": "#/components/schemas/MeetingCRMOptions"
          },
          "cssSetting": {
            "description": "Only has an effect for a funnel with slides",
            "allOf": [
              {
                "$ref": "#/components/schemas/CssSetting"
              }
            ]
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "title",
          "actionButtonText",
          "blockedEmails",
          "fields",
          "funnelSteps",
          "default",
          "funnelConditions",
          "useFullName",
          "skipForm",
          "useMeetingTypeSelection",
          "selectMeetingTypes",
          "selectionPageLayout",
          "selectionPageDescription",
          "selectionPageSocialLinks",
          "structureType",
          "sendRoutingFormSubmissionNotification",
          "contactTags",
          "marketingConsentDoubleOptIn",
          "redirectAfterSubmission",
          "allowSaveAndReturn",
          "showCompanyLogo",
          "hasPassword",
          "requiresPublish",
          "allowCopy",
          "marketplaceStatus",
          "marketplaceOfficial",
          "marketplaceUseCount",
          "createdAt",
          "updatedAt",
          "blockEmails",
          "fieldIds",
          "funnelStepIds",
          "disableModalInEmbed",
          "selectMeetingTypeIds",
          "locationFinderId",
          "locationFinderVersionId",
          "companyId",
          "qualifierIds",
          "crmOptions",
          "cssSetting"
        ]
      },
      "BookingFrequency": {
        "type": "object",
        "properties": {
          "frequency": {
            "$ref": "#/components/schemas/HostBookingFrequency"
          },
          "userId": {
            "type": "string",
            "deprecated": true
          },
          "meetingTypeId": {
            "type": "string"
          }
        },
        "required": [
          "frequency",
          "userId",
          "meetingTypeId"
        ]
      },
      "SalesforceHostPoolSkillSetting": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "value"
        ]
      },
      "SalesforceHostPoolSetting": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string"
          },
          "accountField": {
            "type": "string"
          },
          "accountKeyField": {
            "type": "string"
          },
          "userField": {
            "type": "string"
          },
          "activeField": {
            "type": "object",
            "nullable": true
          },
          "orderByField": {
            "type": "object",
            "nullable": true
          },
          "dateField": {
            "type": "object",
            "nullable": true
          },
          "skill": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SalesforceHostPoolSkillSetting"
              }
            ]
          }
        },
        "required": [
          "object",
          "accountField",
          "accountKeyField",
          "userField"
        ]
      },
      "MetaSetting": {
        "type": "object",
        "properties": {
          "nextBetaEnabled": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "image": {
            "type": "string"
          }
        }
      },
      "MeetingType": {
        "type": "object",
        "properties": {
          "meetingInfo": {
            "description": "Common information for Meeting types and appointments. SQL columns are prefixed: `meetingInfo.name` → `\"meetingInfoName\"`, `meetingInfo.duration` → `\"meetingInfoDuration\"`. Same for all `@Column(() => X)` embeds below.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "meetingOptions": {
            "description": "Options for Meeting Type",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingOptions"
              }
            ]
          },
          "timeslotInterval": {
            "type": "number"
          },
          "spots": {
            "type": "number"
          },
          "enabled": {
            "type": "boolean"
          },
          "isHidden": {
            "type": "boolean",
            "description": "Marks meeting types that should be hidden from user-facing UIs.\nUsed for system-generated meeting types (e.g., calgent auto-bookings).\nWhen true:\n- Not shown in meeting type lists (filtered in all queries)\n- Cannot be directly edited by users via UI\n- May be managed by automated processes"
          },
          "slug": {
            "type": "string"
          },
          "bookingMinimum": {
            "type": "number",
            "description": "Time in minutes. Default 30 mins"
          },
          "roundRobin": {
            "description": "Used to store user latest booked host ids\nLast element - lastest booked host\nThere shouldn't be duplicates",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "schedule": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/WeeklySchedule"
              }
            ]
          },
          "hideAddressField": {
            "type": "boolean",
            "description": "Hide address field for LOCAL_ATTENDEE channel type"
          },
          "form": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Form"
              }
            ]
          },
          "emailQualityGuard": {
            "type": "boolean",
            "description": "Email Quality Guard - Blocks disposable emails and verifies email addresses exist\nOnly applies when formFirst is enabled (Lead Capture Mode)"
          },
          "enableWaitlist": {
            "type": "boolean"
          },
          "connectGuestJoinMinutesBeforeStart": {
            "type": "number",
            "nullable": true,
            "description": "Guest may enter this many minutes before a scheduled Connect call.",
            "minimum": 0,
            "maximum": 525600
          },
          "connectGuestJoinMinutesAfterEnd": {
            "type": "number",
            "nullable": true,
            "description": "Guest may enter until this many minutes after a scheduled Connect call.",
            "minimum": 0,
            "maximum": 525600
          },
          "runAsWebinar": {
            "type": "boolean",
            "description": "Run bookings of this meeting type as a Connect webinar (roles, view-only\nattendees, moderated Q&A, attendance reporting) instead of an ordinary\nmeeting. Only applies when `meetingInfo.channel` is CONNECT.\n\nDefault false, so every existing meeting type keeps producing ordinary\nConnect meetings."
          },
          "webinarDefaults": {
            "type": "object",
            "nullable": true,
            "description": "Default webinar policy stamped onto each booking's Connect room. Null means\nthe product defaults. Only read when `runAsWebinar` is on."
          },
          "notetakerRecording": {
            "nullable": true,
            "description": "Whether the notetaker joins bookings of this meeting type.\n\nNull means the host's own default decides — which is not the same as\n`off`, and is why this is not a boolean. Stored as `varchar` rather than a\nPostgres enum for the same reason the notetaker's other vocabularies are:\nadding a word must never need a migration that locks a table.",
            "enum": [
              "on",
              "off"
            ],
            "type": "string"
          },
          "availability": {
            "$ref": "#/components/schemas/Availability"
          },
          "tags": {
            "nullable": true,
            "description": "User-defined tags for organizing meeting types in the dashboard.\nFree-form strings, OR semantics for filtering. Mirrors the contact tags pattern.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appointment"
            }
          },
          "qualifiers": {
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Qualifier"
            }
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reminder"
            }
          },
          "formMeetingTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Form"
            }
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bookingFrequencies": {
            "description": "@todo this doesn't need to be OneToMany and maybe not even a relation (unless different frequencies per user for a queue are needed)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingFrequency"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "timeFormat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingTimeFormat"
              }
            ]
          },
          "provisionalBookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProvisionalBookingPayload"
            }
          },
          "accountOwnerMatchingEnabled": {
            "type": "boolean",
            "description": "Account-owner matching: route a round-robin booking to the user\nwho already owns the booker's account. Owner is resolved via\npast meetergo bookings + connected CRMs (Pipedrive, HubSpot,\nSalesforce). Requires `featureAccess.accountOwnerMatching` (Premium)."
          },
          "accountOwnerMatchingScope": {
            "type": "object",
            "description": "Where to draw the eligible-owner pool from. Picks one scope\nper meeting type (no inheritance).\n- `meetingType`: uses `accountOwnerMatchingUserIds` below\n- `workspace`: every active member of the meeting type's workspace\n- `company`: every active member of the meeting type's company"
          },
          "accountOwnerMatchingUserIds": {
            "description": "Eligible owners when scope is `meetingType`. Ignored otherwise.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accountOwnerMatchingAllowNonQueueHosts": {
            "type": "boolean",
            "description": "If false (default), matched owners must also be queue members\nfor the round-robin to route to them. If true, a matched pool\nuser can host even when not in the queue."
          },
          "accountOwnerMatchingFallback": {
            "type": "object",
            "description": "Behaviour when no owner matches (or matched owner has no slots).\n- `normalRoundRobin`: fall back to standard host availability\n- `showEmpty`: show no slots"
          },
          "salesforceHostPoolEnabled": {
            "type": "boolean",
            "description": "Draw the bookable hosts for this meeting type from Salesforce instead of\nfrom the statically configured queue: the booking page supplies an\naccount key, and the pool is the account's team as\n{@link salesforceHostPool} describes it.\n\nThe resolved pool is applied as a queue subset, so round-robin, fairness\nand host validation all keep working on it unchanged. Every failure —\nno connection, no match, timeout, nobody left after filtering — falls\nback to the full queue. Wrong advisor is recoverable in the CRM, a lost\nlead is not.\n\nRequires `featureAccess.salesforceRouting`."
          },
          "salesforceHostPool": {
            "nullable": true,
            "description": "The pool source. Null means unconfigured, which reads exactly like\ndisabled. See {@link SalesforceHostPoolSetting}.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SalesforceHostPoolSetting"
              }
            ]
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "description": "Internal note for organizers. Never shown to customers.\nUsed for project keys, partner info, briefing notes, etc."
          },
          "replyTo": {
            "type": "string",
            "nullable": true,
            "description": "Override the Reply-To address for notification emails sent for\nthis meeting type. When set, takes precedence over the company\n`useNoReplyAddress` flag and the default host email fallback.\nUseful for sales/support teams that want replies routed to a\nshared inbox instead of the individual host."
          },
          "enableWithdrawalButton": {
            "type": "boolean",
            "description": "Show the EU/German withdrawal button (\"Widerrufsbutton\") on the\nbooking confirmation page. Required from 19 June 2026 (§ 356a BGB)\nfor B2C distance contracts with a right of withdrawal.\n\nOff by default. Hosts must opt in per meeting type. Disable for\nleisure-services tied to a fixed date (concerts, events) which are\nexempt under § 312g Abs. 2 Nr. 9 BGB."
          },
          "id": {
            "type": "string"
          },
          "activationSessionId": {
            "type": "string",
            "nullable": true
          },
          "activationResourceKey": {
            "type": "string",
            "nullable": true
          },
          "crmOptions": {
            "$ref": "#/components/schemas/MeetingCRMOptions"
          },
          "ics": {
            "$ref": "#/components/schemas/IcsInfo"
          },
          "daysIntoFuture": {
            "$ref": "#/components/schemas/DaysIntoFutureSetting"
          },
          "enableCalendarInviteNotification": {
            "type": "boolean",
            "description": "New notification setting - use calendar invites instead\nof email notifications. When this option is enabled,\nbooking confirmation notification and cancellation notification\nare handled by calendar connection.\nA google/outlook connection is required. It will be used\nto create calendar invite with notification.\nAll meeting types pre-migration use email notifications.\nIntroduced in order to mitigate duplicate invites, cancellation\nhandling in calendar and overall improve both host and attendee\nexperience."
          },
          "useSchedule": {
            "type": "boolean",
            "description": "Override individual host's availability\nIf true, availability selected for that meeting type will be used\nas common availability for all hosts.\nMove to meetingOptions?"
          },
          "useCompanyLogo": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "useTeamLogo": {
            "type": "boolean",
            "description": "Show team logo instead of company logo (for queue/round-robin meeting types)"
          },
          "useCustomInvite": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "disableActionButtons": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "showConfetti": {
            "type": "boolean",
            "description": "Whether to show confetti animation on the confirmation page"
          },
          "useCustomForm": {
            "type": "boolean"
          },
          "formId": {
            "type": "string"
          },
          "inCompanyPage": {
            "type": "boolean",
            "deprecated": true
          },
          "formFirst": {
            "type": "boolean",
            "description": "Move to meetingOptions?"
          },
          "communicationSettings": {
            "$ref": "#/components/schemas/CommunicationSettings"
          },
          "communicationSettingsId": {
            "type": "number",
            "nullable": true
          },
          "availabilityId": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "description": "Not null"
          },
          "isFavorite": {
            "type": "boolean",
            "description": "Computed at query time per user — not persisted on the entity.\nPopulated by the list endpoint via a join with meeting_type_favorite."
          },
          "queue": {
            "$ref": "#/components/schemas/Queue"
          },
          "queueId": {
            "type": "string",
            "description": "Not real value as queue is owner"
          },
          "oldQueues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Queue"
            }
          },
          "reminderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workspace": {
            "nullable": true,
            "description": "Workspace the meeting type is part of. If undefined,\nmeeting type is not part of any workspace.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Workspace"
              }
            ]
          },
          "workspaceId": {
            "type": "string"
          },
          "isGlobalQueue": {
            "type": "boolean",
            "description": "If true, meeting type is round robin/collective, which\nmeans it has a queue. However, it doesn't belong to a\nworkspace, so it is available to the whole company.\nMay not be needed but using explicit value for clarity for now."
          },
          "user": {
            "nullable": true,
            "description": "Main host of meeting type. For meeting types in workspace, queue\nis used and this is undefined or does nothing (?).\nMaybe rename to \"singleHost\"?",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "description": "User who originally created the meeting type.\nUsers can create meeting type for others.",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "createdById": {
            "type": "string"
          },
          "compact": {
            "type": "boolean"
          },
          "disableTeamsEmail": {
            "type": "boolean",
            "description": "If enabled, booking confirmation email won't be sent for Microsoft Teams meeting"
          },
          "calendarGuestListVisible": {
            "type": "boolean",
            "description": "Whether guests on the synced calendar event can see each other. Off by\ndefault so strangers on a group booking never see each other's address;\non for teams that invite colleagues and known contacts who expect a\nnormal shared invite. Only Google honours it; Outlook has no such flag."
          },
          "languageSetting": {
            "description": "Languages to be used for booking page and notifications.\nDefaults to '[]', to default to our current default behavious\n(all languages active).",
            "allOf": [
              {
                "$ref": "#/components/schemas/LanguageSetting"
              }
            ]
          },
          "customTextSelectChannel": {
            "description": "If null, default channel selection text is shown.\nAllows customizing the text \"Where do you want the meeting to take place?\"",
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomTextSelectChannelSetting"
              }
            ]
          },
          "timezonePreset": {
            "$ref": "#/components/schemas/TimezonePresetSetting"
          },
          "cssSetting": {
            "$ref": "#/components/schemas/CssSetting"
          },
          "meetingPaymentInfo": {
            "$ref": "#/components/schemas/MeetingPaymentInfo"
          },
          "template": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "templateId": {
            "type": "string",
            "nullable": true
          },
          "lockedFields": {
            "description": "Field keys locked by the template admin.\nCopied from the template during assignment and push.\nUsers cannot modify fields in locked sections.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metaSetting": {
            "$ref": "#/components/schemas/MetaSetting"
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "Custom key-value metadata for API integrations.\nSimilar to Stripe's metadata field.\nIncluded in webhook payloads."
          },
          "importSource": {
            "type": "string",
            "description": "Defined if imported from another provider.\nCurrently mainly statistical purpose."
          },
          "videoSetting": {
            "$ref": "#/components/schemas/VideoSetting"
          },
          "cancellationPolicy": {
            "description": "Cancellation policy settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/CancellationPolicySetting"
              }
            ]
          },
          "reschedulingPolicy": {
            "description": "Rescheduling policy settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReschedulingPolicySetting"
              }
            ]
          },
          "recurringSetting": {
            "description": "Recurring events settings.\nWhen enabled, bookers can book multiple occurrences at once.\nNot supported with payment.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringSetting"
              }
            ]
          },
          "enableEmailBookingLimit": {
            "type": "boolean"
          },
          "maxBookingsPerEmail": {
            "type": "number",
            "nullable": true
          },
          "emailBookingLimitPeriod": {
            "type": "object"
          },
          "emailBookingLimitPeriodCount": {
            "type": "number",
            "nullable": true,
            "description": "How many `emailBookingLimitPeriod` units the limit spans, so a window like\n\"6 months\" is expressible. Null or 1 counts from the calendar boundary;\nabove 1 counts back from now. See `email-booking-limit-window.ts`."
          },
          "resourceChannels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceChannel"
            }
          }
        },
        "required": [
          "meetingInfo",
          "meetingOptions",
          "timeslotInterval",
          "spots",
          "enabled",
          "isHidden",
          "slug",
          "bookingMinimum",
          "roundRobin",
          "schedule",
          "hideAddressField",
          "emailQualityGuard",
          "enableWaitlist",
          "runAsWebinar",
          "locations",
          "createdAt",
          "updatedAt",
          "timeFormat",
          "accountOwnerMatchingEnabled",
          "accountOwnerMatchingScope",
          "accountOwnerMatchingUserIds",
          "accountOwnerMatchingAllowNonQueueHosts",
          "accountOwnerMatchingFallback",
          "salesforceHostPoolEnabled",
          "enableWithdrawalButton",
          "id",
          "activationSessionId",
          "activationResourceKey",
          "crmOptions",
          "ics",
          "daysIntoFuture",
          "enableCalendarInviteNotification",
          "useSchedule",
          "useCompanyLogo",
          "useTeamLogo",
          "useCustomInvite",
          "disableActionButtons",
          "showConfetti",
          "useCustomForm",
          "inCompanyPage",
          "formFirst",
          "communicationSettingsId",
          "companyId",
          "reminderIds",
          "isGlobalQueue",
          "createdById",
          "compact",
          "disableTeamsEmail",
          "calendarGuestListVisible",
          "languageSetting",
          "customTextSelectChannel",
          "timezonePreset",
          "cssSetting",
          "meetingPaymentInfo",
          "lockedFields",
          "metaSetting",
          "videoSetting",
          "cancellationPolicy",
          "reschedulingPolicy",
          "recurringSetting",
          "enableEmailBookingLimit"
        ]
      },
      "CardBlockItem": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "text"
        ]
      },
      "CardBlock": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Client-generated stable id"
          },
          "type": {
            "type": "string",
            "enum": [
              "headline",
              "text",
              "link",
              "video",
              "image",
              "file",
              "divider",
              "faq",
              "stats",
              "collection",
              "form",
              "reviews",
              "meetingType"
            ]
          },
          "visible": {
            "type": "boolean"
          },
          "text": {
            "type": "string",
            "description": "Content for headline/text blocks"
          },
          "url": {
            "type": "string",
            "description": "URL for video, file, link, image, or form blocks"
          },
          "label": {
            "type": "string",
            "description": "Display label for file, link, image, collection, form, and reviews blocks"
          },
          "meetingTypeId": {
            "type": "string",
            "description": "Meeting type rendered at this position by a meetingType block"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardBlockItem"
            }
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardBlock"
            }
          }
        },
        "required": [
          "id",
          "type",
          "visible"
        ]
      },
      "CustomLink": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "url",
          "icon"
        ]
      },
      "OnlineProfiles": {
        "type": "object",
        "properties": {
          "linkedIn": {
            "type": "string"
          },
          "facebook": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          },
          "instagram": {
            "type": "string"
          },
          "xing": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "customLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomLink"
            }
          },
          "addressStreet": {
            "type": "string"
          },
          "addressCity": {
            "type": "string"
          },
          "addressPostalCode": {
            "type": "string"
          },
          "addressCountry": {
            "type": "string"
          }
        },
        "required": [
          "linkedIn",
          "facebook",
          "twitter",
          "instagram",
          "xing",
          "phone",
          "email",
          "customLinks",
          "addressStreet",
          "addressCity",
          "addressPostalCode",
          "addressCountry"
        ]
      },
      "PersonalPage": {
        "type": "object",
        "properties": {
          "useCustomColors": {
            "type": "boolean"
          },
          "primaryColor": {
            "type": "string"
          },
          "secondaryColor": {
            "type": "string"
          },
          "headerImage": {
            "type": "string",
            "nullable": true
          },
          "theme": {
            "nullable": true,
            "description": "Card theme (preset + overrides). Null means the default look; the legacy useCustomColors/primaryColor pair is honored only while theme is null.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BusinessCardTheme"
              }
            ]
          },
          "blocks": {
            "nullable": true,
            "description": "Ordered content blocks (headline, text, video, file, divider) shown on the card. Sanitized in updatePersonaPage.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardBlock"
            }
          },
          "businessCardDraft": {
            "type": "object",
            "nullable": true,
            "description": "Staged, not-yet-published design edits: { theme?, blocks? }. Null means no unpublished changes. Never served on public surfaces."
          },
          "description": {
            "type": "string"
          },
          "onlineProfiles": {
            "$ref": "#/components/schemas/OnlineProfiles"
          },
          "meetingTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingType"
            }
          },
          "showAllMeetingTypes": {
            "type": "boolean",
            "description": "If true, show all user meeting types on business card. If false, show only selected meeting types.",
            "default": true
          },
          "showMeetingsSection": {
            "type": "boolean",
            "description": "If true, the card renders the automatic meetings section (heading, \"show all\" toggle, its own list) above the content blocks. Cards created since the block editor took over start without it: booking options are placed as `meetingType` blocks instead, so images and text can sit between them. Backfilled to true for every card that already showed at least one booking option.",
            "default": false
          },
          "showContactExchange": {
            "type": "boolean",
            "description": "If true, the card offers visitors the contact-exchange form beside \"save contact\". Owners who only want to hand out their own details switch it off.",
            "default": true
          },
          "meetingTypeOrder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "useCustomColors",
          "primaryColor",
          "secondaryColor",
          "headerImage",
          "description",
          "onlineProfiles",
          "showAllMeetingTypes",
          "showMeetingsSection",
          "showContactExchange"
        ]
      },
      "AcademySectionOne": {
        "type": "object",
        "properties": {
          "onlineMarketing": {
            "type": "boolean",
            "default": false
          },
          "dna": {
            "type": "boolean",
            "default": false
          },
          "fundament": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "AcademySectionTwo": {
        "type": "object",
        "properties": {
          "salesFunnel": {
            "type": "boolean",
            "default": false
          },
          "leadsCustomers": {
            "type": "boolean",
            "default": false
          },
          "generateLeads": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "Academy": {
        "type": "object",
        "properties": {
          "sectionOne": {
            "$ref": "#/components/schemas/AcademySectionOne"
          },
          "sectionTwo": {
            "$ref": "#/components/schemas/AcademySectionTwo"
          }
        }
      },
      "TutorialSteps": {
        "type": "object",
        "properties": {
          "setupProfile": {
            "type": "boolean",
            "default": false
          },
          "availability": {
            "type": "boolean",
            "default": false
          },
          "editAppointment": {
            "type": "boolean",
            "default": false
          },
          "book": {
            "type": "boolean",
            "default": false
          },
          "branding": {
            "type": "boolean",
            "default": false
          },
          "team": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "OnboardingChecklist": {
        "type": "object",
        "properties": {
          "isCalenderConnected": {
            "type": "boolean",
            "default": false
          },
          "isVideoConferencingConnected": {
            "type": "boolean",
            "default": false
          },
          "isMeetingLocationSet": {
            "type": "boolean",
            "default": false
          },
          "isHoursOfAvailabilitySet": {
            "type": "boolean",
            "default": false
          },
          "isBookingPageShared": {
            "type": "boolean",
            "default": false
          },
          "areTeamMembersInvited": {
            "type": "boolean",
            "default": false
          },
          "areRolesAssigned": {
            "type": "boolean",
            "default": false
          },
          "isTeamAvailabilitySet": {
            "type": "boolean",
            "default": false
          },
          "isBookingLinkSharedWithTeam": {
            "type": "boolean",
            "default": false
          },
          "isGbpLinkAdded": {
            "type": "boolean",
            "default": false
          },
          "hideChecklist": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "UserMetaData": {
        "type": "object",
        "properties": {
          "academy": {
            "$ref": "#/components/schemas/Academy"
          },
          "preferences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "teamSize": {
            "type": "string"
          },
          "position": {
            "type": "string",
            "deprecated": true
          },
          "department": {
            "type": "string",
            "deprecated": true
          },
          "skipOnboarding": {
            "type": "boolean"
          },
          "onboardingFinished": {
            "type": "boolean"
          },
          "tutorialSteps": {
            "$ref": "#/components/schemas/TutorialSteps"
          },
          "campaignPriority": {
            "type": "string",
            "deprecated": true
          },
          "role": {
            "type": "string",
            "deprecated": true
          },
          "segment": {
            "type": "string"
          },
          "betaAccess": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "onboardingChecklist": {
            "$ref": "#/components/schemas/OnboardingChecklist"
          },
          "freeEmail": {
            "type": "boolean",
            "description": "Whether the user email is from a free email provider"
          },
          "oauthEmail": {
            "type": "string",
            "description": "Stores the original email when a user changes their email.\nUsed as a fallback during OAuth federation to match users\nwho changed their email after signing up via Google/Facebook/Microsoft."
          },
          "suiteApps": {
            "description": "Suite apps shown in this user's sidebar, in display order. Falls back\nto company.metadata.enabledApps, then to the legacy preference personas.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sidebarShortcuts": {
            "description": "Optional non-app destinations shown in this user's sidebar.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "visitedApps": {
            "description": "Suite apps whose first-run intro this user has already seen.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suiteAppSuggestionsDismissed": {
            "type": "boolean",
            "description": "Whether this user dismissed the post-first-booking app suggestions on\nHome. Once set the card never comes back: it is a one-shot prompt at the\none moment the user has proof the product works, not a recurring nag."
          },
          "aiPhoneAssistantPromoDismissed": {
            "type": "boolean",
            "description": "Whether this user permanently dismissed the AI Phone Assistant beta prompt."
          }
        }
      },
      "CalendarSyncProvider": {
        "type": "string",
        "enum": [
          "google",
          "outlook",
          "icloud",
          "caldav",
          "exchange",
          "nextcloud",
          "smart-we",
          "salesforce"
        ]
      },
      "CalendarSync": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CalendarSyncProvider"
              }
            ]
          }
        },
        "required": [
          "id",
          "type"
        ]
      },
      "GoogleRegisteredWebhook": {
        "type": "object",
        "properties": {
          "connection": {
            "$ref": "#/components/schemas/GoogleConnection"
          },
          "syncToken": {
            "type": "string",
            "nullable": true,
            "description": "Stores the syncToken provided by Google Calendar API for incremental event synchronization."
          },
          "calendarId": {
            "type": "string",
            "nullable": true,
            "description": "Calendar Id to which the webhook is registered to\nAlso the calendarId to which the syncToken belongs to\nThis should not be nullable, due to existing records we\nmust keep it nullable."
          },
          "connectionId": {
            "type": "string"
          },
          "webhookId": {
            "type": "string",
            "description": "channelId"
          },
          "resourceId": {
            "type": "string",
            "description": "Acts as verification mechanism.\nFor google, it is needed to stop webhook."
          },
          "expiration": {
            "format": "date-time",
            "type": "string",
            "description": "Expiration timestamp"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Indicates when last request was recieved"
          }
        },
        "required": [
          "connection",
          "connectionId",
          "webhookId",
          "resourceId",
          "expiration",
          "updatedAt"
        ]
      },
      "GoogleConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "primary": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "idToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "description": "Scopes as reported by google api, seperated by whitespace."
          },
          "accessTokenExpiration": {
            "type": "string"
          },
          "primaryCalendar": {
            "type": "string"
          },
          "selectedCalendars": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "validateAvailability": {
            "type": "boolean"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "userId": {
            "type": "string"
          },
          "registeredWebhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleRegisteredWebhook"
            }
          },
          "disableAttendeeNotification": {
            "type": "boolean"
          },
          "cancelIfDeclinedOrDeleted": {
            "type": "boolean",
            "description": "If true, the meetergo appointment will be cancelled if the attendee declines or deletes the meeting in Google calendar."
          },
          "requiresReauth": {
            "type": "boolean",
            "description": "Set when the refresh token is revoked or credentials become invalid.\nThe user must reconnect via OAuth to restore syncing.\nTODO: Apply this pattern to Outlook, CalDAV, and other connection types."
          },
          "syncBuffersToCalendar": {
            "type": "boolean",
            "description": "Whether buffer events should be synced to this calendar connection"
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true,
            "description": "Health-tracking fields powering the integration health dashboard and the\nstale-integration cron. Non-PII normalized error code (\"auth_revoked\",\n\"rate_limited\", \"network_error\", etc.) — never raw provider payloads."
          },
          "lastErrorAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastNotifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the user was last emailed about this connection being broken.\nUsed by the stale-integration cron to throttle reminders to once per\nincident — reset to null on successful reconnection."
          }
        },
        "required": [
          "id",
          "sub",
          "primary",
          "email",
          "idToken",
          "refreshToken",
          "accessToken",
          "scope",
          "accessTokenExpiration",
          "primaryCalendar",
          "selectedCalendars",
          "validateAvailability",
          "userId",
          "cancelIfDeclinedOrDeleted",
          "requiresReauth",
          "syncBuffersToCalendar",
          "lastErrorCode",
          "lastErrorAt",
          "lastNotifiedAt"
        ]
      },
      "CalDAVCalendarInfo": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "url"
        ]
      },
      "CaldavConnection": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "selectedCalendars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalDAVCalendarInfo"
            }
          },
          "validateAvailability": {
            "type": "boolean"
          },
          "primaryCalendar": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "description": "Caldav provider, i.e. \"mailbox.org\". Some providers\nneed special handling.\nThis is an enum but DB schema is a string because likely\nthe enum will change often"
          },
          "disableAttendeeNotification": {
            "type": "boolean"
          },
          "skipCache": {
            "type": "boolean",
            "description": "If true, skip caching and always fetch fresh calendar data.\nUseful for troubleshooting stale availability issues."
          },
          "syncBuffersToCalendar": {
            "type": "boolean",
            "description": "Whether buffer events should be synced to this calendar connection"
          },
          "requiresReauth": {
            "type": "boolean",
            "description": "When true, the connection credentials are invalid.\nPrevents repeated error notifications and skips\navailability checks until the user reconnects.\nReset to false on successful reconnection."
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true,
            "description": "Health-tracking fields powering the integration health dashboard and the\nstale-integration cron. See GoogleConnection for the full pattern."
          },
          "lastErrorAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastNotifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "email",
          "userId",
          "url",
          "selectedCalendars",
          "validateAvailability",
          "primaryCalendar",
          "provider",
          "disableAttendeeNotification",
          "skipCache",
          "syncBuffersToCalendar",
          "requiresReauth",
          "lastErrorCode",
          "lastErrorAt",
          "lastNotifiedAt"
        ]
      },
      "UserWebexConnection": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "refreshTokenExpiration": {
            "format": "date-time",
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "userId",
          "refreshToken",
          "refreshTokenExpiration",
          "accessToken",
          "accessTokenExpiration"
        ]
      },
      "KMeetIntegration": {
        "type": "object",
        "properties": {
          "calendarId": {
            "type": "number",
            "nullable": true,
            "description": "Selected Infomaniak calendar ID for room creation. Null until user completes setup."
          },
          "customDomain": {
            "type": "string",
            "nullable": true,
            "description": "Custom kMeet domain (e.g. 'terra.estate' -> kmeet.terra.estate). Null = use default."
          },
          "roomOptions": {
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "createdAt",
          "updatedAt"
        ]
      },
      "NextcloudTalkIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "serverUrl": {
            "type": "string",
            "description": "Base instance URL, e.g. 'https://cloud.example.com' (no trailing slash)."
          },
          "username": {
            "type": "string",
            "description": "Nextcloud login name used for Basic auth against the Spreed OCS API."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "serverUrl",
          "username",
          "createdAt",
          "updatedAt"
        ]
      },
      "OpenTalkIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "controllerUrl": {
            "type": "string",
            "description": "Controller (API) base URL, e.g. 'https://controller.example.com'."
          },
          "webBaseUrl": {
            "type": "string",
            "description": "Web frontend base URL used to build guest links, e.g. 'https://meet.example.com'."
          },
          "tokenUrl": {
            "type": "string",
            "description": "Full Keycloak token endpoint, e.g. 'https://accounts.example.com/auth/realms/main/protocol/openid-connect/token'."
          },
          "clientId": {
            "type": "string",
            "description": "OIDC client id used for the password grant."
          },
          "username": {
            "type": "string",
            "description": "Service-user login (email) for the password grant."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "controllerUrl",
          "webBaseUrl",
          "tokenUrl",
          "clientId",
          "username",
          "createdAt",
          "updatedAt"
        ]
      },
      "AlfaviewIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "companyId": {
            "type": "string",
            "description": "alfaview company (account) ID the API key belongs to."
          },
          "clientId": {
            "type": "string",
            "description": "Alias of the API key (sent as `clientId` when authenticating)."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "companyId",
          "clientId",
          "createdAt",
          "updatedAt"
        ]
      },
      "BlockEventTypes": {
        "type": "object",
        "properties": {
          "busy": {
            "type": "boolean"
          },
          "tentative": {
            "type": "boolean"
          },
          "oof": {
            "type": "boolean"
          },
          "workingElsewhere": {
            "type": "boolean"
          },
          "unknown": {
            "type": "boolean"
          }
        },
        "required": [
          "busy",
          "tentative",
          "oof",
          "workingElsewhere",
          "unknown"
        ]
      },
      "GraphCalendarInfo": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "canEdit": {
            "type": "boolean"
          }
        },
        "required": [
          "displayName",
          "url",
          "canEdit"
        ]
      },
      "GraphRegisteredWebhook": {
        "type": "object",
        "properties": {
          "connection": {
            "$ref": "#/components/schemas/UserGraphConnection"
          },
          "connectionId": {
            "type": "string"
          },
          "webhookId": {
            "type": "string",
            "description": "channelId"
          },
          "resourceId": {
            "type": "string",
            "description": "Acts as verification mechanism.\nFor google, it is needed to stop webhook."
          },
          "expiration": {
            "format": "date-time",
            "type": "string",
            "description": "Expiration timestamp"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Indicates when last request was recieved"
          }
        },
        "required": [
          "connection",
          "connectionId",
          "webhookId",
          "resourceId",
          "expiration",
          "updatedAt"
        ]
      },
      "UserGraphConnection": {
        "type": "object",
        "properties": {
          "blockEventTypes": {
            "$ref": "#/components/schemas/BlockEventTypes"
          },
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "primary": {
            "type": "boolean"
          },
          "refreshToken": {
            "type": "string",
            "nullable": true
          },
          "accessToken": {
            "type": "string",
            "nullable": true
          },
          "accessTokenExpiration": {
            "type": "string",
            "nullable": true
          },
          "canHostOnlineMeetings": {
            "type": "boolean"
          },
          "validateAvailability": {
            "type": "boolean"
          },
          "selectedCalendars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GraphCalendarInfo"
            }
          },
          "primaryCalendar": {
            "type": "string"
          },
          "registeredWebhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GraphRegisteredWebhook"
            }
          },
          "disableAttendeeNotification": {
            "type": "boolean",
            "description": "New experimental setting to disable attendee notifications.\nThis results in attendee not being added to host's calendar invite."
          },
          "enableCache": {
            "type": "boolean",
            "description": "If true, fetches availabilities from cache. Otherwise from Microsoft Graph."
          },
          "cancelIfDeclinedOrDeleted": {
            "type": "boolean",
            "description": "If true, the meetergo appointment will be cancelled if the attendee declines or deletes the meeting in Outlook calendar."
          },
          "requiresReauth": {
            "type": "boolean",
            "description": "If true, the refresh token is invalid and the user needs to re-authorize.\nConnection is kept (preserving calendar settings) instead of being deleted."
          },
          "syncBuffersToCalendar": {
            "type": "boolean",
            "description": "Whether buffer events should be synced to this calendar connection"
          },
          "scope": {
            "type": "string",
            "nullable": true,
            "description": "Scopes as reported by Microsoft OAuth, space-separated. Null for pre-existing connections."
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true,
            "description": "Health-tracking fields powering the integration health dashboard and the\nstale-integration cron. See GoogleConnection for the full pattern."
          },
          "lastErrorAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastNotifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "roomEmailAddress": {
            "type": "string",
            "nullable": true,
            "description": "When set, this connection is a \"room connection\": availability is read\nfor this Microsoft 365 room/resource mailbox (this SMTP address) via the\nGraph `getSchedule` free/busy API. The token stored on this connection\nbelongs to the real licensed \"reader\" user (an admin/host in the same\ntenant) who completed OAuth with the `Calendars.Read.Shared` scope — the\nroom mailbox itself never authenticates (Microsoft blocks interactive\nsign-in on rooms).\n\nNull for every normal connection, which keeps the existing calendarView\nread path untouched. See {@link isRoomConnection}."
          }
        },
        "required": [
          "blockEventTypes",
          "id",
          "email",
          "userId",
          "primary",
          "refreshToken",
          "accessToken",
          "accessTokenExpiration",
          "canHostOnlineMeetings",
          "validateAvailability",
          "selectedCalendars",
          "primaryCalendar",
          "registeredWebhooks",
          "disableAttendeeNotification",
          "enableCache",
          "cancelIfDeclinedOrDeleted",
          "requiresReauth",
          "syncBuffersToCalendar",
          "lastErrorCode",
          "lastErrorAt",
          "lastNotifiedAt"
        ]
      },
      "ExchangeTeamsConnection": {
        "type": "object",
        "properties": {
          "blockEventTypes": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BlockEventTypes"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "graphUserId": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "deprecated": true
          },
          "primary": {
            "type": "boolean",
            "deprecated": true
          },
          "refreshToken": {
            "type": "string",
            "nullable": true
          },
          "accessToken": {
            "type": "string",
            "nullable": true
          },
          "accessTokenExpiration": {
            "type": "string",
            "nullable": true
          },
          "canHostOnlineMeetings": {
            "type": "boolean",
            "description": "For new connections having OnlineMeeting.ReadWrite scope\nCan create meeting on teams for exchange/outlook account"
          },
          "validateAvailability": {
            "type": "boolean",
            "deprecated": true
          },
          "selectedCalendars": {
            "deprecated": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GraphCalendarInfo"
            }
          },
          "primaryCalendar": {
            "type": "string",
            "deprecated": true
          },
          "skipCache": {
            "type": "boolean",
            "description": "If true, skip caching and always fetch fresh calendar data.\nUseful for troubleshooting stale availability issues."
          },
          "syncBuffersToCalendar": {
            "type": "boolean",
            "description": "Whether buffer events should be synced to this calendar connection"
          }
        },
        "required": [
          "blockEventTypes",
          "id",
          "userId",
          "graphUserId",
          "primary",
          "refreshToken",
          "accessToken",
          "accessTokenExpiration",
          "canHostOnlineMeetings",
          "validateAvailability",
          "selectedCalendars",
          "primaryCalendar",
          "skipCache",
          "syncBuffersToCalendar"
        ]
      },
      "LinkandoConnection": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "apiDomain": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "accessTokenExpiration": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "accessToken",
          "apiDomain",
          "accessTokenExpiration"
        ]
      },
      "SmartWeCalendarConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "expiresAfter": {
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "skipCache": {
            "type": "boolean",
            "description": "If true, skip caching and always fetch fresh calendar data.\nUseful for troubleshooting stale availability issues."
          },
          "syncBuffersToCalendar": {
            "type": "boolean",
            "description": "Whether buffer events should be synced to this calendar connection"
          }
        },
        "required": [
          "id",
          "userId",
          "email",
          "accessToken",
          "refreshToken",
          "tokenType",
          "scope",
          "expiresAfter",
          "createdAt",
          "updatedAt",
          "skipCache",
          "syncBuffersToCalendar"
        ]
      },
      "UserExchangeConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "latestWorkingEndpoint": {
            "type": "string",
            "description": "Last endpoint that was successfully called"
          },
          "username": {
            "type": "string",
            "description": "Exact username to use as username (i.e. combined domain\\user or email)"
          },
          "email": {
            "type": "string",
            "description": "Exchange email of user"
          },
          "validateAvailability": {
            "type": "boolean"
          },
          "useImpersonation": {
            "type": "boolean",
            "description": "Whether to use impersonation (service account accessing another user's calendar)"
          },
          "impersonatedEmail": {
            "type": "string",
            "description": "Email of the user to impersonate (when useImpersonation is true)"
          },
          "calendarFolderId": {
            "type": "string",
            "description": "Calendar folder ID for Exchange 2025+ compatibility.\n- NULL for Exchange 2019 and earlier (uses WellKnownFolderName.Calendar)\n- Set automatically during connection if standard method fails"
          },
          "skipCache": {
            "type": "boolean",
            "description": "If true, skip caching and always fetch fresh calendar data.\nUseful for troubleshooting stale availability issues."
          },
          "emailSyncEnabled": {
            "type": "boolean",
            "description": "If true, this Exchange connection is also used to sync emails into the CRM.\nOpt-in only: defaults to false so existing calendar-only connections are\nnever touched by the email sync pipeline."
          },
          "emailSyncEnabledAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Set when emailSyncEnabled is first activated."
          },
          "requiresReauth": {
            "type": "boolean",
            "description": "True once the stored credentials are rejected by the server (401 on a\nrotated password is the common case). The connection is kept so the host\ncan re-enter the password; availability skips it until then. Same\ncontract as `UserGraphConnection.requiresReauth`."
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true,
            "description": "Health-tracking fields powering the integration health dashboard and the\nstale-integration cron. See GoogleConnection for the full pattern."
          },
          "lastErrorAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastNotifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "userId",
          "latestWorkingEndpoint",
          "username",
          "email",
          "validateAvailability",
          "useImpersonation",
          "skipCache",
          "emailSyncEnabled",
          "emailSyncEnabledAt",
          "requiresReauth",
          "lastErrorCode",
          "lastErrorAt",
          "lastNotifiedAt"
        ]
      },
      "AppleCalendarInfo": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "url"
        ]
      },
      "UserAppleConnection": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "Encrypted app-specific password generated in apple account"
          },
          "selectedCalendars": {
            "description": "The calendars whose events are read for availability. Written at connect\ntime and updated from the settings flow. Entries carry only\n`displayName` and `url`; the read path skips entries missing either\n(`AppleService.getICloudCalendarEvents`).\n\nAn empty array means no calendar is read, so this connection blocks\nnothing. There is no per-calendar toggle: `validateAvailability` is a\nconnection-level column and gates the whole list.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppleCalendarInfo"
            }
          },
          "validateAvailability": {
            "type": "boolean"
          },
          "primaryCalendar": {
            "type": "string"
          },
          "disableAttendeeNotification": {
            "type": "boolean"
          },
          "ignoreAllDayAppointments": {
            "type": "boolean",
            "description": "if enabled, all day events will be marked as free.\nOtherwise, busy"
          },
          "skipCache": {
            "type": "boolean",
            "description": "If true, skip caching and always fetch fresh calendar data.\nUseful for troubleshooting stale availability issues."
          },
          "syncBuffersToCalendar": {
            "type": "boolean",
            "description": "Whether buffer events should be synced to this calendar connection"
          },
          "requiresReauth": {
            "type": "boolean",
            "description": "When true, the connection credentials are invalid.\nPrevents repeated \"reconnect calendar\" notifications and skips\navailability checks until the user reconnects.\nReset to false on successful reconnection."
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true,
            "description": "Health-tracking fields powering the integration health dashboard and the\nstale-integration cron. See GoogleConnection for the full pattern."
          },
          "lastErrorAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastNotifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "username",
          "userId",
          "key",
          "selectedCalendars",
          "validateAvailability",
          "primaryCalendar",
          "disableAttendeeNotification",
          "ignoreAllDayAppointments",
          "skipCache",
          "syncBuffersToCalendar",
          "requiresReauth",
          "lastErrorCode",
          "lastErrorAt",
          "lastNotifiedAt"
        ]
      },
      "SalesforceUserMapping": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "companyId": {
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "salesforceUserId": {
            "type": "string",
            "description": "Salesforce User.Id"
          },
          "salesforceUserEmail": {
            "type": "string",
            "description": "Salesforce user email (for display purposes)"
          },
          "validateAvailability": {
            "type": "boolean",
            "description": "If true, include Salesforce calendar events in availability checks"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "companyId",
          "salesforceUserId",
          "salesforceUserEmail",
          "validateAvailability",
          "createdAt",
          "updatedAt"
        ]
      },
      "User": {
        "type": "object",
        "properties": {
          "zoomEncryptionType": {
            "type": "object",
            "description": "Zoom meeting encryption type preference.\n- 'enhanced_encryption': Allows web browser joining (recommended)\n- 'e2ee': End-to-end encryption, requires Zoom client\n- null: Use Zoom account default settings"
          },
          "timezone": {
            "type": "string",
            "description": "User timezone affects times shown in notifications, UI etc.\nIt is set to the chosen timezone after onboarding is completed.\n`utc` timezone may suggest that onboarding was not completed yet or for the user."
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Language"
              }
            ]
          },
          "seatTier": {
            "nullable": true,
            "description": "The tier this seat is billed and entitled at, when it is lower than the\ncompany's own.\n\n`null` — the overwhelming majority, and every user that existed before\nthis was added — means the seat simply follows the company tier, which is\nhow billing worked when there was only one tier per account. A value here\npins the seat lower: a Suite or Premium account should not have to buy\nSuite for a colleague who only books meetings.\n\nOnly ever below the account tier. Nothing here can raise a seat above what\nthe company pays for, because entitlements are the intersection of the two\n(see `mergeSeatAccess`).",
            "allOf": [
              {
                "$ref": "#/components/schemas/SeatTier"
              }
            ]
          },
          "viewerScope": {
            "description": "How much a {@link UserType.VIEWER} may read. Ignored for every other type.\n\n`company` sees the whole account, `teams` only the members of the\nworkspaces they are assigned to via `analyticsViewerWorkspaces`.\n\nExplicit rather than inferred from \"has any assigned workspace\": an admin\nwho creates a team-scoped viewer and has not picked the teams yet would\notherwise be handing out company-wide access by omission. A `teams` viewer\nwith nothing assigned sees nothing, which is the safe end of that mistake.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ViewerScope"
              }
            ]
          },
          "notetakerEnabled": {
            "type": "boolean",
            "description": "Send the notetaker to this host's meetings unless something more specific\nsays otherwise. The bottom of the chain — a meeting type or a single\nmeeting can still override it in either direction.\n\nDefaults to false and must stay that way: the bot is a visible third\nparticipant recording people who did not book the call, and Germany is a\ntwo-party-consent country. Recording is something a host turns on."
          },
          "notetakerRecordExternal": {
            "type": "boolean",
            "description": "Whether the notetaker also covers meetings read off this host's connected\ncalendars, or only meetergo bookings.\n\nOn by default, which keeps today's behaviour: switching the notetaker on\nhas always meant the whole calendar. Off narrows `notetakerEnabled` to\nbookings — and stops the calendar mirror storing this host's external\nmeetings at all, so the narrower choice is also the more private one.\nMeaningless while `notetakerEnabled` is false."
          },
          "notetakerLanguage": {
            "nullable": true,
            "description": "The language this host's meetings are held in, or null to read it off the\nbooking.\n\nAn explicit answer, and it therefore beats the inferred ones: a host who\nsays \"my calls are in German\" means it even when an English-speaking\ninvitee booked one. Null is the default and keeps today's behaviour, which\nis the invitee's own choice on the booking page and then this user's\ndashboard language.\n\nIt exists because the platforms give us no second chance. Meet, Teams and\nZoom all caption in a language fixed before anyone speaks, we consume\ntheir captions rather than running our own transcription, and a call\ncaptioned in the wrong language comes back as noise. See `spokenLanguage`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Language"
              }
            ]
          },
          "notetakerEmailTranscript": {
            "type": "boolean",
            "description": "Mail this host the recording when it is ready.\n\nOn by default, which is the opposite of `notetakerEnabled` above and for a\ndifferent question. That switch decides whether a bot joins somebody\nelse's call, so its absence has to read as no. This one decides whether a\nhost gets their own recording in their own inbox after they already asked\nfor it, and a host who switched recording on and hears nothing afterwards\nassumes it did not work.\n\nThe mail goes to the host alone and carries the summary and a link, never\nthe transcript itself or a copy to the other people on the call: those are\ndecisions about somebody else's words, and they belong to a sharing\naction rather than to a default."
          },
          "notetakerAdvanceNotice": {
            "type": "boolean",
            "description": "Email attendees ahead of this host's recorded meetings.\n\nOn by default: the advance notice is the disclosure attendees get when\nnothing else reaches them, so silence is something a host opts into, not\nsomething that happens to them. Off only quiets the dedicated advance\nemail — the confirmation footer, the calendar sentence and the notice in\nthe meeting itself are not this setting's to remove."
          },
          "preCallBriefEmail": {
            "type": "boolean",
            "nullable": true,
            "description": "Email me the pre-call brief before each of my meetings.\n\nThree states, not two. Null means the host has never answered, so the\nworkspace's own default decides; true and false are the host overriding\nit either way. Without the null an admin switching the workspace on could\nnever reach anybody, because every existing row would already read as a\ndeliberate \"no\"."
          },
          "meetingTypes": {
            "description": "Meeting types that user owns",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingType"
            }
          },
          "meetingTypeTemplates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingTypeTemplate"
            }
          },
          "availabilities": {
            "description": "Availabilities that user owns",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Availability"
            }
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appointment"
            }
          },
          "mainHostAppointment": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appointment"
            }
          },
          "workspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workspace"
            }
          },
          "bookingLinkMeetingType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "calgentRequireApproval": {
            "type": "boolean",
            "description": "Hold every booking for the host to allow before it reaches the calendar.\nOff by default: the assistant exists to remove the back and forth, and\napproval puts a step back in. On for hosts who want the assistant to\nnegotiate but not to commit."
          },
          "id": {
            "type": "string",
            "description": "Must be uuid of existing cognito user, i.e. from token `payload.sub`.\nAll values in this row are valid UUIDs, but it is improperly\ntyped as varchar. It should be \"uuid\". Migrating all values\nto uuid works without issues, but ALL FKs have to be rewritten as well."
          },
          "companyId": {
            "type": "string",
            "nullable": true,
            "description": "Always defined as company is now created immediately\nupon registration. Only undefined when user is initially\ncreated. Can refactor to be non nullable but need to refactor\nRegisterController as well."
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "activeCompanyId": {
            "type": "string",
            "nullable": true,
            "description": "Which company this user is currently operating in, for users who hold\nmemberships in companies other than their own (partner admins).\n\nServer-owned on purpose. This used to live in the browser's localStorage\nand ride every request as an `x-meetergo-company-id` header, which meant\nthe client asserted its own authorization context: a value left behind by\nan earlier session kept being sent, the api refused every request with it\n(including `/me`), and the app could not boot far enough to correct\nitself. Nothing could reconcile it, because nothing but the browser knew\nit existed (reported 2026-08-18).\n\nNull means \"my own company\". A value here is a preference, never a\npermission: membership is re-validated on every request and this column is\ncleared when it no longer holds."
          },
          "email": {
            "type": "string",
            "description": "Email of the user. Email is null when user is a resource.\nIf resource is converted to user, email is set."
          },
          "contactEmail": {
            "type": "string",
            "nullable": true,
            "description": "Verified contact email shown to attendees (Reply-To on booking\nconfirmations). When set, it overrides `email` for outbound mail\nbut does not affect auth/login. Required for OAuth users who\ncannot change `email` via Cognito but want a different\ncustomer-facing address. Verified via OTP before being stored."
          },
          "isAdmin": {
            "type": "boolean"
          },
          "groups": {
            "description": "Groups the user is in",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            }
          },
          "groupsAdmin": {
            "description": "Groups the user is admin and in",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            }
          },
          "familyName": {
            "type": "string",
            "description": "Family name/lastname"
          },
          "givenName": {
            "type": "string",
            "description": "Given name/firstname. In the case of Resource, this is resource name"
          },
          "picture": {
            "type": "string",
            "description": "Ful url to user picture hosted statically"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastLoginAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastApiActivityAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Last time a programmatic API call (PAT or API key) resolved to this user.\nThe \"≥1 API call attributed to the user\" signal for reseller seat-activity\nbilling (Placetel contract §4.2) — the limb that bookings and `lastLoginAt`\ndon't cover for API-driven seats. Stamped best-effort on PAT/API-key auth;\nthe write is a conditional UPDATE that no-ops after the first of the day."
          },
          "onboardingQualifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "First qualifying onboarding action (meeting-type / availability /\nworkflow configuration) within 72h of signup. Write-once, claimed via a\nconditional UPDATE so the `onboarding_qualified` analytics event and its\nconsent-gated Meta CAPI dispatch fire exactly once per user."
          },
          "title": {
            "type": "string"
          },
          "anonymousBooking": {
            "type": "boolean"
          },
          "exemptFromOutlookConnectionRequirement": {
            "type": "boolean",
            "description": "When true, this host is exempt from the company-wide Microsoft/Outlook\nconnection requirement and stays bookable even without a working\nconnection. Set per host by a company admin. See\n`isHostEligibleUnderOutlookRequirement`."
          },
          "anonymousCalendarActivity": {
            "type": "boolean"
          },
          "keepCancelledCalendarEvents": {
            "type": "boolean",
            "description": "When true, cancelling an appointment keeps the synced calendar event in\nthe host's calendar instead of deleting it: the event is marked cancelled\n(title prefixed, e.g. \"Abgesagt: …\") and set to free/transparent so it no\nlonger blocks availability. Lets hosts keep a record of cancelled meetings\nfor time tracking. Default off preserves the historic delete behavior.\nHonored by `CalendarSyncService.syncAppointmentCancel`."
          },
          "slug": {
            "type": "string"
          },
          "showGettingStartedList": {
            "type": "boolean"
          },
          "recieveEmailMarketing": {
            "type": "boolean",
            "description": "User opted in to recieve marketing emails"
          },
          "miraBudgetOverride": {
            "type": "number",
            "nullable": true,
            "description": "A per-seat monthly AI spend cap (USD) that replaces the one their plan tier\nwould give them, set by an operator from the ops console.\n\nThe tier caps in `MIRA_TIERS` are deliberately tight, so a heavy but\nlegitimate user can exhaust one mid-month and silently drop to the free\nmodel lane. This is the lever that fixes that case without a deploy and\nwithout moving every other customer on the same plan.\n\nNull — everyone, normally — means the seat follows its tier. It is stored\nhere rather than on the LiteLLM customer row because both gateways\nreconcile that row back to the tier value on every request; this column is\nwhat they reconcile *to*."
          },
          "miraBudgetOverrideUntil": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the override lapses back to the tier cap. Null means it does not.\n\nEvaluated on read, so no job is involved: an expired override simply stops\nbeing returned, and the next request reconciles the gateway back down."
          },
          "miraBudgetOverrideReason": {
            "type": "string",
            "nullable": true,
            "description": "Why the operator raised it. Shown in the ops console beside the value."
          },
          "userStatus": {
            "type": "object",
            "deprecated": true
          },
          "referralId": {
            "type": "string"
          },
          "personalPage": {
            "$ref": "#/components/schemas/PersonalPage"
          },
          "metadata": {
            "$ref": "#/components/schemas/UserMetaData"
          },
          "calendarSyncProviders": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CalendarSync"
              }
            ]
          },
          "enableHostMeetingLimits": {
            "type": "boolean"
          },
          "hostMeetingLimits": {
            "type": "object",
            "nullable": true
          },
          "analyticsViewerWorkspaces": {
            "description": "Workspaces this user is an analytics-only viewer of (see\n `Workspace.analyticsViewers`). Grants scoped analytics, no edit rights.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workspace"
            }
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reminder"
            }
          },
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Queue"
            }
          },
          "queueUserGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueueUserGroup"
            }
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Form"
            }
          },
          "googleConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleConnection"
            }
          },
          "caldavConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaldavConnection"
            }
          },
          "webexConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/UserWebexConnection"
              }
            ]
          },
          "kmeetIntegration": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/KMeetIntegration"
              }
            ]
          },
          "nextcloudTalkIntegration": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/NextcloudTalkIntegration"
              }
            ]
          },
          "openTalkIntegration": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OpenTalkIntegration"
              }
            ]
          },
          "alfaviewIntegration": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AlfaviewIntegration"
              }
            ]
          },
          "graphConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserGraphConnection"
            }
          },
          "exchangeTeamsConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExchangeTeamsConnection"
            }
          },
          "linkandoConnection": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/LinkandoConnection"
              }
            ]
          },
          "smartWeCalendarConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartWeCalendarConnection"
            }
          },
          "exchangeConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserExchangeConnection"
            }
          },
          "appleConnections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserAppleConnection"
            }
          },
          "salesforceUserMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesforceUserMapping"
            }
          },
          "salesforceAutoConnectOptOut": {
            "type": "boolean",
            "description": "This member disconnected their Salesforce calendar themselves.\n\nDisconnecting deletes the mapping row, which leaves nothing to tell the\ncompany-wide auto-connect apart from a member it has never seen. Without\nthis flag it would re-create the mapping on its next run and the member\ncould not stay disconnected. Connecting again clears it."
          },
          "defaultAvailability": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Availability"
              }
            ]
          },
          "defaultAvailabilityId": {
            "type": "string"
          },
          "aircallUserId": {
            "type": "string"
          },
          "phone": {
            "type": "string",
            "description": "Phone number in profile. Migrated from cognito."
          },
          "userType": {
            "type": "string",
            "enum": [
              "standard",
              "resource",
              "api-platform",
              "partner",
              "viewer"
            ]
          },
          "provisionalBookings": {
            "$ref": "#/components/schemas/ProvisionalBookingPayload"
          },
          "resourceChannels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceChannel"
            }
          },
          "calgentActive": {
            "type": "boolean",
            "description": "Calgent AI email bot settings"
          },
          "calgentMeetingTypeId": {
            "type": "string",
            "nullable": true
          },
          "marketingUnsubscribeToken": {
            "type": "string",
            "nullable": true,
            "description": "Opaque handle for one-click unsubscribe links in marketing email.\n\nNullable and minted on first use rather than defaulted, so adding it does\nnot rewrite the whole `user` table. Not the user id: an unsubscribe link is\nclicked from an inbox and forwarded around, and it should not hand out an\nidentifier the rest of the API takes seriously."
          },
          "calgentMeetingType": {
            "$ref": "#/components/schemas/MeetingType"
          },
          "instantBookerMeetingTypeId": {
            "type": "string",
            "nullable": true,
            "description": "Hidden meeting type used by the Instant Booker's \"Quick Meeting\" mode.\nCreated lazily on first use via POST /booking/instant-booker-meeting-type."
          },
          "instantBookerMeetingType": {
            "$ref": "#/components/schemas/MeetingType"
          },
          "alreadyTriedSlugs": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "timezone",
          "language",
          "notetakerEnabled",
          "notetakerRecordExternal",
          "notetakerEmailTranscript",
          "notetakerAdvanceNotice",
          "calgentRequireApproval",
          "id",
          "isAdmin",
          "familyName",
          "givenName",
          "createdAt",
          "updatedAt",
          "title",
          "anonymousBooking",
          "exemptFromOutlookConnectionRequirement",
          "anonymousCalendarActivity",
          "keepCancelledCalendarEvents",
          "slug",
          "showGettingStartedList",
          "recieveEmailMarketing",
          "userStatus",
          "personalPage",
          "calendarSyncProviders",
          "enableHostMeetingLimits",
          "salesforceAutoConnectOptOut",
          "userType",
          "resourceChannels",
          "calgentActive",
          "alreadyTriedSlugs"
        ]
      },
      "ContactCompany": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "emailDomain": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          }
        },
        "required": [
          "id",
          "name",
          "emailDomain",
          "address",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "CrmCompany": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "size": {
            "type": "string",
            "enum": [
              "1-10",
              "11-50",
              "51-200",
              "201-500",
              "501-1000",
              "1001+"
            ]
          },
          "website": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string",
            "description": "Cached square brand mark, resolved once from the domain via Brand.dev.\n\nThe icon rather than the wordmark: every surface that shows this is a\nsmall square tile on a card or list row, where a wide logo renders\nillegibly.\n\nStored rather than fetched per render — a pipeline board draws a hundred\ncards, and a lookup per card would be a hundred provider calls for a\npicture. `iconFetchedAt` records the attempt, not the success, so a domain\nwith no mark is asked once and then left alone."
          },
          "iconFetchedAt": {
            "format": "date-time",
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "notes": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "What the company says it does, from its own website.\n\nDeliberately not `notes`: that column is the seller's own writing about\nthis account, and enrichment overwriting it would destroy the one thing on\nthe record a machine did not put there."
          },
          "enrichedAt": {
            "format": "date-time",
            "type": "string",
            "description": "When firmographics were last looked up, successful or not.\n\nSeparate from `iconFetchedAt`, which only means \"we asked for a picture\".\nStamped on every attempt so a domain the provider knows nothing about is\nasked once rather than on every sweep forever."
          },
          "owner": {
            "$ref": "#/components/schemas/User"
          },
          "ownerId": {
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "customFields": {
            "type": "object"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "address",
          "company",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "FormSubmissionLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "form": {
            "$ref": "#/components/schemas/Form"
          },
          "submissionTimestamp": {
            "format": "date-time",
            "type": "string"
          },
          "workspace": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Workspace"
              }
            ]
          },
          "user": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "anonymousVisitorId": {
            "type": "string",
            "nullable": true
          },
          "recipientId": {
            "type": "string",
            "nullable": true,
            "description": "`FormRecipient.id` when the submission arrived through a personal link.\n\nThe relation is kept on this side because one recipient can submit more\nthan once (`Form.allowRecipientResubmission`), and the recipient row can\nonly ever point at one submission: `FormRecipient.submissionId` is written\nunder a `completedAt IS NULL` guard, so it holds the FIRST submission and\nnothing else. Grouping a person's submissions therefore reads this column.\n\nPlain uuid rather than a relation, mirroring `FormRecipient.submissionId`:\nthe submission log is a ledger and must not gain a join that the hot\nsubmission path pays for."
          },
          "spaceId": {
            "type": "string",
            "nullable": true,
            "description": "Set when the form was filled inside a client portal (a `form` block in a\nspace). Resolved on the server from the portal session the embed passed\nalong, never taken from the client as-is, so a submission can only claim a\nportal whose block actually embeds this form. Plain uuids, no relations:\nthis is a ledger and the hot submission path must not pay for joins."
          },
          "spaceBlockId": {
            "type": "string",
            "nullable": true
          },
          "spaceViewerId": {
            "type": "string",
            "nullable": true
          },
          "submissionDataSnapshot": {
            "type": "object",
            "nullable": true
          },
          "score": {
            "type": "number",
            "nullable": true,
            "description": "Total score of the submission, computed at submission time from per-option\npointValues. Null when none of the form's fields have scoring configured\n(i.e. the form is not a scored/interview form). Stored at submission time\nso historical scores stay stable even if option point values change later."
          },
          "maxScore": {
            "type": "number",
            "nullable": true,
            "description": "Maximum possible score for this submission, computed from the form's\nfield configuration at submission time. Lets consumers display \"8 / 10\"\nor compute a percentage without re-reading the form. Null when score\nis null."
          },
          "contact": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Contact"
              }
            ]
          },
          "formId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "utmSource": {
            "type": "string",
            "nullable": true
          },
          "utmMedium": {
            "type": "string",
            "nullable": true
          },
          "utmCampaign": {
            "type": "string",
            "nullable": true
          },
          "utmContent": {
            "type": "string",
            "nullable": true
          },
          "utmTerm": {
            "type": "string",
            "nullable": true
          },
          "referrerUrl": {
            "type": "string",
            "nullable": true
          },
          "pageUrl": {
            "type": "string",
            "nullable": true
          },
          "contactId": {
            "type": "string",
            "nullable": true
          },
          "submissionAcceptedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "DB-clock instant the winning capacity reservation admitted this\nsubmission. Null on every pre-fence row; authoritative for capacity and\nbilling-month bucketing where present."
          },
          "submissionBillingMonth": {
            "type": "string",
            "nullable": true,
            "description": "Company billing-month bucket (YYYY-MM) frozen from `submissionAcceptedAt`\nso a submission accepted near a month/time-zone boundary stays in the\nbucket that admitted it."
          },
          "submissionIdempotencyKey": {
            "type": "string",
            "nullable": true,
            "description": "Stable idempotency key (`sha256(\"form-submission:v1:\" + formId + \":\" +\nformFlowId)`) for capability-carrying submissions. Null for legacy\nsubmissions, which keep their non-replayable response-loss semantics; a\nseparate concurrently-created unique partial index enforces exactly-once\npublication for non-null keys."
          }
        },
        "required": [
          "id",
          "form",
          "submissionTimestamp",
          "formId"
        ]
      },
      "Contact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "description": "User's language as ISO 639-1 i.e. \"de\""
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "notes": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "The professional attributes the assistant researches, and a person edits.\n\nReal columns rather than ledger-only rows. Without them an accepted fact\nhad nowhere to live: it showed on the sheet but could not be corrected,\nsearched or exported, and `RecordFactService`'s \"a human outranks the\nmachine\" rule could never fire on a contact because there was no human\nvalue to find. A fact now writes through to these, and the ledger keeps the\nprovenance behind it."
          },
          "employer": {
            "type": "string"
          },
          "seniority": {
            "type": "string"
          },
          "function": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "photoKey": {
            "type": "string",
            "nullable": true,
            "description": "Storage key of our own copy of the contact's photo, in the public media\nbucket. A key, never a URL: `StorageService.publicUrl` builds the URL at\nread time, and LinkedIn's own image links expire within weeks."
          },
          "photoUrl": {
            "type": "string",
            "nullable": true,
            "description": "Built from `photoKey` by the reader that returns the contact. Not a column."
          },
          "linkedinProfile": {
            "type": "object",
            "nullable": true,
            "description": "The last LinkedIn profile fetched for this contact, shown on the record.\nReplaced whole on every fetch; the fact fields above keep their own\nprovenance in the ledger."
          },
          "tags": {
            "description": "Any tags. Should not allow having duplicates.\nAutomatic tags:\n\"Recurring\" - Contact with multiple bookings\n\"Optin\" - Contact has opted in in the past",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "accountOwner": {
            "description": "Account owner responsible for the contact.",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "accountOwnerId": {
            "type": "string"
          },
          "attendeeIds": {
            "description": "Attendee IDs that the contact originates from, in order\nto identify appointments. Not a relation for simplicity.\nEmpty if a booking never existed for the CRM Contact.\nIDs may not exist anymore (data could be deleted)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "noShowCount": {
            "type": "number",
            "description": "Count of appointments where this contact was marked as no-show.\nUsed to identify unreliable contacts across multiple bookings."
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "contactCompany": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactCompany"
              }
            ]
          },
          "contactCompanyId": {
            "type": "string",
            "deprecated": true
          },
          "crmCompany": {
            "description": "The CRM company this contact belongs to.\nThis is the new company model that replaces ContactCompany.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CrmCompany"
              }
            ]
          },
          "crmCompanyId": {
            "type": "string"
          },
          "additionalData": {
            "type": "object",
            "description": "Additional data for the contact that doesn't fit into predefined columns.\nStores:\n1. Form-submitted data where field name is not a direct column on Contact\n2. Numbered versions of data if a field matches a predefined column but already has a value\n   (e.g., if email is submitted and Contact.email exists, new value goes into additionalData.email1)"
          },
          "firstTouch": {
            "type": "object",
            "nullable": true
          },
          "formSubmissionLogs": {
            "description": "Form submissions associated with this contact",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormSubmissionLog"
            }
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "address",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "noShowCount"
        ]
      },
      "ContactItem": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/Contact"
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Appointment"
            }
          },
          "nextAppointmentIso": {
            "type": "string"
          }
        },
        "required": [
          "item",
          "appointments"
        ]
      },
      "PaginatedContacts": {
        "type": "object",
        "properties": {
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactItem"
            }
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "totalPages": {
            "type": "number"
          }
        },
        "required": [
          "result",
          "page",
          "limit",
          "total",
          "totalPages"
        ]
      },
      "AddressDto": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "maxLength": 255
          },
          "line2": {
            "type": "string",
            "maxLength": 255
          },
          "line3": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "zip": {
            "type": "string",
            "maxLength": 32
          },
          "country": {
            "type": "string",
            "maxLength": 255
          }
        }
      },
      "CreateContactDto": {
        "type": "object",
        "properties": {
          "additionalData": {
            "type": "object",
            "description": "Custom data field values keyed by DataField.name. See GET /data-field.",
            "additionalProperties": true
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "description": "The \"email or phoneNumber is required\" rule used to live here as a\n`@Validate(EmailOrPhoneConstraint)` on this property — where it could never\nfire. `@ValidateIf` skips EVERY validator on a property when its predicate\nis false, so the cross-field check ran only when `email` was already\npresent. `CrmService.createContact` enforces the (deliberately weaker) rule\ninstead; see the comment there.",
            "format": "email"
          },
          "phoneNumber": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string"
          },
          "crmCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "accountOwnerId": {
            "type": "string"
          },
          "address": {
            "description": "`UpdateContactDto` has always accepted an address, so a contact could be\ngiven one only after it existed. Creating one from the CRM meant saving,\nreopening it under Contacts, and editing — which read as the field being\nmissing entirely.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressDto"
              }
            ]
          }
        }
      },
      "UpdateContactDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "maxLength": 255
          },
          "lastName": {
            "type": "string",
            "maxLength": 255
          },
          "phoneNumber": {
            "type": "string",
            "maxLength": 64
          },
          "language": {
            "type": "string",
            "description": "ISO 639-1, e.g. \"de\".",
            "maxLength": 8
          },
          "address": {
            "$ref": "#/components/schemas/AddressDto"
          },
          "notes": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "The attributes the assistant researches, and a person corrects.\n\nEditable here so an accepted suggestion becomes a value somebody owns\nrather than a ledger row they can only accept or dismiss. Once a person\nedits one, `RecordFactService` treats it as human-owned and stops\noverwriting it."
          },
          "employer": {
            "type": "string"
          },
          "seniority": {
            "type": "string"
          },
          "function": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accountOwnerId": {
            "type": "string"
          },
          "contactCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true,
            "description": "Nullable on purpose: the client clears a contact's company by sending\nnull, so `@IsUUID` alone would reject the only way to unset it.",
            "format": "uuid"
          },
          "additionalData": {
            "type": "object",
            "description": "Partial map of custom data field values to merge into the contact's additionalData. Set a value to null to remove the key.",
            "additionalProperties": true
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "BulkContactDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phoneNumber": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string"
          },
          "accountOwnerEmail": {
            "type": "string",
            "description": "Email of a user in the same company who should be set as account owner.",
            "format": "email"
          },
          "meetingTypeRef": {
            "type": "string",
            "description": "Meeting type UUID or name within the same company."
          },
          "crmCompanyRef": {
            "type": "string",
            "description": "CrmCompany UUID or display name. Unknown names are auto-created so\nspreadsheet rows that introduce new companies don't fail the row."
          },
          "additionalData": {
            "type": "object",
            "description": "Arbitrary custom fields (UTM params, source data, ...) stored as additionalData."
          }
        }
      },
      "BulkCreateContactsDto": {
        "type": "object",
        "properties": {
          "contacts": {
            "maxItems": 1000,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkContactDto"
            }
          },
          "updateExisting": {
            "type": "boolean",
            "description": "When true, contacts whose email already exists are updated in place\ninstead of being skipped. Default false preserves the safe\n\"skip duplicates\" behavior."
          }
        },
        "required": [
          "contacts"
        ]
      },
      "BulkCreateResult": {
        "type": "object",
        "properties": {
          "created": {
            "type": "number",
            "description": "Newly inserted contacts."
          },
          "updated": {
            "type": "number",
            "description": "Existing contacts updated in place (only when updateExisting is true)."
          },
          "skipped": {
            "type": "number",
            "description": "Existing/duplicate contacts left untouched."
          },
          "failed": {
            "type": "number",
            "description": "Contacts that hit a technical error."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "created",
          "updated",
          "skipped",
          "failed"
        ]
      },
      "BulkDeleteContactsDto": {
        "type": "object",
        "properties": {
          "contactIds": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "contactIds"
        ]
      },
      "BulkDeleteResult": {
        "type": "object",
        "properties": {
          "requested": {
            "type": "number"
          },
          "deleted": {
            "type": "number"
          },
          "skipped": {
            "type": "number"
          }
        },
        "required": [
          "requested",
          "deleted",
          "skipped"
        ]
      },
      "PipelineStageDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "isWon": {
            "type": "boolean"
          },
          "isLost": {
            "type": "boolean"
          },
          "winProbability": {
            "type": "number"
          },
          "rottingDays": {
            "type": "number"
          },
          "requiredCustomFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "salesMilestone": {
            "nullable": true,
            "enum": [
              "start",
              "demo",
              "offer"
            ],
            "type": "string"
          },
          "pipelineId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "order",
          "isWon",
          "isLost",
          "winProbability",
          "pipelineId"
        ]
      },
      "PipelineDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string"
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PipelineStageDto"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "isDefault",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreatePipelineStageDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "color": {
            "type": "string",
            "maxLength": 20
          },
          "isWon": {
            "type": "boolean"
          },
          "isLost": {
            "type": "boolean"
          },
          "winProbability": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "rottingDays": {
            "type": "number"
          },
          "requiredCustomFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "salesMilestone": {
            "nullable": true,
            "description": "What entering this stage records for the Sales Learning report. `null`\nclears it, which is why it is nullable rather than merely optional.",
            "enum": [
              "start",
              "demo",
              "offer"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "color"
        ]
      },
      "CreatePipelineDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Optional: omitting it takes the standard name in the caller's language.\nThe default pipeline is no longer conjured behind a GET, so \"make me the\nusual one\" is a real request a client can send.",
            "maxLength": 100
          },
          "isDefault": {
            "type": "boolean"
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePipelineStageDto"
            }
          }
        }
      },
      "UpdatePipelineDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "isDefault": {
            "type": "boolean"
          }
        }
      },
      "ReorderStagesDto": {
        "type": "object",
        "properties": {
          "stageIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "stageIds"
        ]
      },
      "UpdatePipelineStageDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "color": {
            "type": "string",
            "maxLength": 20
          },
          "isWon": {
            "type": "boolean"
          },
          "isLost": {
            "type": "boolean"
          },
          "winProbability": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "rottingDays": {
            "type": "number"
          },
          "requiredCustomFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "salesMilestone": {
            "type": "string",
            "nullable": true,
            "description": "What entering this stage records for the Sales Learning report. `null`\nclears it, which is why it is nullable rather than merely optional.",
            "enum": [
              "start",
              "demo",
              "offer"
            ]
          }
        }
      },
      "CrmCustomFieldDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "textarea",
              "number",
              "currency",
              "date",
              "select",
              "multiselect",
              "checkbox"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "order": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "key",
          "label",
          "type",
          "required",
          "order"
        ]
      },
      "CrmCustomFieldsDto": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmCustomFieldDto"
            }
          }
        },
        "required": [
          "fields"
        ]
      },
      "UpdateCrmCustomFieldsDto": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmCustomFieldDto"
            }
          }
        },
        "required": [
          "fields"
        ]
      },
      "CreateTaskDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 10000
          },
          "type": {
            "enum": [
              "call",
              "email",
              "meeting",
              "follow_up",
              "todo"
            ],
            "type": "string"
          },
          "priority": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "dueDate": {
            "type": "string"
          },
          "reminderAt": {
            "type": "string"
          },
          "assigneeId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "dealId": {
            "type": "string"
          },
          "crmCompanyId": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "type",
          "dueDate"
        ]
      },
      "TaskDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "enum": [
              "call",
              "email",
              "meeting",
              "follow_up",
              "todo"
            ],
            "type": "string"
          },
          "priority": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "dueDate": {
            "format": "date-time",
            "type": "string"
          },
          "reminderAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "completed": {
            "type": "boolean"
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "assigneeId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "dealId": {
            "type": "string"
          },
          "crmCompanyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "isOverdue": {
            "type": "boolean"
          },
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "firstName",
              "lastName"
            ]
          },
          "deal": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "value": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "crmCompany": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "assignee": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "givenName": {
                "type": "string"
              },
              "familyName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "email"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "type",
          "priority",
          "dueDate",
          "completed",
          "assigneeId",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "TaskListDto": {
        "type": "object",
        "properties": {
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskDto"
            }
          },
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "totalPages": {
            "type": "number"
          }
        },
        "required": [
          "tasks",
          "total",
          "page",
          "limit",
          "totalPages"
        ]
      },
      "TaskSummaryDto": {
        "type": "object",
        "properties": {
          "totalTasks": {
            "type": "number"
          },
          "completedTasks": {
            "type": "number"
          },
          "overdueTasks": {
            "type": "number"
          },
          "dueTodayTasks": {
            "type": "number"
          },
          "dueThisWeekTasks": {
            "type": "number"
          },
          "byType": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "enum": [
                    "call",
                    "email",
                    "meeting",
                    "follow_up",
                    "todo"
                  ],
                  "type": "string"
                },
                "count": {
                  "type": "number"
                }
              },
              "required": [
                "type",
                "count"
              ]
            }
          },
          "byPriority": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "priority": {
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ],
                  "type": "string"
                },
                "count": {
                  "type": "number"
                }
              },
              "required": [
                "priority",
                "count"
              ]
            }
          }
        },
        "required": [
          "totalTasks",
          "completedTasks",
          "overdueTasks",
          "dueTodayTasks",
          "dueThisWeekTasks",
          "byType",
          "byPriority"
        ]
      },
      "UpdateTaskDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 10000
          },
          "type": {
            "type": "string",
            "enum": [
              "call",
              "email",
              "meeting",
              "follow_up",
              "todo"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "dueDate": {
            "type": "string"
          },
          "reminderAt": {
            "type": "string"
          },
          "assigneeId": {
            "type": "string"
          },
          "contactId": {
            "type": "string",
            "nullable": true
          },
          "dealId": {
            "type": "string",
            "nullable": true
          },
          "crmCompanyId": {
            "type": "string"
          }
        }
      },
      "MergeDealsDto": {
        "type": "object",
        "properties": {
          "duplicateDealIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "duplicateDealIds"
        ]
      },
      "CreateDealContactDto": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string"
          },
          "role": {
            "enum": [
              "primary",
              "decision_maker",
              "influencer",
              "user",
              "other"
            ],
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          }
        },
        "required": [
          "contactId"
        ]
      },
      "CreateDealDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "maxLength": 10
          },
          "expectedCloseDate": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "maxLength": 10000
          },
          "crmCompanyId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "pipelineId": {
            "type": "string"
          },
          "stageId": {
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "nullable": true,
            "description": "Account owner. Omit to default to the creating user; pass `null` to create\nthe deal with no account owner at all."
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateDealContactDto"
            }
          },
          "customFields": {
            "type": "object"
          }
        },
        "required": [
          "name",
          "pipelineId",
          "stageId"
        ]
      },
      "DealContactDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dealId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "role": {
            "enum": [
              "primary",
              "decision_maker",
              "influencer",
              "user",
              "other"
            ],
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phoneNumber": {
                "type": "string"
              },
              "photoUrl": {
                "type": "string",
                "nullable": true
              },
              "additionalData": {
                "type": "object"
              }
            },
            "required": [
              "id",
              "firstName",
              "lastName"
            ]
          }
        },
        "required": [
          "id",
          "dealId",
          "contactId",
          "role",
          "isPrimary",
          "createdAt"
        ]
      },
      "DealSignalDto": {
        "type": "object",
        "properties": {
          "healthScore": {
            "type": "number"
          },
          "healthBand": {
            "type": "object"
          },
          "daysInStage": {
            "type": "number"
          },
          "daysSinceLastActivity": {
            "type": "number"
          },
          "daysSinceLastInbound": {
            "type": "number",
            "nullable": true
          },
          "daysSinceLastOutbound": {
            "type": "number",
            "nullable": true
          },
          "followUpsSinceLastReply": {
            "type": "number"
          },
          "hasReplyEver": {
            "type": "boolean"
          },
          "inboundCount": {
            "type": "number"
          },
          "outboundCount": {
            "type": "number"
          },
          "meetingsBooked": {
            "type": "number"
          },
          "meetingsHeld": {
            "type": "number"
          },
          "openTaskCount": {
            "type": "number"
          },
          "overdueTaskCount": {
            "type": "number"
          },
          "computedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "healthScore",
          "healthBand",
          "daysInStage",
          "daysSinceLastActivity",
          "followUpsSinceLastReply",
          "hasReplyEver",
          "inboundCount",
          "outboundCount",
          "meetingsBooked",
          "meetingsHeld",
          "openTaskCount",
          "overdueTaskCount",
          "computedAt"
        ]
      },
      "DealDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "expectedCloseDate": {
            "format": "date-time",
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "crmCompanyId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "pipelineId": {
            "type": "string"
          },
          "stageId": {
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "string"
          },
          "lostReason": {
            "type": "string",
            "description": "Configurable per company, so a key rather than a fixed enum value."
          },
          "lostReasonNote": {
            "type": "string"
          },
          "wonReason": {
            "type": "string",
            "description": "The won-side mirror, configurable in the same way."
          },
          "wonReasonNote": {
            "type": "string"
          },
          "wonAt": {
            "format": "date-time",
            "type": "string"
          },
          "lostAt": {
            "format": "date-time",
            "type": "string"
          },
          "archivedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "enteredStageAt": {
            "format": "date-time",
            "type": "string"
          },
          "customFields": {
            "type": "object"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "winProbability": {
            "type": "number",
            "description": "The probability the deal is forecast with: its own override, else the stage's."
          },
          "winProbabilityOverride": {
            "type": "number",
            "nullable": true,
            "description": "The per-deal value when one is set; null means the stage's applies."
          },
          "crmCompany": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "iconUrl": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phoneNumber": {
                "type": "string"
              },
              "photoUrl": {
                "type": "string",
                "nullable": true
              },
              "additionalData": {
                "type": "object"
              }
            },
            "required": [
              "id",
              "firstName",
              "lastName"
            ]
          },
          "stage": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "isWon": {
                "type": "boolean"
              },
              "isLost": {
                "type": "boolean"
              },
              "winProbability": {
                "type": "number"
              },
              "rottingDays": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "name",
              "color",
              "isWon",
              "isLost",
              "winProbability"
            ]
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DealContactDto"
            }
          },
          "owner": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "givenName": {
                "type": "string"
              },
              "familyName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "email"
            ]
          },
          "isRotting": {
            "type": "boolean"
          },
          "signal": {
            "description": "Server-computed health signals from `crm_deal_signal`.\n\nPresent once the signal sweep has seen the deal. The board must render\n`signal.healthBand` rather than guessing from timestamps on the client, so\nthe badge, the workflow rules and Mira all agree on one answer.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DealSignalDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "pipelineId",
          "stageId",
          "companyId",
          "enteredStageAt",
          "createdAt",
          "updatedAt",
          "winProbability",
          "winProbabilityOverride"
        ]
      },
      "BulkImportDealRowDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phoneNumber": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string"
          },
          "accountOwnerEmail": {
            "type": "string",
            "description": "Email of a user in the same company who should be set as account owner.",
            "format": "email"
          },
          "meetingTypeRef": {
            "type": "string",
            "description": "Meeting type UUID or name within the same company."
          },
          "crmCompanyRef": {
            "type": "string",
            "description": "CrmCompany UUID or display name. Unknown names are auto-created so\nspreadsheet rows that introduce new companies don't fail the row."
          },
          "additionalData": {
            "type": "object",
            "description": "Arbitrary custom fields (UTM params, source data, ...) stored as additionalData."
          },
          "dealName": {
            "type": "string",
            "description": "Deal title. Falls back to the contact's name when absent.",
            "minLength": 1,
            "maxLength": 255
          },
          "dealValue": {
            "type": "number",
            "description": "Deal value in `dealCurrency`. The client parses the CSV cell to a number.",
            "minimum": 0
          },
          "dealCurrency": {
            "type": "string",
            "description": "ISO-4217 code. Defaults to EUR, matching a manually created deal.",
            "minLength": 3,
            "maxLength": 3
          },
          "dealExpectedCloseDate": {
            "type": "string",
            "description": "Expected close date as `YYYY-MM-DD`; the client normalizes CSV formats."
          },
          "dealOwnerEmail": {
            "type": "string",
            "description": "Email of a user in the same company who owns the deal. Unresolvable emails\nfall back to the importing user and are reported as an `owner_not_found`\nissue rather than failing the row.",
            "format": "email"
          },
          "dealNotes": {
            "type": "string",
            "description": "Deal notes. Distinct from the contact's own `notes` column. Imported as a\nnote on the deal's notes timeline, which is the only notes surface the deal\ndetail shows."
          }
        }
      },
      "BulkImportDealsDto": {
        "type": "object",
        "properties": {
          "rows": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkImportDealRowDto"
            }
          },
          "pipelineId": {
            "type": "string"
          },
          "stageId": {
            "type": "string"
          },
          "updateExisting": {
            "type": "boolean",
            "description": "When true, contacts whose email already exists are updated in place. A deal\nis created for every row regardless, matching how Pipedrive/HubSpot import\ndeals (contacts dedupe by email, deals are never deduplicated)."
          }
        },
        "required": [
          "rows",
          "pipelineId",
          "stageId"
        ]
      },
      "BulkImportDealsResult": {
        "type": "object",
        "properties": {
          "contactsCreated": {
            "type": "number",
            "description": "Newly inserted contacts."
          },
          "contactsUpdated": {
            "type": "number",
            "description": "Existing contacts updated in place (only when updateExisting is true)."
          },
          "contactsSkipped": {
            "type": "number",
            "description": "Existing contacts left untouched (a deal is still created for them)."
          },
          "dealsCreated": {
            "type": "number",
            "description": "Deals created in the target pipeline stage."
          },
          "dealsSkipped": {
            "type": "number",
            "description": "Deals not created because the plan deal limit was reached."
          },
          "failed": {
            "type": "number",
            "description": "Rows that hit a technical error (contact or deal)."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "contactsCreated",
          "contactsUpdated",
          "contactsSkipped",
          "dealsCreated",
          "dealsSkipped",
          "failed"
        ]
      },
      "DealListDto": {
        "type": "object",
        "properties": {
          "deals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DealDto"
            }
          },
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "totalPages": {
            "type": "number"
          }
        },
        "required": [
          "deals",
          "total",
          "page",
          "limit",
          "totalPages"
        ]
      },
      "DealSummaryDto": {
        "type": "object",
        "properties": {
          "totalDeals": {
            "type": "number"
          },
          "totalValue": {
            "type": "number"
          },
          "weightedForecast": {
            "type": "number"
          },
          "openDeals": {
            "type": "number"
          },
          "wonDeals": {
            "type": "number"
          },
          "lostDeals": {
            "type": "number"
          },
          "currencies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "currency": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                }
              },
              "required": [
                "currency",
                "count"
              ]
            }
          },
          "displayCurrency": {
            "type": "string",
            "description": "Majority currency across the summarized deals, for formatting the\naggregate totals. Additive: older clients ignore it."
          },
          "byStage": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stageId": {
                  "type": "string"
                },
                "stageName": {
                  "type": "string"
                },
                "stageColor": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                },
                "value": {
                  "type": "number"
                },
                "weightedValue": {
                  "type": "number"
                }
              },
              "required": [
                "stageId",
                "stageName",
                "stageColor",
                "count",
                "value",
                "weightedValue"
              ]
            }
          }
        },
        "required": [
          "totalDeals",
          "totalValue",
          "weightedForecast",
          "openDeals",
          "wonDeals",
          "lostDeals",
          "currencies",
          "displayCurrency",
          "byStage"
        ]
      },
      "UpdateDealDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "maxLength": 10
          },
          "expectedCloseDate": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "maxLength": 10000
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true
          },
          "contactId": {
            "type": "string",
            "nullable": true
          },
          "stageId": {
            "type": "string"
          },
          "winProbability": {
            "type": "number",
            "nullable": true,
            "description": "Win probability for this deal only, 0-100. `null` returns the deal to its\nstage's value. Sent together with a stage change it applies to the new\nstage, since the move itself clears any earlier override.",
            "minimum": 0,
            "maximum": 100
          },
          "ownerId": {
            "type": "string",
            "nullable": true,
            "description": "`null` clears the account owner, leaving the deal unassigned."
          },
          "customFields": {
            "type": "object"
          }
        }
      },
      "MarkDealAsWonDto": {
        "type": "object",
        "properties": {
          "wonStageId": {
            "type": "string"
          },
          "wonReason": {
            "type": "string",
            "description": "Optional here and checked in the service. See {@link MarkDealAsLostDto}.",
            "maxLength": 64
          },
          "wonReasonNote": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "MarkDealAsLostDto": {
        "type": "object",
        "properties": {
          "lostReason": {
            "type": "string",
            "description": "Optional here and checked in the service: whether a reason is mandatory is\na per-company setting, so the DTO cannot know. Not `@IsEnum` either, since\ncompanies configure their own reasons.",
            "maxLength": 64
          },
          "lostReasonNote": {
            "type": "string",
            "maxLength": 1000
          },
          "lostStageId": {
            "type": "string"
          }
        }
      },
      "ReopenDealDto": {
        "type": "object",
        "properties": {
          "stageId": {
            "type": "string"
          }
        }
      },
      "UpdateDealContactDto": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "primary",
              "decision_maker",
              "influencer",
              "user",
              "other"
            ]
          },
          "isPrimary": {
            "type": "boolean"
          }
        }
      },
      "DealActivityDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dealId": {
            "type": "string"
          },
          "activityType": {
            "type": "string"
          },
          "fromStageId": {
            "type": "string"
          },
          "fromStageName": {
            "type": "string"
          },
          "toStageId": {
            "type": "string"
          },
          "toStageName": {
            "type": "string"
          },
          "changedById": {
            "type": "string",
            "nullable": true,
            "description": "Null when automation changed a deal that has no account owner."
          },
          "changedByName": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "recordingSessionId": {
            "type": "string",
            "description": "The recording of the meeting this row is about, when the reader may open\none. Absent on every row that is not a meeting."
          },
          "changedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "dealId",
          "activityType",
          "changedAt"
        ]
      },
      "CreateCrmCompanyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "domain": {
            "type": "string",
            "maxLength": 255
          },
          "industry": {
            "type": "string",
            "maxLength": 100
          },
          "size": {
            "type": "string",
            "enum": [
              "1-10",
              "11-50",
              "51-200",
              "201-500",
              "501-1000",
              "1001+"
            ]
          },
          "website": {
            "type": "string",
            "maxLength": 500
          },
          "phoneNumber": {
            "type": "string",
            "maxLength": 50
          },
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 255
          },
          "addressCity": {
            "type": "string",
            "maxLength": 100
          },
          "addressZip": {
            "type": "string",
            "maxLength": 20
          },
          "addressCountry": {
            "type": "string",
            "maxLength": 100
          },
          "notes": {
            "type": "string",
            "maxLength": 10000
          },
          "ownerId": {
            "type": "string"
          },
          "customFields": {
            "type": "object",
            "description": "Values for the company custom fields configured under\n`GET /crm/settings/custom-fields?recordType=company`, keyed by field key.\nOn update this is a patch: keys you do not send are left alone, and a key\nsent as `null` is removed."
          }
        },
        "required": [
          "name"
        ]
      },
      "CrmCompanyDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "size": {
            "enum": [
              "1-10",
              "11-50",
              "51-200",
              "201-500",
              "501-1000",
              "1001+"
            ],
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string",
            "description": "Cached brand mark, so lists can anchor on the company's own logo."
          },
          "phoneNumber": {
            "type": "string"
          },
          "address": {
            "type": "object",
            "properties": {
              "line1": {
                "type": "string"
              },
              "line2": {
                "type": "string"
              },
              "line3": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "notes": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "What the company publishes about itself. Never the seller's own `notes`."
          },
          "ownerId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "customFields": {
            "type": "object"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "owner": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "givenName": {
                "type": "string"
              },
              "familyName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "email"
            ]
          },
          "contactsCount": {
            "type": "number"
          },
          "dealsCount": {
            "type": "number"
          },
          "totalDealsValue": {
            "type": "number"
          },
          "totalDealsCurrency": {
            "type": "string",
            "description": "Majority deal currency behind `totalDealsValue`. Additive: older clients\nignore it and keep their display fallback."
          }
        },
        "required": [
          "id",
          "name",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "CrmCompanyListDto": {
        "type": "object",
        "properties": {
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmCompanyDto"
            }
          },
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "totalPages": {
            "type": "number"
          }
        },
        "required": [
          "result",
          "total",
          "page",
          "limit",
          "totalPages"
        ]
      },
      "CrmCompanySummaryDto": {
        "type": "object",
        "properties": {
          "totalCompanies": {
            "type": "number"
          },
          "totalDealsValue": {
            "type": "number"
          },
          "companiesWithDeals": {
            "type": "number"
          },
          "byIndustry": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "industry": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                }
              },
              "required": [
                "industry",
                "count"
              ]
            }
          },
          "bySize": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "size": {
                  "enum": [
                    "1-10",
                    "11-50",
                    "51-200",
                    "201-500",
                    "501-1000",
                    "1001+"
                  ],
                  "type": "string"
                },
                "count": {
                  "type": "number"
                }
              },
              "required": [
                "size",
                "count"
              ]
            }
          }
        },
        "required": [
          "totalCompanies",
          "totalDealsValue",
          "companiesWithDeals",
          "byIndustry",
          "bySize"
        ]
      },
      "UpdateCrmCompanyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "domain": {
            "type": "string",
            "maxLength": 255
          },
          "industry": {
            "type": "string",
            "maxLength": 100
          },
          "size": {
            "type": "string",
            "enum": [
              "1-10",
              "11-50",
              "51-200",
              "201-500",
              "501-1000",
              "1001+"
            ]
          },
          "website": {
            "type": "string",
            "maxLength": 500
          },
          "phoneNumber": {
            "type": "string",
            "maxLength": 50
          },
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 255
          },
          "addressCity": {
            "type": "string",
            "maxLength": 100
          },
          "addressZip": {
            "type": "string",
            "maxLength": 20
          },
          "addressCountry": {
            "type": "string",
            "maxLength": 100
          },
          "notes": {
            "type": "string",
            "maxLength": 10000
          },
          "ownerId": {
            "type": "string"
          },
          "customFields": {
            "type": "object",
            "description": "Values for the company custom fields configured under\n`GET /crm/settings/custom-fields?recordType=company`, keyed by field key.\nOn update this is a patch: keys you do not send are left alone, and a key\nsent as `null` is removed."
          }
        }
      },
      "CreateCrmNoteDto": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Rich text content (HTML supported)"
          },
          "isPinned": {
            "type": "boolean",
            "description": "Pin the note to the top"
          },
          "dealId": {
            "type": "string",
            "description": "Deal ID to attach the note to"
          },
          "contactId": {
            "type": "string",
            "description": "Contact ID to attach the note to"
          },
          "crmCompanyId": {
            "type": "string",
            "description": "CRM Company ID to attach the note to"
          }
        },
        "required": [
          "content"
        ]
      },
      "CrmNoteDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "isPinned": {
            "type": "boolean"
          },
          "dealId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "crmCompanyId": {
            "type": "string"
          },
          "authorId": {
            "type": "string"
          },
          "authorName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "content",
          "isPinned",
          "authorId",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateCrmNoteDto": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Rich text content (HTML supported)"
          },
          "isPinned": {
            "type": "boolean",
            "description": "Pin the note to the top"
          }
        }
      },
      "CreateCrmAttachmentDto": {
        "type": "object",
        "properties": {
          "fileAssetId": {
            "type": "string",
            "description": "File asset ID from the file upload system"
          },
          "description": {
            "type": "string",
            "description": "Description/label for the attachment"
          },
          "dealId": {
            "type": "string",
            "description": "Deal ID to attach the file to"
          },
          "contactId": {
            "type": "string",
            "description": "Contact ID to attach the file to"
          },
          "crmCompanyId": {
            "type": "string",
            "description": "CRM Company ID to attach the file to"
          }
        },
        "required": [
          "fileAssetId"
        ]
      },
      "CrmAttachmentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "file",
              "link"
            ],
            "description": "A link carries its title in filename/originalFilename, mimeType text/uri-list, sizeBytes 0 and an empty fileAssetId"
          },
          "url": {
            "type": "string",
            "description": "Set for links only"
          },
          "description": {
            "type": "string"
          },
          "fileAssetId": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "originalFilename": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "number"
          },
          "dealId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "crmCompanyId": {
            "type": "string"
          },
          "uploadedById": {
            "type": "string"
          },
          "uploadedByName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "fileAssetId",
          "filename",
          "originalFilename",
          "mimeType",
          "sizeBytes",
          "createdAt"
        ]
      },
      "UpdateCrmAttachmentDto": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Description/label for the attachment"
          }
        }
      },
      "CreateCrmCommunicationDto": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "call",
              "email",
              "sms",
              "whatsapp"
            ],
            "type": "string"
          },
          "direction": {
            "enum": [
              "inbound",
              "outbound"
            ],
            "type": "string"
          },
          "subject": {
            "type": "string",
            "description": "Subject line (for emails)"
          },
          "body": {
            "type": "string",
            "description": "Body/notes about the communication"
          },
          "durationSeconds": {
            "type": "number",
            "minimum": 0,
            "description": "Duration in seconds (for calls)"
          },
          "outcome": {
            "enum": [
              "connected",
              "voicemail",
              "no_answer",
              "busy"
            ],
            "type": "string",
            "description": "Outcome (for calls)"
          },
          "occurredAt": {
            "type": "string",
            "description": "When the communication occurred"
          },
          "externalId": {
            "type": "string",
            "description": "External ID (email thread ID, etc.)"
          },
          "dealId": {
            "type": "string",
            "description": "Deal ID to attach the communication to"
          },
          "contactId": {
            "type": "string",
            "description": "Contact ID to attach the communication to"
          },
          "crmCompanyId": {
            "type": "string",
            "description": "CRM Company ID to attach the communication to"
          }
        },
        "required": [
          "type",
          "direction"
        ]
      },
      "CrmCommunicationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "enum": [
              "call",
              "email",
              "sms",
              "whatsapp"
            ],
            "type": "string"
          },
          "direction": {
            "enum": [
              "inbound",
              "outbound"
            ],
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "number"
          },
          "outcome": {
            "enum": [
              "connected",
              "voicemail",
              "no_answer",
              "busy"
            ],
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "dealId": {
            "type": "string"
          },
          "contactId": {
            "type": "string"
          },
          "crmCompanyId": {
            "type": "string"
          },
          "loggedById": {
            "type": "string"
          },
          "loggedByName": {
            "type": "string"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "direction",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateCrmCommunicationDto": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "call",
              "email",
              "sms",
              "whatsapp"
            ],
            "type": "string"
          },
          "direction": {
            "enum": [
              "inbound",
              "outbound"
            ],
            "type": "string"
          },
          "subject": {
            "type": "string",
            "description": "Subject line (for emails)"
          },
          "body": {
            "type": "string",
            "description": "Body/notes about the communication"
          },
          "durationSeconds": {
            "type": "number",
            "minimum": 0,
            "description": "Duration in seconds (for calls)"
          },
          "outcome": {
            "enum": [
              "connected",
              "voicemail",
              "no_answer",
              "busy"
            ],
            "type": "string",
            "description": "Outcome (for calls)"
          },
          "occurredAt": {
            "type": "string",
            "description": "When the communication occurred"
          }
        }
      },
      "DuplicateContactDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "photoUrl": {
            "type": "string"
          },
          "crmCompanyName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "bookingsCount": {
            "type": "number",
            "description": "Number of bookings for this contact"
          },
          "dealsCount": {
            "type": "number",
            "description": "Number of deals linked to this contact"
          },
          "notesCount": {
            "type": "number",
            "description": "Number of notes on this contact"
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "createdAt",
          "bookingsCount",
          "dealsCount",
          "notesCount"
        ]
      },
      "DuplicateGroupDto": {
        "type": "object",
        "properties": {
          "matchField": {
            "type": "object",
            "description": "The field that matches (email, phone, or first and last name)"
          },
          "matchValue": {
            "type": "string",
            "description": "The matching value"
          },
          "matchCompany": {
            "type": "string",
            "description": "For name matches, the company the contacts share"
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DuplicateContactDto"
            }
          }
        },
        "required": [
          "matchField",
          "matchValue",
          "contacts"
        ]
      },
      "FindDuplicatesResponseDto": {
        "type": "object",
        "properties": {
          "duplicates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DuplicateGroupDto"
            }
          },
          "totalGroups": {
            "type": "number"
          }
        },
        "required": [
          "duplicates",
          "totalGroups"
        ]
      },
      "MergeContactsDto": {
        "type": "object",
        "properties": {
          "primaryContactId": {
            "type": "string",
            "description": "ID of the contact to keep (primary)"
          },
          "secondaryContactIds": {
            "description": "IDs of the contacts to merge into the primary",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "firstName": {
            "type": "string",
            "description": "Optional: Override first name from secondary"
          },
          "lastName": {
            "type": "string",
            "description": "Optional: Override last name from secondary"
          },
          "email": {
            "type": "string",
            "description": "Optional: Override email from secondary"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Optional: Override phone number from secondary"
          }
        },
        "required": [
          "primaryContactId",
          "secondaryContactIds"
        ]
      },
      "MergeResultDto": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phoneNumber": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "firstName",
              "lastName"
            ]
          },
          "mergedCount": {
            "type": "number",
            "description": "Number of contacts merged"
          },
          "transferred": {
            "type": "object",
            "properties": {
              "deals": {
                "type": "number"
              },
              "notes": {
                "type": "number"
              },
              "attachments": {
                "type": "number"
              },
              "tasks": {
                "type": "number"
              },
              "attendeeIds": {
                "type": "number"
              }
            },
            "required": [
              "deals",
              "notes",
              "attachments",
              "tasks",
              "attendeeIds"
            ]
          }
        },
        "required": [
          "contact",
          "mergedCount",
          "transferred"
        ]
      },
      "ContactActivityOwnerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ContactActivityDealDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ContactActivityItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "meeting",
              "email",
              "form",
              "note",
              "task",
              "communication",
              "conversation"
            ]
          },
          "source": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/ContactActivityOwnerDto"
          },
          "deal": {
            "$ref": "#/components/schemas/ContactActivityDealDto"
          },
          "recordingSessionId": {
            "type": "string",
            "description": "The recording of this meeting, when the reader may open one."
          }
        },
        "required": [
          "id",
          "type",
          "source",
          "occurredAt",
          "title"
        ]
      },
      "ContactActivityResponseDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactActivityItemDto"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "hasMore"
        ]
      },
      "ImapConnectionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "type": "number"
          },
          "secure": {
            "type": "boolean"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "smtpHost": {
            "type": "string",
            "nullable": true,
            "description": "Present when this mailbox may also send."
          },
          "lastError": {
            "type": "string",
            "nullable": true,
            "description": "Last failure, so a rotated password is visible instead of silent."
          },
          "lastErrorAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastSyncedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "host",
          "port",
          "secure",
          "username",
          "email",
          "isActive",
          "smtpHost",
          "lastError",
          "lastErrorAt",
          "lastSyncedAt",
          "createdAt"
        ]
      },
      "MailboxProvider": {
        "type": "string",
        "enum": [
          "imap",
          "google",
          "microsoft"
        ]
      },
      "ConnectedMailboxDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MailboxProvider"
              }
            ]
          },
          "email": {
            "type": "string"
          },
          "canReadMail": {
            "type": "boolean",
            "description": "Whether the connection currently holds the scope needed to read mail.\n\nFalse is the interesting case: a Google account connected for Calendar\nonly is present but cannot be synced, and the fix is to grant mail access,\nnot to connect a second mailbox over IMAP."
          },
          "canSendMail": {
            "type": "boolean",
            "description": "Whether Mira's follow-ups may go out from this address."
          },
          "removable": {
            "type": "boolean",
            "description": "Only IMAP mailboxes are removed here; the others are OAuth integrations."
          },
          "lastSyncedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "provider",
          "email",
          "canReadMail",
          "canSendMail",
          "removable",
          "lastSyncedAt",
          "lastError"
        ]
      },
      "UpsertImapConnectionDto": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "example": "imap.fastmail.com"
          },
          "port": {
            "type": "number",
            "minimum": 1,
            "maximum": 65535,
            "example": 993
          },
          "secure": {
            "type": "boolean",
            "description": "Implicit TLS (993). False means STARTTLS on 143.",
            "example": true
          },
          "username": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "writeOnly": true
          },
          "email": {
            "type": "string",
            "description": "The address this mailbox sends as, used to tell inbound from outbound.",
            "maxLength": 320,
            "format": "email"
          },
          "smtpHost": {
            "type": "string",
            "description": "SMTP submission, optional.\n\nReading and sending are separate grants: someone may want Mira to see\nreplies without letting her send from their mailbox. Omitting the host\nleaves the connection read-only.",
            "maxLength": 255
          },
          "smtpPort": {
            "type": "number",
            "minimum": 1,
            "maximum": 65535
          },
          "smtpSecure": {
            "type": "boolean"
          }
        },
        "required": [
          "host",
          "port",
          "secure",
          "username",
          "password",
          "email"
        ]
      },
      "TestImapConnectionResultDto": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "error": {
            "type": "string",
            "description": "A description safe to show the user — never the raw IMAP error."
          }
        },
        "required": [
          "ok"
        ]
      },
      "AvailabilityExceptionDto": {
        "type": "object",
        "properties": {
          "ownerId": {
            "type": "string"
          },
          "ownerType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailabilityExceptionOwner"
              }
            ]
          },
          "available": {
            "type": "boolean"
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "number"
          }
        },
        "required": [
          "ownerId",
          "ownerType",
          "available",
          "start",
          "end",
          "createdAt",
          "id"
        ]
      },
      "AvailabilityDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "schedule": {
            "$ref": "#/components/schemas/WeeklySchedule"
          },
          "timezone": {
            "type": "string"
          },
          "availabilityExceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityExceptionDto"
            }
          },
          "isDefault": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string"
          },
          "useExplicitAvailability": {
            "type": "boolean",
            "description": "When enabled, only calendar events with the specified title will be used as available slots."
          },
          "explicitAvailabilityEventTitle": {
            "type": "string",
            "nullable": true,
            "description": "The calendar event title to look for when useExplicitAvailability is enabled."
          },
          "ownerName": {
            "type": "string",
            "description": "Owner of the schedule"
          },
          "scheduleSource": {
            "type": "object",
            "description": "'manual' or 'outlook'"
          },
          "scheduleSourceEmail": {
            "type": "string",
            "description": "Mailbox feeding the schedule; set only where the connection relation is loaded."
          },
          "scheduleSyncedAt": {
            "type": "string",
            "nullable": true,
            "description": "Last time Outlook was consulted"
          },
          "scheduleSyncError": {
            "type": "object",
            "nullable": true,
            "description": "'no_working_hours', 'unmapped_timezone', 'reauth_required', 'graph_error' or 'connection_removed'"
          }
        },
        "required": [
          "id",
          "name",
          "schedule",
          "timezone",
          "availabilityExceptions",
          "isDefault",
          "createdAt",
          "scheduleSource"
        ]
      },
      "AvailabilityPerUserDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityDto"
            }
          }
        },
        "required": [
          "userId",
          "items"
        ]
      },
      "BulkHolidayExceptionsDto": {
        "type": "object",
        "properties": {
          "userIds": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "year": {
            "type": "number",
            "minimum": 2025,
            "maximum": 2027
          },
          "germanState": {
            "enum": [
              "BW",
              "BY",
              "ST",
              "MV",
              "BE",
              "BB",
              "HE",
              "NW",
              "RP",
              "SL",
              "SN",
              "TH",
              "SH",
              "HH",
              "NI",
              "HB"
            ],
            "type": "string"
          },
          "country": {
            "enum": [
              "DE",
              "AT",
              "BE",
              "CA",
              "DK",
              "NL",
              "EE",
              "FI",
              "FR",
              "IT",
              "NZ",
              "ES",
              "SE",
              "CH",
              "US"
            ],
            "type": "string"
          }
        },
        "required": [
          "userIds",
          "year",
          "country"
        ]
      },
      "ApplyAvailabilityToUsersDto": {
        "type": "object",
        "properties": {
          "userIds": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "setAsDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "userIds"
        ]
      },
      "CreateAvailabilityExceptionDto": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "availabilityId": {
            "type": "string",
            "description": "Optional availability id, if not provided uses default availability."
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "available",
          "start",
          "end"
        ]
      },
      "CreateAvailabilityDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "schedule": {
            "description": "Weekly recurring schedule. If omitted, defaults to all days disabled (useful for exceptions-only availability).",
            "allOf": [
              {
                "$ref": "#/components/schemas/WeeklySchedule"
              }
            ]
          },
          "timezone": {
            "type": "string"
          },
          "exceptions": {
            "description": "Availability exceptions for specific datetime ranges.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateAvailabilityExceptionDto"
            }
          }
        },
        "required": [
          "name",
          "timezone"
        ]
      },
      "CreateHolidayExpectionsDto": {
        "type": "object",
        "properties": {
          "year": {
            "type": "number",
            "minimum": 2025,
            "maximum": 2027
          },
          "germanState": {
            "enum": [
              "BW",
              "BY",
              "ST",
              "MV",
              "BE",
              "BB",
              "HE",
              "NW",
              "RP",
              "SL",
              "SN",
              "TH",
              "SH",
              "HH",
              "NI",
              "HB"
            ],
            "type": "string"
          },
          "country": {
            "enum": [
              "DE",
              "AT",
              "BE",
              "CA",
              "DK",
              "NL",
              "EE",
              "FI",
              "FR",
              "IT",
              "NZ",
              "ES",
              "SE",
              "CH",
              "US"
            ],
            "type": "string"
          }
        },
        "required": [
          "year",
          "country"
        ]
      },
      "PartialWeeklySchedule": {
        "type": "object",
        "properties": {
          "monday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "tuesday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "wednesday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "thursday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "friday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "saturday": {
            "$ref": "#/components/schemas/DaySchedule"
          },
          "sunday": {
            "$ref": "#/components/schemas/DaySchedule"
          }
        },
        "required": [
          "monday",
          "tuesday",
          "wednesday",
          "thursday",
          "friday",
          "saturday",
          "sunday"
        ]
      },
      "UpdateAvailabilityDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "schedule": {
            "$ref": "#/components/schemas/PartialWeeklySchedule"
          },
          "timezone": {
            "type": "string"
          },
          "useExplicitAvailability": {
            "type": "boolean"
          },
          "explicitAvailabilityEventTitle": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WhatsappUsageCategoryDto": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "example": "utility",
            "enum": [
              "marketing",
              "utility",
              "authentication",
              "service",
              "other"
            ]
          },
          "billableCount": {
            "type": "number",
            "description": "Messages Meta charged for.",
            "example": 412
          },
          "freeCount": {
            "type": "number",
            "description": "Messages with no Meta charge reported, including callbacks with unknown billability.",
            "example": 156
          }
        },
        "required": [
          "category",
          "billableCount",
          "freeCount"
        ]
      },
      "WhatsappUsageEstimateDto": {
        "type": "object",
        "properties": {
          "currentCostEur": {
            "type": "number",
            "description": "Estimated Meta cost for this usage under current pricing.",
            "example": 24.51
          },
          "projectedCostEur": {
            "type": "number",
            "description": "Estimated Meta cost for the same usage once the October change applies.",
            "example": 31.62
          },
          "increaseCostEur": {
            "type": "number",
            "description": "projectedCostEur minus currentCostEur.",
            "example": 7.11
          },
          "newlyBillableCount": {
            "type": "number",
            "description": "Estimated additional charged messages under October pricing, after monthly service allowances and free entry point exemptions.",
            "example": 156
          },
          "uncostedCount": {
            "type": "number",
            "description": "Messages that cannot be priced because a rate or required billing context is missing. Excluded from cost figures.",
            "example": 0
          }
        },
        "required": [
          "currentCostEur",
          "projectedCostEur",
          "increaseCostEur",
          "newlyBillableCount",
          "uncostedCount"
        ]
      },
      "WhatsappUsageMonthDto": {
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "First day of the month, UTC.",
            "example": "2026-07-01"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappUsageCategoryDto"
            }
          },
          "estimate": {
            "$ref": "#/components/schemas/WhatsappUsageEstimateDto"
          }
        },
        "required": [
          "month",
          "categories",
          "estimate"
        ]
      },
      "WhatsappRateCardDto": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "example": "EUR"
          },
          "asOf": {
            "type": "string",
            "description": "Date these rates were recorded.",
            "example": "2026-08-14"
          },
          "confirmed": {
            "type": "boolean",
            "description": "False while the rates are indicative. Clients must label derived costs as estimates when this is false.",
            "example": false
          },
          "source": {
            "type": "string",
            "description": "Where the rates came from."
          },
          "perMessageEur": {
            "type": "object",
            "description": "Rate per message in EUR, keyed by category.",
            "example": {
              "utility": 0.0456,
              "marketing": 0.1131,
              "authentication": 0.0456
            }
          }
        },
        "required": [
          "currency",
          "asOf",
          "confirmed",
          "source",
          "perMessageEur"
        ]
      },
      "WhatsappUsageDto": {
        "type": "object",
        "properties": {
          "months": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappUsageMonthDto"
            }
          },
          "total": {
            "description": "Totals across the whole requested window.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappUsageEstimateDto"
              }
            ]
          },
          "totalBillableCount": {
            "type": "number",
            "description": "Total messages Meta charged for in the window."
          },
          "totalFreeCount": {
            "type": "number",
            "description": "Total messages Meta processed free in the window."
          },
          "rateCard": {
            "$ref": "#/components/schemas/WhatsappRateCardDto"
          },
          "meteringStartedAt": {
            "type": "string",
            "nullable": true,
            "description": "When usage metering first recorded a message for this company. Null when nothing has been metered yet. Anything before this date reads as zero because it was never measured, not because no messages were sent, and clients must say so.",
            "example": "2026-08-14T09:12:44.000Z"
          }
        },
        "required": [
          "months",
          "total",
          "totalBillableCount",
          "totalFreeCount",
          "rateCard"
        ]
      },
      "ConversationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "contactPhone": {
            "type": "string",
            "nullable": true,
            "description": "Remote WhatsApp number in E.164 format. Null when the contact has adopted a WhatsApp username and withheld their phone; use `senderId`."
          },
          "senderId": {
            "type": "string",
            "nullable": true,
            "description": "Business-Scoped User ID (BSUID), the stable identity for the contact across phone and username changes."
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "WhatsApp @username the contact has adopted, when they have one."
          },
          "contactName": {
            "type": "string",
            "description": "Contact name from WhatsApp profile"
          },
          "contactId": {
            "type": "string",
            "description": "Linked CRM contact ID"
          },
          "linkedContactName": {
            "type": "string",
            "description": "Display name of the linked CRM contact, when the conversation is linked. Independent of `contactName` (the WhatsApp profile name) so the inbox can show who the contact actually is rather than their WhatsApp display name."
          },
          "lastMessageAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastMessagePreview": {
            "type": "string"
          },
          "lastMessageDirection": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "windowExpiresAt": {
            "format": "date-time",
            "type": "string",
            "description": "24h window expiry timestamp"
          },
          "windowOpen": {
            "type": "boolean",
            "description": "Whether the 24h window is currently open"
          },
          "unreadCount": {
            "type": "number"
          },
          "labels": {
            "description": "Conversation labels for categorization",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "description": "Internal agent-only notes",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignedUserId": {
            "type": "string",
            "nullable": true,
            "description": "User the conversation is assigned to. Null = unassigned."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "snoozed",
              "done"
            ],
            "description": "Lifecycle status. `snoozed` and `done` both remove the conversation from the active inbox."
          },
          "snoozedUntil": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When `status` is `snoozed`, the timestamp it reopens at. Null otherwise."
          },
          "priority": {
            "type": "string",
            "description": "Priority level. Two deliberate levels, not five. Null = unset.",
            "enum": [
              "urgent",
              "high"
            ],
            "nullable": true
          },
          "blockedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When set, inbound messages are retained but do not reopen the conversation or trigger inbox side effects."
          },
          "blockedByUserId": {
            "type": "string",
            "nullable": true,
            "description": "Dashboard user who blocked the conversation."
          },
          "blockReason": {
            "type": "string",
            "nullable": true,
            "description": "Machine-readable block reason.",
            "enum": [
              "spam"
            ]
          },
          "miraState": {
            "type": "object",
            "nullable": true,
            "description": "Conversation-specific Mira runtime state: mode, draft, pause reason, pending booking, and last decision."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "lastMessageAt",
          "lastMessageDirection",
          "windowOpen",
          "unreadCount",
          "status",
          "createdAt"
        ]
      },
      "ConversationListDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "description": "Cursor for next page (lastMessageAt of last item)"
          }
        },
        "required": [
          "data"
        ]
      },
      "MessageDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "waMessageId": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "type": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "mediaUrl": {
            "type": "string"
          },
          "mediaMimeType": {
            "type": "string"
          },
          "mediaFilename": {
            "type": "string"
          },
          "transcription": {
            "type": "string",
            "description": "Speech-to-text of a voice message, when one has been made."
          },
          "transcriptionStatus": {
            "type": "string",
            "description": "Why a voice message has no transcript yet. Absent on messages that are not voice messages.",
            "enum": [
              "pending",
              "done",
              "failed",
              "budget_exhausted"
            ]
          },
          "templateName": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sent",
              "delivered",
              "read",
              "failed"
            ]
          },
          "errorMessage": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "sentByUserId": {
            "type": "string",
            "description": "User ID of the dashboard user who sent this outbound message"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "waMessageId",
          "direction",
          "type",
          "status",
          "createdAt"
        ]
      },
      "MessageListDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "description": "Cursor for next page (createdAt of last item)"
          }
        },
        "required": [
          "data"
        ]
      },
      "SendTextMessageDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 4096,
            "description": "Message text content",
            "example": "Hello! How can I help you?"
          },
          "replyToMessageId": {
            "type": "string",
            "format": "uuid",
            "description": "Internal message ID to reply to (quote)"
          }
        },
        "required": [
          "text"
        ]
      },
      "SendTemplateMessageDto": {
        "type": "object",
        "properties": {
          "templateName": {
            "type": "string",
            "description": "Template name",
            "example": "appointment_reminder"
          },
          "language": {
            "type": "string",
            "description": "Template language code",
            "example": "en_US"
          },
          "params": {
            "description": "Positional variable values for template placeholders",
            "example": [
              "John",
              "2025-07-01 at 10:00"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "buttonUrlParams": {
            "type": "object",
            "description": "Button URL dynamic suffixes keyed by button index",
            "example": {
              "0": "/cancel/abc123"
            }
          }
        },
        "required": [
          "templateName",
          "language"
        ]
      },
      "SendMediaMessageDto": {
        "type": "object",
        "properties": {
          "mediaUrl": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "HTTPS URL of the media to send. Must be publicly reachable by WhatsApp — typically an S3 presigned URL. HTTP is rejected."
          },
          "mediaMimeType": {
            "type": "string",
            "description": "MIME type of the media",
            "example": "image/jpeg"
          },
          "filename": {
            "type": "string",
            "description": "Original filename (for documents)"
          },
          "caption": {
            "type": "string",
            "maxLength": 1024,
            "description": "Caption for the media"
          },
          "replyToMessageId": {
            "type": "string",
            "format": "uuid",
            "description": "Internal message ID to reply to (quote)"
          }
        },
        "required": [
          "mediaUrl",
          "mediaMimeType"
        ]
      },
      "SendRequestContactInfoDto": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 1024,
            "description": "Body text shown above the \"Share phone number\" button. Falls back to a neutral default when omitted.",
            "example": "Could you share your phone number so we can keep helping you?"
          }
        }
      },
      "LinkContactDto": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "description": "CRM Contact ID to link"
          }
        },
        "required": [
          "contactId"
        ]
      },
      "ContactSuggestionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "matchReason": {
            "type": "string",
            "enum": [
              "phone",
              "name"
            ],
            "description": "Why this contact was suggested: `phone` (number matches the conversation) or `name` (CRM name matches the WhatsApp profile name)."
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "matchReason"
        ]
      },
      "StartConversationDto": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "description": "Phone number in E.164 format",
            "example": "+491234567890"
          },
          "contactName": {
            "type": "string",
            "description": "Contact name (optional)"
          }
        },
        "required": [
          "phone"
        ]
      },
      "UpdateConversationLabelsDto": {
        "type": "object",
        "properties": {
          "labels": {
            "maxItems": 32,
            "description": "Complete new list of labels for this conversation.",
            "example": [
              "lead",
              "follow-up"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            }
          }
        },
        "required": [
          "labels"
        ]
      },
      "AssignConversationDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "nullable": true,
            "description": "User to assign the conversation to, or null to unassign.",
            "example": "3e1b6b0a-2f3b-4c9b-9c1e-8f2b7e6d1a2c"
          }
        },
        "required": [
          "userId"
        ]
      },
      "SnoozeConversationDto": {
        "type": "object",
        "properties": {
          "until": {
            "type": "string",
            "description": "ISO 8601 timestamp to reopen the conversation at.",
            "example": "2026-08-14T09:00:00.000Z"
          }
        },
        "required": [
          "until"
        ]
      },
      "SetConversationPriorityDto": {
        "type": "object",
        "properties": {
          "priority": {
            "type": "string",
            "enum": [
              "urgent",
              "high"
            ],
            "description": "Priority level to set, or null to clear it.",
            "nullable": true,
            "example": "urgent"
          }
        },
        "required": [
          "priority"
        ]
      },
      "PauseMiraDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "enum": [
              "manual",
              "human_reply",
              "automation_replied",
              "handoff"
            ]
          }
        }
      },
      "AddConversationNoteDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 4096,
            "description": "Internal note body. Agent-only, never sent to the contact.",
            "example": "Customer requested a call back on Tuesday."
          }
        },
        "required": [
          "text"
        ]
      },
      "SendReactionDto": {
        "type": "object",
        "properties": {
          "emoji": {
            "type": "string",
            "maxLength": 10,
            "description": "Emoji to react with",
            "example": "👍"
          }
        },
        "required": [
          "emoji"
        ]
      },
      "WhatsappMessageKind": {
        "type": "string",
        "enum": [
          "text",
          "template",
          "media"
        ],
        "description": "Which kind of message to send."
      },
      "WhatsappTemplatePayloadDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 512,
            "description": "Approved template name as registered in WhatsApp Manager.",
            "example": "appointment_reminder"
          },
          "language": {
            "type": "string",
            "maxLength": 35,
            "description": "Template language/locale code.",
            "example": "en_US"
          },
          "params": {
            "description": "Positional values substituted into the template body placeholders ({{1}}, {{2}}, ...).",
            "example": [
              "John",
              "Tuesday at 10:00"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "buttonUrlParams": {
            "type": "object",
            "description": "Dynamic URL-button suffixes keyed by zero-based button index, for templates with dynamic URL buttons.",
            "example": {
              "0": "cancel/abc123"
            }
          }
        },
        "required": [
          "name",
          "language"
        ]
      },
      "WhatsappMediaPayloadDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "Public HTTPS URL of the media to send. Must be reachable by WhatsApp (e.g. a presigned URL). HTTP is rejected.",
            "example": "https://files.example.com/invoice.pdf"
          },
          "mimeType": {
            "type": "string",
            "maxLength": 255,
            "pattern": "/^[\\w.+-]+\\/[\\w.+-]+$/",
            "description": "MIME type of the media. Determines how WhatsApp renders it.",
            "example": "application/pdf"
          },
          "filename": {
            "type": "string",
            "maxLength": 255,
            "description": "Original filename, shown for documents.",
            "example": "invoice.pdf"
          },
          "caption": {
            "type": "string",
            "maxLength": 1024,
            "description": "Caption shown beneath images, videos and documents."
          }
        },
        "required": [
          "url",
          "mimeType"
        ]
      },
      "SendWhatsappMessageV4Dto": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "maxLength": 140,
            "description": "Recipient address: a phone number (E.164 preferred, e.g. \"+491234567890\"; \"00\" prefixes and separators are normalized) or a WhatsApp business-scoped user id (BSUID, e.g. \"US.13491208655302741918\") for contacts who have adopted a WhatsApp username.",
            "example": "+491234567890"
          },
          "type": {
            "description": "Which kind of message to send.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappMessageKind"
              }
            ]
          },
          "contactName": {
            "type": "string",
            "maxLength": 255,
            "description": "Contact name to set when a new conversation is created for this number."
          },
          "text": {
            "type": "string",
            "maxLength": 4096,
            "description": "Message body. Required when `type` is `text`.",
            "example": "Hi! Your order has shipped."
          },
          "template": {
            "description": "Template payload. Required when `type` is `template`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappTemplatePayloadDto"
              }
            ]
          },
          "media": {
            "description": "Media payload. Required when `type` is `media`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/WhatsappMediaPayloadDto"
              }
            ]
          }
        },
        "required": [
          "to",
          "type"
        ]
      },
      "WhatsappMessageResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "meetergo message id."
          },
          "conversationId": {
            "type": "string",
            "description": "Conversation this message belongs to."
          },
          "waMessageId": {
            "type": "string",
            "description": "WhatsApp's own message id (wamid)."
          },
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "type": {
            "type": "string",
            "description": "Message kind (text, image, document, template, ...)."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sent",
              "delivered",
              "read",
              "failed"
            ],
            "description": "Delivery status. Inbound messages are always `delivered`."
          },
          "text": {
            "type": "string",
            "description": "Text body, or the caption for a media message."
          },
          "mediaUrl": {
            "type": "string",
            "description": "URL of the attached media, if any."
          },
          "mediaMimeType": {
            "type": "string",
            "description": "MIME type of the attached media."
          },
          "mediaFilename": {
            "type": "string",
            "description": "Filename of the attached document."
          },
          "templateName": {
            "type": "string",
            "description": "Template name, for template messages."
          },
          "errorMessage": {
            "type": "string",
            "description": "Failure reason from WhatsApp, set when `status` is `failed`."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "When the message was created (ISO 8601)."
          }
        },
        "required": [
          "id",
          "conversationId",
          "waMessageId",
          "direction",
          "type",
          "status",
          "createdAt"
        ]
      },
      "WhatsappMessageFeedResource": {
        "type": "object",
        "properties": {
          "data": {
            "description": "Messages created after `since`, oldest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappMessageResource"
            }
          },
          "nextSince": {
            "type": "string",
            "description": "Pass back as `since` to fetch the next batch. Present only when the page was full (more may be waiting)."
          }
        },
        "required": [
          "data"
        ]
      },
      "WhatsappTemplateResource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Template name (pass as `template.name`)."
          },
          "language": {
            "type": "string",
            "description": "Language/locale code (pass as `template.language`)."
          },
          "status": {
            "type": "string",
            "enum": [
              "APPROVED",
              "PENDING",
              "REJECTED",
              "PAUSED"
            ],
            "description": "Approval status. Only APPROVED templates can be sent."
          },
          "category": {
            "type": "string",
            "enum": [
              "MARKETING",
              "UTILITY",
              "AUTHENTICATION"
            ],
            "description": "Template category."
          },
          "variableCount": {
            "type": "number",
            "description": "Number of positional placeholders ({{1}}, {{2}}, ...) in the body — the length of the `params` array to send."
          },
          "body": {
            "type": "string",
            "description": "Body text with its {{n}} placeholders, so you know what the message says."
          }
        },
        "required": [
          "name",
          "language",
          "status",
          "variableCount"
        ]
      },
      "WhatsappTemplateListResource": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappTemplateResource"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "WhatsappConversationResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Conversation id."
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "description": "Contact phone number in E.164 format. Null when the contact has adopted a WhatsApp username and withheld their phone; use `userId`."
          },
          "userId": {
            "type": "string",
            "nullable": true,
            "description": "Business-Scoped User ID (BSUID), the stable identity used to send when no phone is known."
          },
          "username": {
            "type": "string",
            "nullable": true,
            "description": "WhatsApp @username the contact has adopted, if any."
          },
          "contactName": {
            "type": "string",
            "description": "Contact name from the WhatsApp profile."
          },
          "contactId": {
            "type": "string",
            "description": "Linked meetergo CRM contact id, if any."
          },
          "windowOpen": {
            "type": "boolean",
            "description": "Whether the 24-hour customer-service window is currently open. When false, only template messages are accepted."
          },
          "windowExpiresAt": {
            "format": "date-time",
            "type": "string",
            "description": "When the 24h window expires (ISO 8601). Absent if no window."
          },
          "lastMessageAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp of the most recent message."
          },
          "lastMessagePreview": {
            "type": "string",
            "description": "Preview text of the last message."
          },
          "lastMessageDirection": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "done"
            ],
            "description": "Lifecycle status. `done` conversations are archived."
          },
          "labels": {
            "description": "Conversation labels.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "When the conversation was created."
          }
        },
        "required": [
          "id",
          "windowOpen",
          "lastMessageAt",
          "lastMessageDirection",
          "status",
          "createdAt"
        ]
      },
      "WhatsappConversationListResource": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappConversationResource"
            }
          },
          "nextCursor": {
            "type": "string",
            "description": "Cursor for the next page (pass as `cursor`). Absent on last page."
          }
        },
        "required": [
          "data"
        ]
      },
      "WhatsappMessageListResource": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatsappMessageResource"
            }
          },
          "nextCursor": {
            "type": "string",
            "description": "Cursor for the next page (pass as `cursor`). Absent on last page."
          }
        },
        "required": [
          "data"
        ]
      },
      "SignatureAreaDto": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Left edge as a fraction of page width (0–1).",
            "example": 0.1
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Top edge as a fraction of page height (0–1), from the top.",
            "example": 0.8
          },
          "w": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Width as a fraction of page width (0–1).",
            "example": 0.3
          },
          "h": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Height as a fraction of page height (0–1).",
            "example": 0.08
          },
          "page": {
            "type": "number",
            "minimum": 1,
            "description": "Page number, 1-indexed (page 1 is the first page).",
            "example": 1
          }
        },
        "required": [
          "x",
          "y",
          "w",
          "h",
          "page"
        ]
      },
      "SignatureFieldDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "description": "Field name.",
            "example": "signature"
          },
          "signerKey": {
            "type": "string",
            "pattern": "/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/",
            "description": "Stable signer key that owns this field. Required when the request has multiple signers.",
            "example": "customer"
          },
          "type": {
            "type": "string",
            "enum": [
              "signature",
              "initials",
              "text",
              "date",
              "number"
            ],
            "description": "Field type. Defaults to \"signature\".",
            "example": "signature"
          },
          "areas": {
            "minItems": 1,
            "description": "One or more placements of this field across the document pages.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignatureAreaDto"
            }
          }
        },
        "required": [
          "name",
          "areas"
        ]
      },
      "SignerInputDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "pattern": "/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/",
            "description": "Stable key used to assign fields to this signer. Required for multi-signer requests.",
            "example": "customer"
          },
          "email": {
            "type": "string",
            "maxLength": 320,
            "format": "email",
            "description": "Signer email address.",
            "example": "john.doe@example.com"
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Signer display name.",
            "example": "John Doe"
          },
          "role": {
            "type": "string",
            "maxLength": 120,
            "description": "Role label, e.g. \"First Party\".",
            "example": "First Party"
          },
          "deliveryChannel": {
            "type": "string",
            "enum": [
              "link",
              "email",
              "sms",
              "whatsapp"
            ],
            "description": "How to deliver this signer invitation. Defaults to returning a copyable link.",
            "example": "sms"
          },
          "phone": {
            "type": "string",
            "maxLength": 40,
            "description": "Mobile number for SMS or WhatsApp delivery. National numbers use the company billing country.",
            "example": "+491723099442"
          }
        }
      },
      "CreateSignatureRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Document / submission name.",
            "example": "Order confirmation"
          },
          "file": {
            "type": "string",
            "description": "The source PDF, base64-encoded (max 20 MB decoded).",
            "example": "JVBERi0xLjcKJ..."
          },
          "fields": {
            "minItems": 1,
            "description": "Fields to place on the document. Areas use normalized (0–1) coordinates with a top-left origin and 1-indexed pages — the same model as DocuSeal.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignatureFieldDto"
            }
          },
          "signers": {
            "minItems": 1,
            "maxItems": 10,
            "description": "One to ten parallel signers.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignerInputDto"
            }
          },
          "expiresAt": {
            "type": "string",
            "description": "ISO-8601 timestamp after which signing links stop working.",
            "example": "2026-12-31T23:59:59.000Z"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "de"
            ],
            "description": "Signing-page language. Supported: \"en\", \"de\". Defaults to English.",
            "example": "de"
          },
          "completedRedirectUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL the signer is sent to after completing (DocuSeal `completed_redirect_url`).",
            "example": "https://app.example.com/contracts/123/signed"
          },
          "requireOtp": {
            "type": "boolean",
            "description": "Require email OTP verification. This expresses the FES intent and requires the Suite plan or above.",
            "example": true
          },
          "sendSignedCopyToSigners": {
            "type": "boolean",
            "description": "Email every signer the finished document when the request completes. Defaults to true. Set false when you distribute the signed document yourself.",
            "example": true
          },
          "automaticReminders": {
            "type": "boolean",
            "description": "Send unfinished signers a reminder every three days, up to three reminders.",
            "example": true
          },
          "whatsappTemplateName": {
            "type": "string",
            "maxLength": 200,
            "description": "Approved WhatsApp template name used by signers whose delivery channel is WhatsApp.",
            "example": "signature_invitation"
          },
          "whatsappTemplateLanguage": {
            "type": "string",
            "maxLength": 35,
            "description": "Language code of the selected WhatsApp template.",
            "example": "de"
          }
        },
        "required": [
          "name",
          "file",
          "fields",
          "signers"
        ]
      },
      "SignatureInvitationDeliveryResponseDto": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms",
              "whatsapp"
            ]
          },
          "phone": {
            "type": "string",
            "description": "Normalized E.164 recipient number."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sent",
              "failed"
            ]
          },
          "templateName": {
            "type": "string"
          },
          "templateLanguage": {
            "type": "string"
          },
          "sentAt": {
            "type": "string"
          },
          "failureCode": {
            "type": "string",
            "description": "Stable failure category when the latest attempt failed."
          }
        },
        "required": [
          "channel",
          "status"
        ]
      },
      "SignerResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Signer id."
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "Signer email."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Signer name."
          },
          "role": {
            "type": "string",
            "nullable": true,
            "description": "Role label."
          },
          "key": {
            "type": "string",
            "nullable": true,
            "description": "Stable field-assignment key."
          },
          "status": {
            "type": "string",
            "description": "Signer status.",
            "enum": [
              "pending",
              "completed"
            ]
          },
          "invitationDelivery": {
            "nullable": true,
            "description": "Latest email, SMS, or WhatsApp invitation delivery outcome.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SignatureInvitationDeliveryResponseDto"
              }
            ]
          },
          "signingUrl": {
            "type": "string",
            "nullable": true,
            "description": "The hosted signing link to send to this signer (the DocuSeal `embed_src` equivalent).",
            "example": "https://cal.meetergo.com/s/V1StGXR8_Z5jdHi6B-myT"
          },
          "openedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the signer opened the link."
          },
          "completedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the signer completed signing."
          }
        },
        "required": [
          "id",
          "status",
          "signingUrl"
        ]
      },
      "SignatureRequestResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Signature request id."
          },
          "name": {
            "type": "string",
            "description": "Document name."
          },
          "schemaVersion": {
            "type": "number",
            "description": "Persisted envelope schema version."
          },
          "revision": {
            "type": "number",
            "description": "Current request revision."
          },
          "status": {
            "enum": [
              "pending",
              "in_progress",
              "finalizing",
              "finalization_failed",
              "completed",
              "cancelled"
            ],
            "type": "string",
            "description": "Overall status."
          },
          "signers": {
            "description": "The signers and their signing links.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignerResponseDto"
            }
          },
          "signedDocumentUrl": {
            "type": "string",
            "nullable": true,
            "description": "Time-limited download URL for the signed (audit-paged, cryptographically signed) PDF. Present once status is \"completed\"."
          },
          "completedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When all signers completed."
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When signing links expire (null = never)."
          },
          "automaticReminders": {
            "type": "boolean",
            "description": "Whether automatic reminders are enabled."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Creation time."
          }
        },
        "required": [
          "id",
          "name",
          "schemaVersion",
          "revision",
          "status",
          "signers",
          "automaticReminders",
          "createdAt"
        ]
      },
      "DataFieldType": {
        "type": "string",
        "enum": [
          "email",
          "phone",
          "text-single",
          "text-multi",
          "number",
          "select",
          "checkbox-single",
          "checkbox-multi",
          "radio",
          "slide",
          "url",
          "file",
          "date-of-birth",
          "yes-no",
          "rating",
          "scale",
          "signature",
          "date",
          "time",
          "image",
          "heading",
          "separator",
          "page-break",
          "contact",
          "bank-details",
          "license-plate",
          "info-text",
          "info-image",
          "info-video",
          "currency",
          "location",
          "pdf-template",
          "file-download",
          "testimonial",
          "faq",
          "countdown",
          "loading",
          "quiz-reveal",
          "logos",
          "checklist",
          "html",
          "address"
        ]
      },
      "DataFieldTarget": {
        "type": "string",
        "enum": [
          "email",
          "firstname",
          "lastname",
          "fullname",
          "phone",
          "marketing_consent",
          "other"
        ]
      },
      "CreateDataFieldDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "fieldType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DataFieldType"
              }
            ]
          },
          "target": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DataFieldTarget"
              }
            ]
          },
          "locales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldLocale"
            }
          },
          "default": {
            "type": "boolean"
          },
          "required": {
            "type": "boolean"
          },
          "hidden": {
            "type": "boolean"
          },
          "hideUntilChange": {
            "type": "boolean"
          },
          "defaultValue": {
            "type": "string",
            "nullable": true
          },
          "placeholder": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldOptions"
            }
          },
          "slideOptions": {
            "$ref": "#/components/schemas/SlideOptions"
          },
          "fileFieldOptions": {
            "description": "Configuration for file upload fields.\nRequired when fieldType is 'file'.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileFieldOptions"
              }
            ]
          },
          "min": {
            "type": "number",
            "description": "Used by number field"
          },
          "max": {
            "type": "number",
            "description": "Used by number field"
          },
          "showInfobox": {
            "type": "boolean"
          },
          "infoboxText": {
            "type": "string"
          },
          "useMarkdown": {
            "type": "boolean",
            "description": "When true, field.label is rendered through markdown-it (html: false).\nAllows **bold**, _italic_, `code`, and links in field labels.",
            "default": false
          },
          "requireSignatureOtp": {
            "type": "boolean",
            "default": false
          },
          "contactOptions": {
            "description": "Configuration for contact composite fields.\nControls which sub-inputs (name, email, phone, address) are shown.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactOptions"
              }
            ]
          },
          "helpText": {
            "type": "string",
            "description": "Optional help text shown below the field in the booking form."
          },
          "bankDetailsOptions": {
            "description": "Configuration for bank details composite fields.\nControls which optional sub-inputs (BIC, account holder, signature) are shown.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BankDetailsOptions"
              }
            ]
          },
          "licensePlateOptions": {
            "description": "Configuration for license plate fields.\nControls country format validation.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LicensePlateOptions"
              }
            ]
          },
          "textFormatOptions": {
            "nullable": true,
            "description": "Format rule for short-text fields. `null` clears it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TextFormatOptions"
              }
            ]
          },
          "displayStyle": {
            "type": "object",
            "description": "Controls how options are displayed for radio/checkbox/select fields.\n'default' - Standard list view\n'card' - Card grid with optional icons"
          },
          "conditions": {
            "type": "object",
            "nullable": true,
            "description": "Conditional visibility expression. When set, the field is only shown\nwhen the expression evaluates to true against the current form values."
          },
          "headingLevel": {
            "type": "number",
            "description": "Heading level for heading fields (1–6). Defaults to 2 (<h2>)."
          },
          "pdfTemplateOptions": {
            "description": "Configuration for PDF template fields.\nHolds the template PDF reference and pdfme schema JSON.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfTemplateOptions"
              }
            ]
          },
          "fileDownloadOptions": {
            "description": "Configuration for file download display fields.\nHolds IDs of library files to offer for download.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileDownloadOptions"
              }
            ]
          },
          "blockOptions": {
            "description": "Configuration for the v2 funnel content blocks (testimonial, FAQ,\ncountdown, loading, quiz reveal, logos, checklist, html).",
            "allOf": [
              {
                "$ref": "#/components/schemas/BlockOptions"
              }
            ]
          }
        },
        "required": [
          "label",
          "fieldType",
          "target",
          "default",
          "required",
          "hidden"
        ]
      },
      "ReorderDataFieldsDto": {
        "type": "object",
        "properties": {
          "fieldIds": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "required": [
          "fieldIds"
        ]
      },
      "UpdateDataFieldDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "fieldType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DataFieldType"
              }
            ]
          },
          "target": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DataFieldTarget"
              }
            ]
          },
          "locales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldLocale"
            }
          },
          "default": {
            "type": "boolean"
          },
          "required": {
            "type": "boolean"
          },
          "hidden": {
            "type": "boolean"
          },
          "hideUntilChange": {
            "type": "boolean"
          },
          "defaultValue": {
            "type": "string",
            "nullable": true
          },
          "placeholder": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldOptions"
            }
          },
          "slideOptions": {
            "$ref": "#/components/schemas/SlideOptions"
          },
          "fileFieldOptions": {
            "description": "Configuration for file upload fields.\nRequired when fieldType is 'file'.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileFieldOptions"
              }
            ]
          },
          "min": {
            "type": "number",
            "description": "Used by number field"
          },
          "max": {
            "type": "number",
            "description": "Used by number field"
          },
          "showInfobox": {
            "type": "boolean"
          },
          "infoboxText": {
            "type": "string"
          },
          "useMarkdown": {
            "type": "boolean",
            "description": "When true, field.label is rendered through markdown-it (html: false).\nAllows **bold**, _italic_, `code`, and links in field labels.",
            "default": false
          },
          "requireSignatureOtp": {
            "type": "boolean",
            "default": false
          },
          "contactOptions": {
            "description": "Configuration for contact composite fields.\nControls which sub-inputs (name, email, phone, address) are shown.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactOptions"
              }
            ]
          },
          "helpText": {
            "type": "string",
            "description": "Optional help text shown below the field in the booking form."
          },
          "bankDetailsOptions": {
            "description": "Configuration for bank details composite fields.\nControls which optional sub-inputs (BIC, account holder, signature) are shown.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BankDetailsOptions"
              }
            ]
          },
          "licensePlateOptions": {
            "description": "Configuration for license plate fields.\nControls country format validation.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LicensePlateOptions"
              }
            ]
          },
          "textFormatOptions": {
            "nullable": true,
            "description": "Format rule for short-text fields. `null` clears it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TextFormatOptions"
              }
            ]
          },
          "displayStyle": {
            "type": "object",
            "description": "Controls how options are displayed for radio/checkbox/select fields.\n'default' - Standard list view\n'card' - Card grid with optional icons"
          },
          "conditions": {
            "type": "object",
            "nullable": true,
            "description": "Conditional visibility expression. When set, the field is only shown\nwhen the expression evaluates to true against the current form values."
          },
          "headingLevel": {
            "type": "number",
            "description": "Heading level for heading fields (1–6). Defaults to 2 (<h2>)."
          },
          "pdfTemplateOptions": {
            "description": "Configuration for PDF template fields.\nHolds the template PDF reference and pdfme schema JSON.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfTemplateOptions"
              }
            ]
          },
          "fileDownloadOptions": {
            "description": "Configuration for file download display fields.\nHolds IDs of library files to offer for download.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileDownloadOptions"
              }
            ]
          },
          "blockOptions": {
            "description": "Configuration for the v2 funnel content blocks (testimonial, FAQ,\ncountdown, loading, quiz reveal, logos, checklist, html).",
            "allOf": [
              {
                "$ref": "#/components/schemas/BlockOptions"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "hubspotContactField": {
            "type": "string"
          },
          "hubspotCompanyField": {
            "type": "string"
          },
          "pipedriveContactField": {
            "type": "string"
          },
          "closeContactField": {
            "type": "string"
          },
          "salesforceContactField": {
            "type": "string"
          },
          "salesforceLeadField": {
            "type": "string"
          },
          "salesforceCaseField": {
            "type": "string"
          },
          "salesforceOpportunityField": {
            "type": "string"
          },
          "salesforceAccountField": {
            "type": "string"
          },
          "evalancheFieldId": {
            "type": "string"
          },
          "klicktippFieldId": {
            "type": "string"
          },
          "style": {
            "type": "number"
          },
          "defaultCountryCode": {
            "type": "string",
            "description": "For Phone Number field - default country code (e.g., \"+1\", \"+49\", \"+44\").\nUsed when style is WITH_COUNTRY_CODE_PICKER to set the initial country selection."
          }
        }
      },
      "SpaceCustomerCompanyEnrichmentDto": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "nullable": true,
            "maxLength": 253
          },
          "logo": {
            "type": "string",
            "nullable": true,
            "maxLength": 4096
          },
          "darkLogo": {
            "type": "string",
            "nullable": true,
            "maxLength": 4096
          },
          "primaryColor": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          },
          "secondaryColor": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          },
          "backdropUrl": {
            "type": "string",
            "nullable": true,
            "maxLength": 4096
          },
          "colors": {
            "nullable": true,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 20
            }
          },
          "website": {
            "type": "string",
            "nullable": true,
            "maxLength": 4096
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000
          },
          "slogan": {
            "type": "string",
            "nullable": true,
            "maxLength": 500
          },
          "socials": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            }
          },
          "links": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            }
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "maxLength": 100
          },
          "contactEmail": {
            "type": "string",
            "nullable": true,
            "maxLength": 320,
            "format": "email"
          },
          "industry": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "subindustry": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "ticker": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          },
          "exchange": {
            "type": "string",
            "nullable": true,
            "maxLength": 50
          },
          "address": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "SpaceDefaultItemAccess": {
        "type": "string",
        "enum": [
          "inherit",
          "hidden",
          "ask"
        ]
      },
      "SpaceWelcome": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ctaLabel": {
            "type": "string"
          },
          "image": {
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "SpaceTeamMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "us",
              "them"
            ]
          },
          "avatarUrl": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "side"
        ]
      },
      "SpaceTeam": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceTeamMember"
            }
          }
        },
        "required": [
          "enabled",
          "members"
        ]
      },
      "SpaceAssistantConfig": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "object",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "welcomeMessage": {
            "type": "string"
          },
          "customPrompt": {
            "type": "string"
          },
          "humanHandoff": {
            "type": "boolean"
          },
          "aiDisclosure": {
            "type": "boolean"
          }
        }
      },
      "SpaceAccountOwner": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          },
          "userSlug": {
            "type": "string"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "meetingTypeSlug": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "name",
          "userSlug"
        ]
      },
      "SpaceSettings": {
        "type": "object",
        "properties": {
          "contentModuleEnabled": {
            "type": "boolean"
          },
          "showBranding": {
            "type": "boolean"
          },
          "defaultItemAccess": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceDefaultItemAccess"
              }
            ]
          },
          "welcome": {
            "$ref": "#/components/schemas/SpaceWelcome"
          },
          "team": {
            "$ref": "#/components/schemas/SpaceTeam"
          },
          "showInviteeCard": {
            "type": "boolean"
          },
          "isTemplate": {
            "type": "boolean"
          },
          "assistantEnabled": {
            "type": "boolean"
          },
          "assistant": {
            "$ref": "#/components/schemas/SpaceAssistantConfig"
          },
          "accountOwner": {
            "$ref": "#/components/schemas/SpaceAccountOwner"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "newsSubject": {
            "type": "string"
          },
          "newsBody": {
            "type": "string"
          }
        },
        "required": [
          "contentModuleEnabled",
          "showBranding",
          "defaultItemAccess"
        ]
      },
      "SpaceBrandOverrides": {
        "type": "object",
        "properties": {
          "logo": {
            "type": "string"
          },
          "primaryColor": {
            "type": "string"
          },
          "secondaryColor": {
            "type": "string"
          },
          "backdropUrl": {
            "type": "string"
          },
          "heroStyle": {
            "type": "string",
            "enum": [
              "image",
              "skyline",
              "aurora"
            ]
          }
        }
      },
      "CreateSpaceDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "nullable": true
          },
          "customerCompanyId": {
            "type": "string",
            "nullable": true
          },
          "customerCompanyName": {
            "type": "string"
          },
          "customerCompany": {
            "description": "Enrichment for a newly-created customer company (ignored when an existing\n company is linked by id).",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceCustomerCompanyEnrichmentDto"
              }
            ]
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true,
            "description": "Link to a CRM company: finds or creates the client-company record bridged\n to that CRM record. Ignored when `customerCompanyId` is set."
          },
          "dealId": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "$ref": "#/components/schemas/SpaceSettings"
          },
          "brandOverrides": {
            "$ref": "#/components/schemas/SpaceBrandOverrides"
          },
          "internalNotes": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "SpaceStatus": {
        "type": "string",
        "enum": [
          "draft",
          "published",
          "closed",
          "frozen"
        ]
      },
      "ContactDealStats": {
        "type": "object",
        "properties": {
          "viewHistory": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CustomerContact": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "profilePicture": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "isInternal": {
            "type": "boolean"
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Language"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "customerCompanyId": {
            "type": "string"
          },
          "passcode": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "stats": {
            "$ref": "#/components/schemas/ContactDealStats"
          }
        },
        "required": [
          "isInternal",
          "language",
          "id",
          "companyId",
          "passcode",
          "createdAt",
          "updatedAt",
          "stats"
        ]
      },
      "CustomerCompany": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "logo": {
            "type": "string"
          },
          "primaryColor": {
            "type": "string"
          },
          "secondaryColor": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "crmCompany": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CrmCompany"
              }
            ]
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true
          },
          "domain": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "slogan": {
            "type": "string"
          },
          "darkLogo": {
            "type": "string",
            "description": "Dark-mode logo URL from brand.dev"
          },
          "backdropUrl": {
            "type": "string",
            "description": "Backdrop / hero image URL from brand.dev"
          },
          "colors": {
            "description": "Brand color palette (hex strings)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "socials": {
            "type": "object",
            "description": "Social profile URLs keyed by platform (e.g. { linkedin: '...' })"
          },
          "links": {
            "type": "object",
            "description": "Key website links (privacy, terms, blog, etc.)"
          },
          "phone": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "subindustry": {
            "type": "string"
          },
          "ticker": {
            "type": "string",
            "description": "Stock ticker symbol (e.g. \"AAPL\")"
          },
          "exchange": {
            "type": "string",
            "description": "Stock exchange (e.g. \"NASDAQ\")"
          },
          "address": {
            "type": "object",
            "description": "Registered address from brand.dev"
          },
          "isEnriched": {
            "type": "boolean",
            "description": "True once brand.dev enrichment has been applied"
          },
          "enrichedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerContact"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "isEnriched",
          "id",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "DealContact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deal": {
            "$ref": "#/components/schemas/CrmDeal"
          },
          "dealId": {
            "type": "string"
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "contactId": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "primary",
              "decision_maker",
              "influencer",
              "user",
              "other"
            ]
          },
          "isPrimary": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "deal",
          "dealId",
          "contact",
          "contactId",
          "role",
          "isPrimary",
          "createdAt"
        ]
      },
      "CrmDealSignal": {
        "type": "object",
        "properties": {
          "dealId": {
            "type": "string",
            "description": "One row per deal — the deal id *is* the key."
          },
          "deal": {
            "$ref": "#/components/schemas/CrmDeal"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "daysInStage": {
            "type": "number"
          },
          "daysSinceLastActivity": {
            "type": "number"
          },
          "daysSinceLastInbound": {
            "type": "number",
            "nullable": true,
            "description": "`null` when the counterpart has never written."
          },
          "daysSinceLastOutbound": {
            "type": "number",
            "nullable": true,
            "description": "`null` when we have never written."
          },
          "followUpsSinceLastReply": {
            "type": "number",
            "description": "Outbound messages sent since their last reply — drives the auto-lose rule."
          },
          "hasReplyEver": {
            "type": "boolean"
          },
          "inboundCount": {
            "type": "number"
          },
          "outboundCount": {
            "type": "number"
          },
          "meetingsBooked": {
            "type": "number"
          },
          "meetingsHeld": {
            "type": "number"
          },
          "meetingsNoShow": {
            "type": "number"
          },
          "openTaskCount": {
            "type": "number"
          },
          "overdueTaskCount": {
            "type": "number"
          },
          "isRotting": {
            "type": "boolean"
          },
          "healthScore": {
            "type": "number"
          },
          "healthBand": {
            "type": "object"
          },
          "computedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "dealId",
          "deal",
          "company",
          "companyId",
          "daysInStage",
          "daysSinceLastActivity",
          "followUpsSinceLastReply",
          "hasReplyEver",
          "inboundCount",
          "outboundCount",
          "meetingsBooked",
          "meetingsHeld",
          "meetingsNoShow",
          "openTaskCount",
          "overdueTaskCount",
          "isRotting",
          "healthScore",
          "healthBand",
          "computedAt"
        ]
      },
      "CrmDeal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number",
            "description": "Postgres returns `decimal` as a string, so without a transformer this\nfield's declared `number` type was a lie at runtime and the deals board's\nstrict oRPC output rejected every deal that had a value — \"Expected\nnumber, received string\" — failing the whole board with a 500 while\npipelines whose deals had no value kept working.\n\nSame numeric+transformer shape as PaymentLink.price and\nEventTicketType.price."
          },
          "currency": {
            "type": "string"
          },
          "expectedCloseDate": {
            "format": "date-time",
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "winProbability": {
            "type": "number",
            "nullable": true,
            "description": "A win probability for this deal only, 0-100. Null inherits the stage's,\nwhich is what every deal did before the override existed. Cleared on\nevery stage move; see `functions/deal-probability.ts`."
          },
          "crmCompany": {
            "$ref": "#/components/schemas/CrmCompany"
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "contactId": {
            "type": "string",
            "nullable": true
          },
          "pipeline": {
            "$ref": "#/components/schemas/Pipeline"
          },
          "pipelineId": {
            "type": "string"
          },
          "stage": {
            "$ref": "#/components/schemas/PipelineStage"
          },
          "stageId": {
            "type": "string"
          },
          "owner": {
            "nullable": true,
            "description": "The account owner. Nullable: a deal can legitimately sit unowned — imported\nbefore anyone was assigned, or left deliberately unclaimed in a shared\npipeline — and forcing a placeholder owner hid exactly the deals that need\nsomeone to pick them up.",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "ownerId": {
            "type": "string",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "companyId": {
            "type": "string"
          },
          "lostReason": {
            "type": "string"
          },
          "lostReasonNote": {
            "type": "string"
          },
          "wonReason": {
            "type": "string",
            "description": "Why the deal was won.\n\nThe mirror of {@link lostReason}, and a plain string for the same reason:\nthe list is configurable per company. It exists because \"why do people\nbuy\" is the question a first sales hire has to be taught the answer to,\nand until now it was only ever recorded in prose on a note."
          },
          "wonReasonNote": {
            "type": "string"
          },
          "wonAt": {
            "format": "date-time",
            "type": "string"
          },
          "lostAt": {
            "format": "date-time",
            "type": "string"
          },
          "archivedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "boardOrder": {
            "type": "number"
          },
          "enteredStageAt": {
            "format": "date-time",
            "type": "string"
          },
          "customFields": {
            "type": "object"
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DealContact"
            }
          },
          "signal": {
            "description": "Server-computed health signals, maintained by DealSignalService.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CrmDealSignal"
              }
            ]
          },
          "appointmentId": {
            "type": "string",
            "description": "ID of the booking appointment that created this deal, if applicable"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "pipeline",
          "pipelineId",
          "stage",
          "stageId",
          "company",
          "companyId",
          "boardOrder",
          "enteredStageAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "SpaceVisibility": {
        "type": "string",
        "enum": [
          "hidden",
          "locked",
          "visible"
        ]
      },
      "SpaceItemStatus": {
        "type": "string",
        "enum": [
          "todo",
          "wip",
          "done",
          "cancelled"
        ]
      },
      "SpaceBlockKind": {
        "type": "string",
        "enum": [
          "content",
          "task",
          "scheduler",
          "text",
          "form",
          "meetings",
          "team",
          "invitee",
          "embed",
          "upload",
          "html",
          "contact",
          "offer",
          "whiteboard"
        ]
      },
      "SpaceTaskType": {
        "type": "string",
        "enum": [
          "task",
          "meeting",
          "approval",
          "documentRequest"
        ]
      },
      "SpaceTaskAssignee": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "us",
              "them"
            ]
          },
          "avatarUrl": {
            "type": "string"
          },
          "viewerId": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "side"
        ]
      },
      "SpaceTaskResource": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "contentId": {
            "type": "string"
          }
        }
      },
      "SpaceBlockTask": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "done": {
            "type": "boolean"
          },
          "dueDate": {
            "type": "object",
            "nullable": true
          },
          "assignee": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceTaskAssignee"
              }
            ]
          },
          "resource": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceTaskResource"
              }
            ]
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceTaskResource"
            }
          },
          "phase": {
            "type": "object",
            "nullable": true
          },
          "completedAt": {
            "type": "object",
            "nullable": true
          },
          "updatedAt": {
            "type": "object",
            "nullable": true
          }
        },
        "required": [
          "id",
          "description",
          "done"
        ]
      },
      "SpaceBlockCta": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "url"
        ]
      },
      "SpaceBlockResource": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "contentId": {
            "type": "string"
          },
          "folder": {
            "type": "string"
          }
        },
        "required": [
          "title"
        ]
      },
      "Content": {
        "type": "object",
        "properties": {
          "metadata": {
            "type": "object",
            "description": "Accepts any json. Currently used properties:\n`url`: URL to the content (why we don't have a field for this I dont know)\n`bucketFileKey`: If file is stored in content bucket, the key for accessing directly in bucket\n(undefined if file is not stored by us)"
          },
          "tags": {
            "description": "Free-form organizing labels for the content library (owner-only).",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "saved": {
            "type": "boolean",
            "description": "@default true"
          },
          "contentType": {
            "type": "string"
          },
          "userId": {
            "type": "string",
            "description": "Owner"
          }
        },
        "required": [
          "metadata",
          "tags",
          "createdAt",
          "updatedAt",
          "id",
          "name",
          "saved",
          "contentType"
        ]
      },
      "Signer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "signatureRequestId": {
            "type": "string"
          },
          "signatureRequest": {
            "$ref": "#/components/schemas/SignatureRequest"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true,
            "description": "Caller-defined role label (e.g. DocuSeal's \"First Party\")."
          },
          "roleKey": {
            "type": "string",
            "nullable": true,
            "description": "Stable field-assignment key, unique within the request."
          },
          "token": {
            "type": "string",
            "description": "Opaque signing-link token (the embed_src key). Unique across all signers."
          },
          "tokenVersion": {
            "type": "number",
            "description": "Monotonic signer-link revision included in v2 HMAC claims."
          },
          "tokenRevokedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "linkKeyId": {
            "type": "string",
            "nullable": true,
            "description": "Key used when this signer was created; rotation affects only new links."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed"
            ]
          },
          "invitationDelivery": {
            "type": "object",
            "nullable": true,
            "description": "Optional direct invitation and its latest provider outcome."
          },
          "order": {
            "type": "number",
            "description": "Signing order for sequential flows (lower signs first). M1 ignores this."
          },
          "openedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "completedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "signatureRequestId",
          "signatureRequest",
          "email",
          "name",
          "role",
          "roleKey",
          "token",
          "tokenVersion",
          "tokenRevokedAt",
          "linkKeyId",
          "status",
          "invitationDelivery",
          "order",
          "openedAt",
          "completedAt",
          "createdAt"
        ]
      },
      "SignatureRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "description": "Owning company."
          },
          "createdByUserId": {
            "type": "string",
            "nullable": true,
            "description": "API user / owner who created the request (for attribution)."
          },
          "name": {
            "type": "string",
            "description": "Human-readable document name (shown on the signing page and in listings)."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_progress",
              "finalizing",
              "finalization_failed",
              "completed",
              "cancelled"
            ]
          },
          "schemaVersion": {
            "type": "number",
            "description": "Persisted envelope format. Existing and N-1-created rows are v1."
          },
          "revision": {
            "type": "number",
            "description": "Monotonic mutation revision included in v2 signing links."
          },
          "templateFileAssetId": {
            "type": "string",
            "description": "FileAsset id of the uploaded source PDF (the unsigned template)."
          },
          "sourceSha256": {
            "type": "string",
            "nullable": true
          },
          "sourceVerifiedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "consentVersion": {
            "type": "string",
            "nullable": true
          },
          "pdfmeSchemas": {
            "type": "array",
            "items": {
              "description": "pdfme schemas (one array per page) describing field placements, derived\nfrom the caller's DocuSeal-style field areas. Consumed by the signing page\nto render the document; never includes the PDF bytes.",
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "requireOtp": {
            "type": "boolean",
            "description": "When true, signers must verify their identity via email OTP before signing\nthrough the compatibility OTP-email flow. Off by default for a\nfrictionless SES/link-possession flow."
          },
          "language": {
            "type": "string",
            "nullable": true,
            "description": "Signing-page language (e.g. 'en', 'de'). Null = English."
          },
          "completedRedirectUrl": {
            "type": "string",
            "nullable": true,
            "description": "Where the signer is sent after completing (DocuSeal `completed_redirect_url`)."
          },
          "signedFileAssetId": {
            "type": "string",
            "nullable": true,
            "description": "FileAsset id of the final signed + audit-paged PDF (set on completion)."
          },
          "signedSha256": {
            "type": "string",
            "nullable": true,
            "description": "SHA-256 of the final signed document (hex), set on completion."
          },
          "completedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "finalizationStartedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "finalizationLeaseId": {
            "type": "string",
            "nullable": true
          },
          "finalizationLeaseExpiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "finalizationAttemptCount": {
            "type": "number"
          },
          "finalizationAttemptInGeneration": {
            "type": "number"
          },
          "finalizationRetryGeneration": {
            "type": "number"
          },
          "finalizationFailureCode": {
            "type": "string",
            "nullable": true
          },
          "finalizationDueAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "finalizationPayload": {
            "type": "object",
            "nullable": true
          },
          "signingCertificateSha256": {
            "type": "string",
            "nullable": true
          },
          "signatureEvidence": {
            "type": "object",
            "nullable": true
          },
          "signatureEvidenceSha256": {
            "type": "string",
            "nullable": true
          },
          "cancelledAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Optional expiry after which signing links stop working. Null = never."
          },
          "sendSignedCopyToSigners": {
            "type": "boolean",
            "description": "Email every signer a copy of the finished document when the request\ncompletes. On by default: whoever signs a contract should hold what they\nsigned, and the compatibility PDF carries its audit page."
          },
          "automaticReminders": {
            "type": "boolean",
            "description": "Whether unfinished signers receive up to three automatic reminders."
          },
          "automaticReminderDueAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Indexed next reminder time. Null when disabled or the retry cap is met."
          },
          "automaticReminderCount": {
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "signers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Signer"
            }
          }
        },
        "required": [
          "id",
          "companyId",
          "createdByUserId",
          "name",
          "status",
          "schemaVersion",
          "revision",
          "templateFileAssetId",
          "sourceSha256",
          "sourceVerifiedAt",
          "consentVersion",
          "pdfmeSchemas",
          "requireOtp",
          "language",
          "completedRedirectUrl",
          "signedFileAssetId",
          "signedSha256",
          "completedAt",
          "finalizationStartedAt",
          "finalizationLeaseId",
          "finalizationLeaseExpiresAt",
          "finalizationAttemptCount",
          "finalizationAttemptInGeneration",
          "finalizationRetryGeneration",
          "finalizationFailureCode",
          "finalizationDueAt",
          "finalizationPayload",
          "signingCertificateSha256",
          "signatureEvidence",
          "signatureEvidenceSha256",
          "cancelledAt",
          "expiresAt",
          "sendSignedCopyToSigners",
          "automaticReminders",
          "automaticReminderDueAt",
          "automaticReminderCount",
          "createdAt",
          "updatedAt",
          "signers"
        ]
      },
      "SpaceViewDeviceMetadata": {
        "type": "object",
        "properties": {
          "browser": {
            "type": "string"
          },
          "os": {
            "type": "string"
          },
          "device": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          }
        }
      },
      "SpaceWatermarkConfig": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "opacity": {
            "type": "string"
          }
        }
      },
      "SpaceCustomField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "label"
        ]
      },
      "FileAssetSource": {
        "type": "string",
        "enum": [
          "library",
          "booking_form",
          "pdf_template",
          "pdf_submission",
          "content_hub",
          "whatsapp_chat",
          "web_chat",
          "connect_recording",
          "invoicing",
          "document",
          "spreadsheet",
          "purchase_document"
        ],
        "description": "Source of the upload"
      },
      "FileAssetStatus": {
        "type": "string",
        "enum": [
          "pending",
          "uploaded",
          "failed"
        ],
        "description": "Upload status"
      },
      "FileFolder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "parentId": {
            "type": "string",
            "nullable": true,
            "description": "Parent folder (null = root). Self-referencing tree."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "parent": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/FileFolder"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "FileAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "File asset ID (nanoid)"
          },
          "filename": {
            "type": "string",
            "description": "Sanitized filename used in S3"
          },
          "originalFilename": {
            "type": "string",
            "description": "Original filename from upload"
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type of the file"
          },
          "sizeBytes": {
            "type": "number",
            "description": "File size in bytes"
          },
          "sha256": {
            "type": "string",
            "description": "SHA-256 hex digest of the file content (set for PdfSubmission assets)"
          },
          "cryptographicallySigned": {
            "type": "boolean",
            "description": "Whether the PDF was cryptographically signed (PKCS#7 signature embedded).\nTrue only for PdfSubmission assets where signing succeeded.\nFalse means the PDF was stored unsigned (graceful fallback when signing was disabled or failed)."
          },
          "signedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the cryptographic signature was applied (if signed)"
          },
          "s3Key": {
            "type": "string",
            "description": "Full S3 key path"
          },
          "companyId": {
            "type": "string",
            "description": "Company that owns this file"
          },
          "userId": {
            "type": "string",
            "description": "User who uploaded (null for attendee uploads)"
          },
          "attendeeId": {
            "type": "string",
            "description": "Attendee who uploaded (for booking form uploads)"
          },
          "appointmentId": {
            "type": "string",
            "description": "Associated appointment (for booking form uploads)"
          },
          "folderId": {
            "type": "string",
            "nullable": true,
            "description": "Library folder this file lives in (null = root). Library files only."
          },
          "source": {
            "description": "Source of the upload",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileAssetSource"
              }
            ]
          },
          "status": {
            "description": "Upload status",
            "allOf": [
              {
                "$ref": "#/components/schemas/FileAssetStatus"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "attendee": {
            "$ref": "#/components/schemas/Attendee"
          },
          "appointment": {
            "$ref": "#/components/schemas/Appointment"
          },
          "folder": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/FileFolder"
              }
            ]
          },
          "formPdfState": {
            "type": "string"
          },
          "formPdfFormId": {
            "type": "string",
            "nullable": true,
            "description": "Form this fenced pending/final PDF belongs to."
          },
          "formPdfDataFieldId": {
            "type": "number",
            "nullable": true,
            "description": "DataField the PDF-template field is bound to."
          },
          "formPdfDataFieldName": {
            "type": "string",
            "nullable": true,
            "description": "Submission key of the PDF-template field."
          },
          "formPdfTemplateFileAssetId": {
            "type": "string",
            "nullable": true,
            "description": "Server-owned template FileAsset the render was produced from."
          },
          "formPdfSourceSha256": {
            "type": "string",
            "nullable": true,
            "description": "SHA-256 of the exact stored template/source bytes at render time."
          },
          "formPdfSchemaRevision": {
            "type": "number",
            "nullable": true,
            "description": "Published schema revision the render intent was validated against."
          },
          "formPdfSchemaSha256": {
            "type": "string",
            "nullable": true,
            "description": "Canonical SHA-256 of that exact schema."
          },
          "formPdfRenderInputSha256": {
            "type": "string",
            "nullable": true,
            "description": "Canonical SHA-256 of the bounded render intent."
          },
          "formPdfRenderSnapshot": {
            "type": "object",
            "nullable": true,
            "description": "Bounded render snapshot: shared-value hashes plus raw/normalized mark\nhashes and dimensions. Never raw form answers, mark images, or PDF bytes."
          },
          "formPdfCurrentClaimId": {
            "type": "string",
            "nullable": true,
            "description": "Attempt-group claim currently allowed to finalize this artifact."
          },
          "formPdfSealEvidence": {
            "type": "object",
            "nullable": true,
            "description": "Bounded FormPdfSealEvidenceProjection persisted by the publish\ntransaction after verification (explicit unverified projection with null\nseal facts when signing is disabled)."
          },
          "formPdfSealEvidenceSha256": {
            "type": "string",
            "nullable": true,
            "description": "Canonical SHA-256 of the persisted seal-evidence projection."
          },
          "formPdfSigningCertificateSha256": {
            "type": "string",
            "nullable": true,
            "description": "Document-signing certificate fingerprint of the sealed artifact."
          },
          "documentPreparedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "DB-clock instant the reservation froze the render inputs."
          },
          "formPdfTimeZone": {
            "type": "string",
            "nullable": true,
            "description": "Published form/company IANA time zone snapshot at prepare time."
          },
          "formPdfSigningDate": {
            "type": "string",
            "nullable": true,
            "description": "Server-derived local signing date (YYYY-MM-DD) frozen at prepare time."
          },
          "formPdfPreviewDeadlineAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Preview acceptance deadline frozen by the reservation transaction."
          },
          "formPdfPreviewFetchedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Set exactly once after a preview stream completed without disconnect."
          },
          "documentAcceptedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "DB-clock instant the respondent accepted the exact rendered bytes."
          },
          "rawExpiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Hard expiry of an unconsumed server-rendered pending artifact. Null on\nevery legacy row; the default `formPdfState` guarantees such rows are\nnever treated as claimable fenced work."
          },
          "formPdfClaimLeaseExpiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Finalization claim lease expiry for the current attempt group."
          },
          "formPdfConsumedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Set when a winning form submission consumed this pending artifact."
          }
        },
        "required": [
          "id",
          "filename",
          "originalFilename",
          "mimeType",
          "sizeBytes",
          "s3Key",
          "companyId",
          "source",
          "status",
          "createdAt",
          "updatedAt",
          "formPdfState",
          "formPdfFormId",
          "formPdfDataFieldId",
          "formPdfDataFieldName",
          "formPdfTemplateFileAssetId",
          "formPdfSourceSha256",
          "formPdfSchemaRevision",
          "formPdfSchemaSha256",
          "formPdfRenderInputSha256",
          "formPdfRenderSnapshot",
          "formPdfCurrentClaimId",
          "formPdfSealEvidence",
          "formPdfSealEvidenceSha256",
          "formPdfSigningCertificateSha256",
          "documentPreparedAt",
          "formPdfTimeZone",
          "formPdfSigningDate",
          "formPdfPreviewDeadlineAt",
          "formPdfPreviewFetchedAt",
          "documentAcceptedAt",
          "rawExpiresAt",
          "formPdfClaimLeaseExpiresAt",
          "formPdfConsumedAt"
        ]
      },
      "SpaceAgreementResponseStatus": {
        "type": "string",
        "enum": [
          "pending",
          "signed",
          "declined"
        ]
      },
      "SpaceAgreementResponse": {
        "type": "object",
        "properties": {
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceAgreementResponseStatus"
              }
            ]
          },
          "signedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "agreement": {
            "$ref": "#/components/schemas/SpaceAgreement"
          },
          "agreementId": {
            "type": "string"
          },
          "view": {
            "$ref": "#/components/schemas/SpaceView"
          },
          "viewId": {
            "type": "string"
          },
          "viewer": {
            "$ref": "#/components/schemas/SpaceViewer"
          },
          "viewerId": {
            "type": "string"
          },
          "signedFileAsset": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/FileAsset"
              }
            ]
          },
          "signedFileAssetId": {
            "type": "string",
            "nullable": true
          },
          "signatureRequest": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SignatureRequest"
              }
            ]
          },
          "signatureRequestId": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "status",
          "metadata",
          "createdAt",
          "updatedAt",
          "id",
          "agreementId",
          "viewId",
          "viewerId"
        ]
      },
      "SpaceAgreement": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "version": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          },
          "fileAsset": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/FileAsset"
              }
            ]
          },
          "fileAssetId": {
            "type": "string",
            "nullable": true
          },
          "signatureRequestId": {
            "type": "string",
            "nullable": true,
            "deprecated": true
          },
          "createdByUserId": {
            "type": "string",
            "nullable": true
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceAgreementResponse"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceLink"
            }
          }
        },
        "required": [
          "name",
          "required",
          "createdAt",
          "updatedAt",
          "id",
          "spaceId"
        ]
      },
      "SpacePermissionGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "spaceId"
        ]
      },
      "SpaceLink": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "requireEmail": {
            "type": "boolean"
          },
          "requireEmailOtp": {
            "type": "boolean"
          },
          "allowMagicLink": {
            "type": "boolean",
            "description": "Offers \"email me a login link\" on the gate as an alternative to typing a\ncode: the portal mails an invite-token magic link, which verifies the\naddress like the Share dialog's invite does. Off by default — an owner\nturning the code gate on may not want a second, token-based way in."
          },
          "allowSmsOtp": {
            "type": "boolean",
            "description": "Offers \"code by SMS\" next to the email code on a code-gated link. The\ncode goes to the mobile number the owner stored for that person, so it\nonly helps people who have one. Off by default: SMS costs credits."
          },
          "allowList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "denyList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowDownload": {
            "type": "boolean"
          },
          "allowUploads": {
            "type": "boolean",
            "description": "When on, visitors of this link may upload files back to the space."
          },
          "allowViewerShare": {
            "type": "boolean",
            "description": "Whether a visitor may loop a colleague in via the portal's \"share with\nothers\" button. Default true preserves the pre-toggle behavior for\nexisting links; turning it off hides the button and rejects the invite."
          },
          "enableWatermark": {
            "type": "boolean"
          },
          "watermarkConfig": {
            "$ref": "#/components/schemas/SpaceWatermarkConfig"
          },
          "enableNda": {
            "type": "boolean"
          },
          "enableScreenshotProtection": {
            "type": "boolean"
          },
          "enableNotification": {
            "type": "boolean"
          },
          "customFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceCustomField"
            }
          },
          "language": {
            "type": "string",
            "nullable": true,
            "description": "Forced portal language for this link (`en` | `de`). Null = auto-detect from\nthe visitor's browser. The portal UI only ships English + German today."
          },
          "audienceGroupId": {
            "type": "string",
            "nullable": true
          },
          "ogTitle": {
            "type": "string",
            "nullable": true,
            "description": "Opt-in custom link preview (Open Graph). When `ogTitle` is unset the public\npreview stays generic so a confidential Space name never leaks in a shared\nlink unfurl."
          },
          "ogDescription": {
            "type": "string",
            "nullable": true
          },
          "ogImageUrl": {
            "type": "string",
            "nullable": true
          },
          "isArchived": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          },
          "domain": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomDomain"
              }
            ]
          },
          "domainId": {
            "type": "string",
            "nullable": true
          },
          "agreement": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceAgreement"
              }
            ]
          },
          "agreementId": {
            "type": "string",
            "nullable": true
          },
          "permissionGroup": {
            "nullable": true,
            "description": "Link-scoped permission group. When set, a viewer of this link only sees the\nitems the group grants (combined with their matched viewer groups). SET NULL\non group delete so deleting a group reverts the link to unrestricted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpacePermissionGroup"
              }
            ]
          },
          "permissionGroupId": {
            "type": "string",
            "nullable": true
          },
          "createdByUserId": {
            "type": "string",
            "nullable": true
          },
          "views": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceView"
            }
          }
        },
        "required": [
          "name",
          "slug",
          "requireEmail",
          "requireEmailOtp",
          "allowMagicLink",
          "allowSmsOtp",
          "allowList",
          "denyList",
          "allowDownload",
          "allowUploads",
          "allowViewerShare",
          "enableWatermark",
          "watermarkConfig",
          "enableNda",
          "enableScreenshotProtection",
          "enableNotification",
          "customFields",
          "isArchived",
          "createdAt",
          "updatedAt",
          "id",
          "spaceId"
        ]
      },
      "SpaceNotificationType": {
        "type": "object",
        "properties": {
          "inApp": {
            "type": "boolean"
          },
          "email": {
            "type": "boolean"
          }
        }
      },
      "SpaceNotificationSettings": {
        "type": "object",
        "properties": {
          "spaceViewed": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "blockViewed": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "ctaClicked": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "commentAdded": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "agreementSigned": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "viewerLive": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "viewedNoBooking": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "taskToggled": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "fileUploaded": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "offerAccepted": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          },
          "assistantMessage": {
            "$ref": "#/components/schemas/SpaceNotificationType"
          }
        },
        "required": [
          "spaceViewed",
          "blockViewed",
          "ctaClicked",
          "commentAdded",
          "agreementSigned",
          "viewerLive",
          "viewedNoBooking"
        ]
      },
      "SpaceNotification": {
        "type": "object",
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/SpaceNotificationSettings"
          },
          "id": {
            "type": "string"
          },
          "space": {
            "$ref": "#/components/schemas/Space"
          },
          "spaceId": {
            "type": "string"
          },
          "user": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "viewer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceViewer"
              }
            ]
          },
          "viewerId": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "settings",
          "id",
          "spaceId"
        ]
      },
      "Space": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceStatus"
              }
            ]
          },
          "settings": {
            "$ref": "#/components/schemas/SpaceSettings"
          },
          "internalNotes": {
            "type": "string",
            "nullable": true
          },
          "brandOverrides": {
            "$ref": "#/components/schemas/SpaceBrandOverrides"
          },
          "isFrozen": {
            "type": "boolean"
          },
          "frozenAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "archiveHash": {
            "type": "string",
            "nullable": true
          },
          "archiveUrl": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "nullable": true
          },
          "customerCompany": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerCompany"
              }
            ]
          },
          "customerCompanyId": {
            "type": "string",
            "nullable": true
          },
          "deal": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CrmDeal"
              }
            ]
          },
          "dealId": {
            "type": "string",
            "nullable": true
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceSection"
            }
          },
          "sectionOrder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "frozenById": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceLink"
            }
          },
          "views": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceView"
            }
          },
          "agreements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceAgreement"
            }
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceNotification"
            }
          }
        },
        "required": [
          "name",
          "status",
          "settings",
          "brandOverrides",
          "isFrozen",
          "createdAt",
          "updatedAt",
          "id",
          "companyId",
          "sectionOrder"
        ]
      },
      "SpaceViewEventType": {
        "type": "string",
        "enum": [
          "linkOpen",
          "spaceViewed",
          "blockView",
          "pdfPageView",
          "download",
          "ctaClick",
          "share",
          "agreementSigned",
          "upload",
          "bookingFromSpace",
          "reaction",
          "taskToggle",
          "offerAccepted",
          "formSubmitted"
        ]
      },
      "SpaceViewEvent": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceViewEventType"
              }
            ]
          },
          "objectId": {
            "type": "string",
            "nullable": true
          },
          "objectName": {
            "type": "string",
            "nullable": true
          },
          "startedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "endedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "activeTimeMs": {
            "type": "number",
            "nullable": true
          },
          "completionPercent": {
            "type": "number",
            "nullable": true
          },
          "pageNumber": {
            "type": "number",
            "nullable": true
          },
          "device": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceViewDeviceMetadata"
              }
            ]
          },
          "geo": {
            "type": "object",
            "nullable": true
          },
          "version": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "view": {
            "$ref": "#/components/schemas/SpaceView"
          },
          "viewId": {
            "type": "string"
          },
          "space": {
            "$ref": "#/components/schemas/Space"
          },
          "spaceId": {
            "type": "string"
          },
          "block": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBlock"
              }
            ]
          },
          "blockId": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "type",
          "metadata",
          "createdAt",
          "id",
          "viewId",
          "spaceId"
        ]
      },
      "SpaceView": {
        "type": "object",
        "properties": {
          "ipAddress": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "nullable": true
          },
          "geo": {
            "type": "object",
            "nullable": true
          },
          "device": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceViewDeviceMetadata"
              }
            ]
          },
          "referrer": {
            "type": "string",
            "nullable": true
          },
          "isPreview": {
            "type": "boolean",
            "description": "Owner \"view as client\" session, minted from the builder. Excluded from\nanalytics, engagement, presence and notifications, and exempt from the\npublished-status gate so a draft space can be previewed like the buyer\nwill see it."
          },
          "verified": {
            "type": "boolean",
            "description": "Session-scoped email verification: true only when this view proved control\nof the viewer's email at creation (a valid invite magic-link token, or\nemail OTP). Gates the personal smart blocks (meetings, action-plan\ncheck-off, portal assistant). Deliberately NOT inherited from the\npersistent `SpaceViewer.verified` flag, which is shared across sessions and\nwould let anyone claim an invited email in a fresh session."
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string"
          },
          "endedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "space": {
            "$ref": "#/components/schemas/Space"
          },
          "spaceId": {
            "type": "string"
          },
          "link": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceLink"
              }
            ]
          },
          "linkId": {
            "type": "string",
            "nullable": true
          },
          "viewer": {
            "$ref": "#/components/schemas/SpaceViewer"
          },
          "viewerId": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceViewEvent"
            }
          }
        },
        "required": [
          "verified",
          "startedAt",
          "lastSeenAt",
          "id",
          "companyId",
          "spaceId",
          "viewerId"
        ]
      },
      "SpaceViewer": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true,
            "description": "Null only for a person invited by mobile number alone (a phone-booked\ncall): they get in through the SMS invite link, which carries the token.\nPostgres treats NULLs as distinct, so the (company, email) unique key\nstill holds for everyone with an address."
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "description": "Mobile number in E.164, set by the owner (People tab) or taken from a\nbooking. The portal sends login codes here, never to a number a visitor\ntypes, so the gate cannot be used to text arbitrary numbers."
          },
          "verified": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "lastSeenAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "customerContact": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerContact"
              }
            ]
          },
          "customerContactId": {
            "type": "string",
            "nullable": true
          },
          "views": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceView"
            }
          }
        },
        "required": [
          "verified",
          "createdAt",
          "updatedAt",
          "id",
          "companyId"
        ]
      },
      "SpaceComment": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string",
            "nullable": true,
            "description": "When set, the comment belongs to a specific action-plan step (task) within\nthe block, keyed by the task's stable id. Null = a block-level comment /\nquestion (the existing Q&A). Indexed with the block (class-level composite)\nfor per-step lookups."
          },
          "text": {
            "type": "string"
          },
          "isPublishedFaq": {
            "type": "boolean",
            "description": "When true the comment (a question or its answer) is published as a public\nFAQ entry, visible to every viewer of the Space."
          },
          "isInternal": {
            "type": "boolean",
            "description": "Team-only note. Internal comments never appear in any viewer-facing\nsurface (FAQ, public payloads) and cannot be published as FAQ; replies to\nan internal comment are forced internal."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "blockId": {
            "type": "string"
          },
          "authorUserId": {
            "type": "string",
            "nullable": true
          },
          "authorViewer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceViewer"
              }
            ]
          },
          "authorViewerId": {
            "type": "string",
            "nullable": true
          },
          "parent": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceComment"
              }
            ]
          },
          "parentId": {
            "type": "string",
            "nullable": true
          },
          "replies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceComment"
            }
          }
        },
        "required": [
          "text",
          "isPublishedFaq",
          "isInternal",
          "createdAt",
          "updatedAt",
          "id",
          "blockId"
        ]
      },
      "SpaceBlock": {
        "type": "object",
        "properties": {
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBlockKind"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceVisibility"
              }
            ]
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceItemStatus"
              }
            ]
          },
          "index": {
            "type": "number"
          },
          "allowDownload": {
            "type": "boolean"
          },
          "thumbnail": {
            "type": "object"
          },
          "taskType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceTaskType"
              }
            ]
          },
          "dueDate": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "done": {
            "type": "boolean"
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlockTask"
            }
          },
          "cta": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBlockCta"
              }
            ]
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlockResource"
            }
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "text": {
            "type": "object",
            "nullable": true
          },
          "html": {
            "type": "string",
            "nullable": true,
            "description": "html-block artifact document. Stored verbatim (no sanitizer preserves a\n working app); the opaque-origin sandboxed iframe is the security\n boundary. Never render this field outside that frame."
          },
          "salesDocumentId": {
            "type": "string",
            "nullable": true,
            "description": "OFFER blocks: the shared invoicing SalesDocument (plain id — the\n invoicing module stays decoupled, mirroring SalesDocument.dealId)."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "sectionId": {
            "type": "string"
          },
          "content": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Content"
              }
            ]
          },
          "contentId": {
            "type": "string",
            "nullable": true
          },
          "documentId": {
            "type": "string",
            "nullable": true
          },
          "internalOwnerId": {
            "type": "string",
            "nullable": true
          },
          "ownerContact": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerContact"
              }
            ]
          },
          "ownerContactId": {
            "type": "string",
            "nullable": true
          },
          "stakeholders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerContact"
            }
          },
          "stakeholderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meetingType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "meetingTypeId": {
            "type": "string",
            "nullable": true
          },
          "form": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Form"
              }
            ]
          },
          "formId": {
            "type": "string",
            "nullable": true
          },
          "signatureRequest": {
            "nullable": true,
            "description": "The document this block asks the client to sign.\n\nSet on an `embed` block rather than a kind of its own: the signing page is\nalready a real page the signature module serves, so the portal only has to\npoint at it. A new block kind would have meant widening a Postgres enum,\nwhich in this repo rewrites the whole table under a five second lock.\n\nThe block carries the REQUEST. Which link a given viewer gets, and whether\nit is framed at all, is resolved per viewer at read time - see\n`functions/portal-signing.ts`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SignatureRequest"
              }
            ]
          },
          "signatureRequestId": {
            "type": "string",
            "nullable": true
          },
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceComment"
            }
          }
        },
        "required": [
          "kind",
          "title",
          "description",
          "visibility",
          "index",
          "allowDownload",
          "thumbnail",
          "done",
          "tasks",
          "resources",
          "createdAt",
          "updatedAt",
          "id",
          "sectionId",
          "stakeholderIds"
        ]
      },
      "SpaceSection": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceVisibility"
              }
            ]
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceItemStatus"
              }
            ]
          },
          "index": {
            "type": "number"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlock"
            }
          },
          "blockOrder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "title",
          "visibility",
          "index",
          "createdAt",
          "updatedAt",
          "id",
          "spaceId",
          "blockOrder"
        ]
      },
      "CreateSpaceFromPresetDto": {
        "type": "object",
        "properties": {
          "presetId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "brandOverrides": {
            "$ref": "#/components/schemas/SpaceBrandOverrides"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "customerCompanyId": {
            "type": "string",
            "nullable": true
          },
          "customerCompanyName": {
            "type": "string",
            "description": "Create-and-link a customer company by name when no id is known (the\n enriched company from the creation dialog)."
          },
          "customerCompany": {
            "description": "Enrichment for a newly-created customer company (ignored when an existing\n company is linked by id).",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceCustomerCompanyEnrichmentDto"
              }
            ]
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true,
            "description": "Link to a CRM company: finds or creates the client-company record bridged\n to that CRM record. Ignored when `customerCompanyId` is set."
          },
          "dealId": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "type": "string",
            "nullable": true,
            "description": "Language for the scaffolded (buyer-facing) section/block text. Defaults\n to the company language; the dialog passes the current UI language so what\n the operator previews matches what gets created."
          }
        },
        "required": [
          "presetId"
        ]
      },
      "CreateSpaceFromTemplateDto": {
        "type": "object",
        "properties": {
          "sourceSpaceId": {
            "type": "string",
            "format": "uuid",
            "description": "The space to copy: one of your templates (GET /space/templates) or any of your spaces"
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Name of the new portal. Defaults to the template name plus the client name"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000
          },
          "brandOverrides": {
            "description": "The client's brand (logo, colours). Applied over the template's look; the template's client identity is dropped",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBrandOverrides"
              }
            ]
          },
          "customerCompanyId": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "Link the portal to an existing client company"
          },
          "customerCompanyName": {
            "type": "string",
            "maxLength": 200,
            "description": "Create and link a client company by name when no id is known. Also used to personalise the copied text"
          },
          "customerCompany": {
            "$ref": "#/components/schemas/SpaceCustomerCompanyEnrichmentDto"
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "dealId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        },
        "required": [
          "sourceSpaceId"
        ]
      },
      "CreateSpaceFromMiraDto": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "nullable": true,
            "description": "The operator's freeform brief for the portal (what the deal/client is\n about, what to include). Optional; enrichment context is used too.",
            "maxLength": 2000
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "brandOverrides": {
            "$ref": "#/components/schemas/SpaceBrandOverrides"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "customerCompanyId": {
            "type": "string",
            "nullable": true
          },
          "customerCompanyName": {
            "type": "string"
          },
          "customerCompany": {
            "description": "Enrichment for a newly-created customer company (ignored when an existing\n company is linked by id).",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceCustomerCompanyEnrichmentDto"
              }
            ]
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true
          },
          "dealId": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "EnrichSpaceDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "domain": {
            "type": "string"
          }
        }
      },
      "CompanyContextRequestDto": {
        "type": "object",
        "properties": {
          "activationSessionId": {
            "type": "string",
            "format": "uuid"
          },
          "dependencyAttemptId": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string",
            "maxLength": 253,
            "example": "northstar.studio"
          }
        },
        "required": [
          "activationSessionId",
          "dependencyAttemptId",
          "domain"
        ]
      },
      "GenerateSpaceArtifactDto": {
        "type": "object",
        "properties": {
          "brief": {
            "type": "string",
            "maxLength": 2000
          },
          "model": {
            "type": "string",
            "nullable": true,
            "description": "Gateway model alias from the picker; the service clamps unknown values\n to the configured default (never a raw pass-through).",
            "maxLength": 100
          },
          "currentHtml": {
            "type": "string",
            "nullable": true,
            "description": "Existing artifact to revise instead of starting fresh.",
            "maxLength": 150000
          }
        },
        "required": [
          "brief"
        ]
      },
      "UpdateSpaceDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "nullable": true
          },
          "customerCompanyId": {
            "type": "string",
            "nullable": true
          },
          "customerCompany": {
            "description": "Enrichment for a newly-created customer company (ignored when an existing\n company is linked by id).",
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceCustomerCompanyEnrichmentDto"
              }
            ]
          },
          "dealId": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "$ref": "#/components/schemas/SpaceSettings"
          },
          "brandOverrides": {
            "$ref": "#/components/schemas/SpaceBrandOverrides"
          },
          "internalNotes": {
            "type": "string",
            "nullable": true
          },
          "sectionOrder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PublishSpaceRecapDto": {
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "type": "string",
            "description": "Owner-reviewed summary text; defaults to the meeting's summary.",
            "maxLength": 20000
          },
          "shareTranscript": {
            "type": "boolean",
            "description": "Also share the verbatim transcript with this portal.\n\nAbsent means no, on every publish. A transcript is a different disclosure\nfrom a reviewed summary - it is everything anyone said, including the\nsentence a rep would never have written down - so it is asked for\nexplicitly each time rather than inherited from a previous publish."
          }
        },
        "required": [
          "appointmentId"
        ]
      },
      "SpaceRecap": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "Meeting name snapshot shown to the viewer."
          },
          "summary": {
            "type": "string",
            "description": "The published summary snapshot (markdown), redacted at publish time."
          },
          "meetingStart": {
            "format": "date-time",
            "type": "string",
            "description": "Meeting start snapshot for ordering in the portal."
          },
          "publishedByUserId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          },
          "appointmentId": {
            "type": "string"
          },
          "transcript": {
            "type": "string",
            "nullable": true,
            "description": "The published transcript snapshot, when the owner shared one.\n\nSnapshotted for the same reason the summary is: the portal must never read\na live transcript, so a later edit or an erasure request cannot reach a\nbuyer through a page that was already open.\n\nA transcript is a different disclosure from a summary. A summary is\nreviewed prose about the meeting; a transcript is everything anyone said,\nincluding the sentence a rep would not have written down. So it is stored\nseparately, shared separately, and gated on its own timestamp below."
          },
          "transcriptSharedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the transcript was shared with the portal. Null means never.\n\nA timestamp rather than a boolean or an enum: null is the only default a\nrow can acquire without anybody choosing it, so every recap that already\nexists, and every one written by an older release during a rollout, is\nclosed. The gate fails closed by construction rather than by remembering\nto set a flag."
          }
        },
        "required": [
          "id",
          "title",
          "summary",
          "meetingStart",
          "createdAt",
          "updatedAt",
          "companyId",
          "spaceId",
          "appointmentId"
        ]
      },
      "CloneSpaceDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Name of the copy. Defaults to the source name with a suffix"
          }
        }
      },
      "CreateSpaceSectionDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceVisibility"
              }
            ]
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceItemStatus"
              }
            ]
          },
          "index": {
            "type": "number"
          }
        },
        "required": [
          "title"
        ]
      },
      "InsertSectionFromTemplateDto": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid",
            "description": "A section template of this company"
          },
          "index": {
            "type": "number",
            "minimum": 0,
            "description": "Position among the sections. Defaults to the end"
          }
        },
        "required": [
          "templateId"
        ]
      },
      "UpdateSpaceSectionDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceVisibility"
              }
            ]
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceItemStatus"
              }
            ]
          },
          "index": {
            "type": "number"
          },
          "blockOrder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateSpaceBlockDto": {
        "type": "object",
        "properties": {
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBlockKind"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceVisibility"
              }
            ]
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceItemStatus"
              }
            ]
          },
          "index": {
            "type": "number"
          },
          "contentId": {
            "type": "string",
            "nullable": true
          },
          "documentId": {
            "type": "string",
            "nullable": true,
            "minLength": 21,
            "maxLength": 21
          },
          "allowDownload": {
            "type": "boolean"
          },
          "thumbnail": {
            "type": "object"
          },
          "taskType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceTaskType"
              }
            ]
          },
          "dueDate": {
            "type": "string",
            "nullable": true
          },
          "done": {
            "type": "boolean"
          },
          "tasks": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlockTask"
            }
          },
          "internalOwnerId": {
            "type": "string",
            "nullable": true
          },
          "ownerContactId": {
            "type": "string",
            "nullable": true
          },
          "stakeholderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cta": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBlockCta"
              }
            ]
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlockResource"
            }
          },
          "meetingTypeId": {
            "type": "string",
            "nullable": true
          },
          "formId": {
            "type": "string",
            "nullable": true
          },
          "signatureRequestId": {
            "type": "string",
            "nullable": true,
            "description": "A document this block asks the client to sign.\n\nChecked against the owner's own company before it is attached: the\nsigners behind a request become signing links for this portal's viewers,\nso attaching another company's request would hand its tokens out.",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "text": {
            "type": "object",
            "nullable": true
          },
          "html": {
            "type": "string",
            "nullable": true,
            "maxLength": 150000
          }
        },
        "required": [
          "kind",
          "title"
        ]
      },
      "UpdateSpaceBlockDto": {
        "type": "object",
        "properties": {
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBlockKind"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceVisibility"
              }
            ]
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceItemStatus"
              }
            ]
          },
          "index": {
            "type": "number"
          },
          "contentId": {
            "type": "string",
            "nullable": true
          },
          "documentId": {
            "type": "string",
            "nullable": true,
            "minLength": 21,
            "maxLength": 21
          },
          "allowDownload": {
            "type": "boolean"
          },
          "thumbnail": {
            "type": "object"
          },
          "taskType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceTaskType"
              }
            ]
          },
          "dueDate": {
            "type": "string",
            "nullable": true
          },
          "done": {
            "type": "boolean"
          },
          "tasks": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlockTask"
            }
          },
          "internalOwnerId": {
            "type": "string",
            "nullable": true
          },
          "ownerContactId": {
            "type": "string",
            "nullable": true
          },
          "stakeholderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cta": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceBlockCta"
              }
            ]
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlockResource"
            }
          },
          "meetingTypeId": {
            "type": "string",
            "nullable": true
          },
          "formId": {
            "type": "string",
            "nullable": true
          },
          "signatureRequestId": {
            "type": "string",
            "nullable": true,
            "description": "A document this block asks the client to sign.\n\nChecked against the owner's own company before it is attached: the\nsigners behind a request become signing links for this portal's viewers,\nso attaching another company's request would hand its tokens out.",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "text": {
            "type": "object",
            "nullable": true
          },
          "html": {
            "type": "string",
            "nullable": true,
            "maxLength": 150000
          }
        }
      },
      "CreateSpaceLinkDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "domainId": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "nullable": true
          },
          "requireEmail": {
            "type": "boolean"
          },
          "requireEmailOtp": {
            "type": "boolean"
          },
          "allowMagicLink": {
            "type": "boolean"
          },
          "allowSmsOtp": {
            "type": "boolean",
            "description": "Offer \"code by SMS\" on a code-gated link."
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "allowList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "denyList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowDownload": {
            "type": "boolean"
          },
          "allowUploads": {
            "type": "boolean"
          },
          "allowViewerShare": {
            "type": "boolean"
          },
          "enableWatermark": {
            "type": "boolean"
          },
          "watermarkConfig": {
            "$ref": "#/components/schemas/SpaceWatermarkConfig"
          },
          "enableNda": {
            "type": "boolean"
          },
          "agreementId": {
            "type": "string",
            "nullable": true
          },
          "enableScreenshotProtection": {
            "type": "boolean"
          },
          "enableNotification": {
            "type": "boolean"
          },
          "customFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceCustomField"
            }
          },
          "language": {
            "type": "string",
            "nullable": true,
            "description": "Forced portal language; null/absent = auto-detect.",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "no",
              "nl",
              "it",
              "pl",
              "se",
              "tr",
              "da"
            ]
          },
          "audienceGroupId": {
            "type": "string",
            "nullable": true
          },
          "permissionGroupId": {
            "type": "string",
            "nullable": true,
            "description": "Link-scoped permission group. Restricts this link to the items the group grants."
          },
          "ogTitle": {
            "type": "string",
            "nullable": true,
            "maxLength": 200,
            "description": "Custom link-preview (Open Graph) title. Enables custom preview."
          },
          "ogDescription": {
            "type": "string",
            "nullable": true,
            "maxLength": 300
          },
          "ogImageUrl": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateSpaceLinkDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "domainId": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "nullable": true
          },
          "requireEmail": {
            "type": "boolean"
          },
          "requireEmailOtp": {
            "type": "boolean"
          },
          "allowMagicLink": {
            "type": "boolean"
          },
          "allowSmsOtp": {
            "type": "boolean",
            "description": "Offer \"code by SMS\" on a code-gated link."
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "allowList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "denyList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowDownload": {
            "type": "boolean"
          },
          "allowUploads": {
            "type": "boolean"
          },
          "allowViewerShare": {
            "type": "boolean"
          },
          "enableWatermark": {
            "type": "boolean"
          },
          "watermarkConfig": {
            "$ref": "#/components/schemas/SpaceWatermarkConfig"
          },
          "enableNda": {
            "type": "boolean"
          },
          "agreementId": {
            "type": "string",
            "nullable": true
          },
          "enableScreenshotProtection": {
            "type": "boolean"
          },
          "enableNotification": {
            "type": "boolean"
          },
          "customFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceCustomField"
            }
          },
          "language": {
            "type": "string",
            "nullable": true,
            "description": "Forced portal language; null/absent = auto-detect.",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "no",
              "nl",
              "it",
              "pl",
              "se",
              "tr",
              "da"
            ]
          },
          "audienceGroupId": {
            "type": "string",
            "nullable": true
          },
          "permissionGroupId": {
            "type": "string",
            "nullable": true,
            "description": "Link-scoped permission group. Restricts this link to the items the group grants."
          },
          "ogTitle": {
            "type": "string",
            "nullable": true,
            "maxLength": 200,
            "description": "Custom link-preview (Open Graph) title. Enables custom preview."
          },
          "ogDescription": {
            "type": "string",
            "nullable": true,
            "maxLength": 300
          },
          "ogImageUrl": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000
          },
          "isArchived": {
            "type": "boolean"
          }
        }
      },
      "CreateSpaceCommentDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "parentId": {
            "type": "string",
            "nullable": true
          },
          "internal": {
            "type": "boolean",
            "description": "Team-only note; never shown to viewers. Replies to an internal comment\n are internal regardless of this flag."
          }
        },
        "required": [
          "text"
        ]
      },
      "PublishSpaceFaqDto": {
        "type": "object",
        "properties": {
          "published": {
            "type": "boolean"
          }
        },
        "required": [
          "published"
        ]
      },
      "CreateSpaceAgreementDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "fileAssetId": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "version": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateSpaceAgreementDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "fileAssetId": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "version": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UpdateSpaceNotificationDto": {
        "type": "object",
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/SpaceNotificationSettings"
          }
        },
        "required": [
          "settings"
        ]
      },
      "SpaceFormSubmissionSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "submittedAt": {
            "type": "string"
          },
          "viewerId": {
            "type": "object",
            "nullable": true
          },
          "viewerEmail": {
            "type": "object",
            "nullable": true
          },
          "data": {
            "type": "object"
          }
        },
        "required": [
          "id",
          "submittedAt",
          "data"
        ]
      },
      "SpaceFormBlockStatus": {
        "type": "object",
        "properties": {
          "blockId": {
            "type": "string"
          },
          "sectionId": {
            "type": "string"
          },
          "blockTitle": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "hidden",
              "locked",
              "visible"
            ]
          },
          "formId": {
            "type": "string"
          },
          "formName": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceFormFieldMeta"
            }
          },
          "submitted": {
            "type": "boolean"
          },
          "latestSubmissionAt": {
            "type": "object",
            "nullable": true
          },
          "submissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceFormSubmissionSummary"
            }
          }
        },
        "required": [
          "blockId",
          "sectionId",
          "blockTitle",
          "visibility",
          "formId",
          "formName",
          "fields",
          "submitted",
          "submissions"
        ]
      },
      "SpaceFormStatus": {
        "type": "object",
        "properties": {
          "spaceId": {
            "type": "string"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceFormBlockStatus"
            }
          }
        },
        "required": [
          "spaceId",
          "blocks"
        ]
      },
      "InviteSpacePersonDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "sendEmail": {
            "type": "boolean",
            "description": "Email the person the portal link (best-effort)."
          }
        },
        "required": [
          "email"
        ]
      },
      "CreateSpacePermissionGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateSpacePermissionGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "name"
        ]
      },
      "SpacePermissionGroupKind": {
        "type": "string",
        "enum": [
          "permission",
          "viewer"
        ]
      },
      "SpaceAccessItemType": {
        "type": "string",
        "enum": [
          "section",
          "block"
        ]
      },
      "SpaceItemAccess": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "groupKind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpacePermissionGroupKind"
              }
            ]
          },
          "itemType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceAccessItemType"
              }
            ]
          },
          "itemId": {
            "type": "string"
          },
          "canView": {
            "type": "boolean"
          },
          "canDownload": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "groupId",
          "groupKind",
          "itemType",
          "itemId",
          "canView",
          "canDownload",
          "createdAt",
          "updatedAt"
        ]
      },
      "SpaceItemAccessEntryDto": {
        "type": "object",
        "properties": {
          "itemType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceAccessItemType"
              }
            ]
          },
          "itemId": {
            "type": "string",
            "maxLength": 200
          },
          "canView": {
            "type": "boolean"
          },
          "canDownload": {
            "type": "boolean"
          }
        },
        "required": [
          "itemType",
          "itemId",
          "canView",
          "canDownload"
        ]
      },
      "SetSpaceItemAccessDto": {
        "type": "object",
        "properties": {
          "entries": {
            "maxItems": 2000,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceItemAccessEntryDto"
            }
          }
        },
        "required": [
          "entries"
        ]
      },
      "SpaceViewerGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "domains": {
            "description": "Email addresses or domains (`example.com`, `@example.com`, `*.example.com`).",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowAll": {
            "type": "boolean",
            "description": "When true, every viewer matches this group regardless of email/domain."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "domains",
          "allowAll",
          "createdAt",
          "updatedAt",
          "spaceId"
        ]
      },
      "CreateSpaceViewerGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "domains": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowAll": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateSpaceViewerGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "domains": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowAll": {
            "type": "boolean"
          }
        }
      },
      "ShareOfferDto": {
        "type": "object",
        "properties": {}
      },
      "ShareSpaceInviteDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "email"
        ]
      },
      "RequestSpaceOtpDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "channel": {
            "type": "string",
            "description": "`sms` sends the code to the mobile number stored for this address, on a\n link that allows it. Defaults to email.",
            "enum": [
              "email",
              "sms"
            ]
          },
          "language": {
            "type": "string",
            "description": "Portal language the visitor is on; the code email follows it. A link that\n forces a language still wins.",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "no",
              "nl",
              "it",
              "pl",
              "se",
              "tr",
              "da"
            ]
          }
        },
        "required": [
          "email"
        ]
      },
      "CreateSpaceViewDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Optional only with an invite token: the invite names the person, which\n is how someone invited by mobile number alone gets in.",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "otp": {
            "type": "string",
            "maxLength": 10,
            "description": "Email OTP code, required for OTP links."
          },
          "inviteToken": {
            "type": "string",
            "maxLength": 128,
            "description": "Secret invite token from the invite email magic link. Proves the visitor controls the invited address and grants a verified session."
          },
          "agreementAccepted": {
            "type": "boolean",
            "description": "Click-through acceptance of the link NDA/agreement."
          },
          "referrer": {
            "type": "string"
          },
          "customFields": {
            "type": "object"
          }
        }
      },
      "ToggleSpaceTaskDto": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "done": {
            "type": "boolean"
          }
        },
        "required": [
          "taskId",
          "done"
        ]
      },
      "AcceptSpaceOfferDto": {
        "type": "object",
        "properties": {
          "signerName": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "signerName"
        ]
      },
      "RecordSpaceBookingDto": {
        "type": "object",
        "properties": {
          "blockId": {
            "type": "string",
            "maxLength": 200
          },
          "appointmentId": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "blockId",
          "appointmentId"
        ]
      },
      "AskSpaceAssistantDto": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": [
          "question"
        ]
      },
      "SubmitSpaceQuestionDto": {
        "type": "object",
        "properties": {
          "blockId": {
            "type": "string",
            "maxLength": 200
          },
          "text": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "blockId",
          "text"
        ]
      },
      "SubmitTaskCommentDto": {
        "type": "object",
        "properties": {
          "blockId": {
            "type": "string",
            "maxLength": 200
          },
          "taskId": {
            "type": "string",
            "maxLength": 200
          },
          "text": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "blockId",
          "taskId",
          "text"
        ]
      },
      "MarkTaskCommentsReadDto": {
        "type": "object",
        "properties": {
          "blockId": {
            "type": "string",
            "maxLength": 200
          },
          "taskId": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "blockId",
          "taskId"
        ]
      },
      "SubmitSpaceRatingDto": {
        "type": "object",
        "properties": {
          "rating": {
            "type": "number",
            "minimum": 1,
            "maximum": 5
          },
          "feedback": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000
          }
        },
        "required": [
          "rating"
        ]
      },
      "TrackSpaceViewEventDto": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceViewEventType"
              }
            ]
          },
          "blockId": {
            "type": "string",
            "nullable": true,
            "maxLength": 200
          },
          "objectId": {
            "type": "string",
            "nullable": true,
            "maxLength": 200
          },
          "objectName": {
            "type": "string",
            "nullable": true,
            "maxLength": 500
          },
          "startedAt": {
            "type": "string",
            "nullable": true
          },
          "endedAt": {
            "type": "string",
            "nullable": true
          },
          "activeTimeMs": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 86400000
          },
          "completionPercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100
          },
          "pageNumber": {
            "type": "number",
            "nullable": true,
            "minimum": 1
          },
          "version": {
            "type": "string",
            "nullable": true,
            "maxLength": 120
          },
          "metadata": {
            "type": "object"
          }
        },
        "required": [
          "type"
        ]
      },
      "TrackSpaceViewEventsDto": {
        "type": "object",
        "properties": {
          "events": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrackSpaceViewEventDto"
            }
          }
        },
        "required": [
          "events"
        ]
      },
      "SpaceSectionTemplate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "structure": {
            "type": "object"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "createdById": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "structure",
          "createdAt",
          "updatedAt",
          "id",
          "companyId"
        ]
      },
      "SpaceSectionTemplateStructureDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "blocks": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateSpaceBlockDto"
            }
          }
        },
        "required": [
          "title",
          "blocks"
        ]
      },
      "CreateSpaceSectionTemplateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "structure": {
            "$ref": "#/components/schemas/SpaceSectionTemplateStructureDto"
          }
        },
        "required": [
          "name",
          "structure"
        ]
      },
      "CreateSectionTemplateFromSectionDto": {
        "type": "object",
        "properties": {
          "spaceId": {
            "type": "string",
            "format": "uuid"
          },
          "sectionId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "Defaults to the section title"
          }
        },
        "required": [
          "spaceId",
          "sectionId"
        ]
      },
      "SpaceProposedUpdateStatus": {
        "type": "string",
        "enum": [
          "pending",
          "applied",
          "dismissed"
        ]
      },
      "SpaceProposedUpdate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SpaceProposedUpdateStatus"
              }
            ]
          },
          "meetingTitle": {
            "type": "string",
            "description": "Meeting name snapshot for the review card."
          },
          "meetingStart": {
            "format": "date-time",
            "type": "string",
            "description": "Meeting start snapshot for the review card."
          },
          "newSteps": {
            "description": "Drafted plan steps (already normalized/escaped), applied to the portal's\n first task block.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceBlockTask"
            }
          },
          "completedStepIds": {
            "description": "Existing plan step ids the meeting showed are done.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recapSummary": {
            "type": "string",
            "nullable": true,
            "description": "Client-facing recap draft; the owner edits it on the card before apply\n publishes it as a `SpaceRecap`."
          },
          "suggestedBooking": {
            "type": "string",
            "nullable": true,
            "description": "One-sentence next-meeting suggestion, shown on the review card only."
          },
          "resolvedByUserId": {
            "type": "string",
            "nullable": true
          },
          "resolvedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          },
          "appointmentId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "meetingTitle",
          "meetingStart",
          "newSteps",
          "completedStepIds",
          "createdAt",
          "updatedAt",
          "companyId",
          "spaceId",
          "appointmentId"
        ]
      },
      "ApplySpaceProposedUpdateDto": {
        "type": "object",
        "properties": {
          "recapSummary": {
            "type": "string",
            "description": "Owner-edited recap text; empty string skips publishing a recap. Defaults\n to the proposal's drafted recap.",
            "maxLength": 20000
          }
        }
      },
      "CreateProductDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Plain text. Derived from `descriptionHtml` when that is supplied, because this is what reaches the e-invoice XML (BT-154)."
          },
          "descriptionHtml": {
            "type": "string",
            "nullable": true,
            "maxLength": 20000,
            "description": "The description as authored: bold, italic, underline, links, lists."
          },
          "articleNumber": {
            "type": "string",
            "nullable": true,
            "maxLength": 64
          },
          "kind": {
            "enum": [
              "service",
              "good"
            ],
            "type": "string"
          },
          "unit": {
            "type": "string",
            "nullable": true,
            "maxLength": 32
          },
          "unitCode": {
            "type": "string",
            "maxLength": 8,
            "default": "C62"
          },
          "unitPrice": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "taxCategory": {
            "enum": [
              "S",
              "Z",
              "E",
              "AE",
              "K",
              "G",
              "O"
            ],
            "type": "string"
          },
          "taxRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "meetingTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "unitPrice"
        ]
      },
      "ProductKind": {
        "type": "string",
        "enum": [
          "service",
          "good"
        ]
      },
      "TaxCategory": {
        "type": "string",
        "enum": [
          "S",
          "Z",
          "E",
          "AE",
          "K",
          "G",
          "O"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The flat reading of `descriptionHtml`, derived on every write.\n\nStays the field everything downstream consumes: it is copied onto document\nlines, drawn into the PDF, and emitted as `ram:Description` (BT-154) in the\nEN 16931 e-invoice, which is plain text by specification. Never store\nmarkup here."
          },
          "descriptionHtml": {
            "type": "string",
            "nullable": true,
            "description": "The description as authored: a small subset of HTML (bold, italic,\nunderline, links, bullet and numbered lists).\n\nHeld alongside rather than replacing `description` because the two have\ndifferent jobs — this one is for reading and editing in the app, that one\nis what may legally leave in an e-invoice."
          },
          "articleNumber": {
            "type": "string",
            "nullable": true,
            "description": "Optional article number shown on documents (e.g. \"A-1023\")"
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProductKind"
              }
            ]
          },
          "unit": {
            "type": "string",
            "nullable": true,
            "description": "Unit shown on documents (e.g. \"Stunde\", \"Stück\", \"Pauschale\")"
          },
          "unitCode": {
            "type": "string",
            "description": "UN/ECE Recommendation 20 code backing the display unit (e-invoice XML)"
          },
          "unitPrice": {
            "type": "number",
            "description": "Net unit price. 4 decimal places to support fractional-cent pricing."
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code"
          },
          "taxCategory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxCategory"
              }
            ]
          },
          "taxRate": {
            "type": "number",
            "description": "VAT rate in percent (19.00, 7.00, 0.00)"
          },
          "active": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true,
            "description": "Soft delete: products stay resolvable from historical document lines"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "meetingType": {
            "description": "Optional link: this product represents a bookable meeting type",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingType"
              }
            ]
          },
          "createdBy": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "unitCode",
          "unitPrice",
          "currency",
          "taxCategory",
          "taxRate",
          "active",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateProductDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Plain text. Derived from `descriptionHtml` when that is supplied, because this is what reaches the e-invoice XML (BT-154)."
          },
          "descriptionHtml": {
            "type": "string",
            "nullable": true,
            "maxLength": 20000,
            "description": "The description as authored: bold, italic, underline, links, lists."
          },
          "articleNumber": {
            "type": "string",
            "nullable": true,
            "maxLength": 64
          },
          "kind": {
            "enum": [
              "service",
              "good"
            ],
            "type": "string"
          },
          "unit": {
            "type": "string",
            "nullable": true,
            "maxLength": 32
          },
          "unitCode": {
            "type": "string",
            "maxLength": 8,
            "default": "C62"
          },
          "unitPrice": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "taxCategory": {
            "enum": [
              "S",
              "Z",
              "E",
              "AE",
              "K",
              "G",
              "O"
            ],
            "type": "string"
          },
          "taxRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "meetingTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "InvoicingSettings": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "legalName": {
            "type": "string",
            "nullable": true,
            "description": "Legal seller name on documents. Falls back to the company name."
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2"
          },
          "taxNumber": {
            "type": "string",
            "nullable": true,
            "description": "Steuernummer"
          },
          "vatId": {
            "type": "string",
            "nullable": true,
            "description": "USt-IdNr. (VAT ID)"
          },
          "smallBusiness": {
            "type": "boolean",
            "description": "§ 19 UStG Kleinunternehmer: documents carry the exemption note and no VAT."
          },
          "defaultTaxRate": {
            "type": "number",
            "description": "Default VAT rate for new products/lines, percent"
          },
          "priceTaxDisplay": {
            "type": "string",
            "description": "How booking pages, events and payment links word prices: no tax wording,\n\"incl. X % VAT\" or \"plus X % VAT\". Display only; stored prices are always\nwhat the buyer pays. Default `none` so nothing changes until the company\nchooses.",
            "enum": [
              "none",
              "gross",
              "net"
            ]
          },
          "defaultPaymentTermDays": {
            "type": "number",
            "description": "Default payment term used for invoice due dates"
          },
          "sellerCountryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country the seller invoices from.\n\nDrives the default buyer country and, more importantly, tells the rest of\nthe system not to assume Germany. Defaults to DE so nothing changes for\nthe sellers already on the product."
          },
          "taxExemptionNotes": {
            "type": "object",
            "nullable": true,
            "description": "Per-category replacements for the exemption wording printed on invoices.\n\nKeyed by `TaxCategory`, plus `small_business` for the § 19 note. Blank or\nmissing entries fall back to the German default, so a seller correcting\none line does not have to restate all of them. Free text on purpose: the\nrequired sentence differs per country and we are not in a position to\ncarry every jurisdiction's statute.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "iban": {
            "type": "string",
            "nullable": true,
            "description": "Seller bank account printed on invoices and used for BG-16 payment means"
          },
          "bic": {
            "type": "string",
            "nullable": true,
            "description": "BIC (BT-86) printed in the footer next to the IBAN"
          },
          "bankName": {
            "type": "string",
            "nullable": true
          },
          "contactEmail": {
            "type": "string",
            "nullable": true,
            "description": "Contact details for the PDF footer"
          },
          "contactPhone": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "registerInfo": {
            "type": "string",
            "nullable": true,
            "description": "e.g. \"Amtsgericht Düsseldorf, HRB 12345\""
          },
          "managingDirector": {
            "type": "string",
            "nullable": true,
            "description": "Geschäftsführung line for the footer"
          },
          "logoFileAssetId": {
            "type": "string",
            "nullable": true,
            "description": "Logo rendered on document letterheads"
          },
          "dunning": {
            "type": "object",
            "nullable": true,
            "description": "Mahnwesen configuration; null = defaults from settings-defaults"
          },
          "autoInvoice": {
            "type": "object",
            "nullable": true,
            "description": "Paid booking → auto-invoice; null = disabled"
          },
          "datev": {
            "type": "object",
            "nullable": true,
            "description": "DATEV export configuration; null = defaults from settings-defaults"
          },
          "offerAutomation": {
            "type": "object",
            "nullable": true,
            "description": "Deal-stage automation for shared offers; null = disabled"
          },
          "layout": {
            "type": "object",
            "nullable": true,
            "description": "Document PDF layout; null = classic defaults from settings-defaults"
          },
          "documentMail": {
            "type": "object",
            "nullable": true,
            "description": "Email wording for sent documents; null = generated German defaults"
          },
          "defaultHeadText": {
            "type": "string",
            "nullable": true,
            "description": "Default Kopf-Text for new invoices/offers: free text above the line items.\nNull = no default, the draft starts empty. Copied onto the draft at\ncreation, never read at render time, so changing it does not rewrite\nexisting drafts or finalized documents."
          },
          "defaultFootText": {
            "type": "string",
            "nullable": true,
            "description": "Default Fuss-Text for new invoices/offers: free text below the totals.\nSame copy-at-creation semantics as `defaultHeadText`."
          },
          "documentLanguage": {
            "type": "string",
            "nullable": true,
            "description": "Language new documents are written in: PDF, reminder letter and the email\nthat carries them.\n\nnull = follow the company language, which is what sellers expect after\nswitching the product to English. Restricted to `DOCUMENT_LANGUAGES` --\nan invoice is a legal document, so it is only offered in a language the\nwhole catalogue is translated into.",
            "enum": [
              "de",
              "en"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          }
        },
        "required": [
          "id",
          "companyId",
          "countryCode",
          "smallBusiness",
          "defaultTaxRate",
          "priceTaxDisplay",
          "defaultPaymentTermDays",
          "sellerCountryCode",
          "createdAt",
          "updatedAt"
        ]
      },
      "DunningLevelConfigDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 60
          },
          "daysAfterDue": {
            "type": "number",
            "minimum": 1,
            "maximum": 365
          },
          "feeAmount": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000
          },
          "payWithinDays": {
            "type": "number",
            "minimum": 1,
            "maximum": 90,
            "description": "New payment deadline on the Mahnung, days from send"
          }
        },
        "required": [
          "label",
          "daysAfterDue",
          "feeAmount"
        ]
      },
      "DunningConfigDto": {
        "type": "object",
        "properties": {
          "autoSend": {
            "type": "boolean"
          },
          "levels": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DunningLevelConfigDto"
            }
          },
          "interestRatePercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 30
          },
          "whatsapp": {
            "type": "boolean",
            "description": "Also deliver reminders via WhatsApp when the buyer has a phone number"
          }
        },
        "required": [
          "autoSend",
          "levels"
        ]
      },
      "AutoInvoiceConfigDto": {
        "type": "object",
        "properties": {
          "autoSend": {
            "type": "boolean",
            "description": "Email the invoice to the attendee once it is issued"
          },
          "finalizeUnpaid": {
            "type": "boolean",
            "description": "Pay-by-invoice bookings: issue immediately instead of leaving a draft"
          }
        },
        "required": [
          "autoSend",
          "finalizeUnpaid"
        ]
      },
      "DatevConfigDto": {
        "type": "object",
        "properties": {
          "consultantNumber": {
            "type": "number",
            "nullable": true,
            "minimum": 1001,
            "maximum": 9999999,
            "description": "DATEV Beraternummer"
          },
          "clientNumber": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "maximum": 99999,
            "description": "DATEV Mandantennummer"
          },
          "skr": {
            "type": "string",
            "enum": [
              "03",
              "04"
            ],
            "description": "Sachkontenrahmen"
          },
          "debtorAccount": {
            "type": "number",
            "minimum": 1,
            "maximum": 99999999,
            "description": "Debitoren-Sammelkonto"
          },
          "accountLength": {
            "type": "number",
            "minimum": 4,
            "maximum": 8,
            "description": "Sachkontenlänge"
          },
          "creditorAccount": {
            "type": "number",
            "minimum": 1,
            "maximum": 99999999,
            "description": "Kreditoren-Sammelkonto"
          },
          "taxAdvisorEmail": {
            "type": "string",
            "nullable": true,
            "maxLength": 255,
            "description": "Steuerberater email for the one-click handoff"
          }
        },
        "required": [
          "skr",
          "debtorAccount",
          "accountLength"
        ]
      },
      "OfferAutomationConfigDto": {
        "type": "object",
        "properties": {
          "stageOnViewed": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "PipelineStage id"
          },
          "stageOnAccepted": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "PipelineStage id"
          },
          "stageOnDepositPaid": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "PipelineStage id"
          },
          "stageOnKickoffBooked": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "PipelineStage id"
          }
        }
      },
      "PdfLayoutConfigDto": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string",
            "enum": [
              "classic",
              "modern",
              "elegant"
            ]
          },
          "accentColor": {
            "type": "string",
            "nullable": true,
            "pattern": "/^#[0-9a-fA-F]{6}$/",
            "description": "Accent hex color (#RRGGBB) for templates that carry color"
          }
        },
        "required": [
          "template"
        ]
      },
      "DocumentMailConfigDto": {
        "type": "object",
        "properties": {
          "salutation": {
            "type": "string",
            "nullable": true,
            "maxLength": 200,
            "description": "Replaces \"Guten Tag,\""
          },
          "intro": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000,
            "description": "Replaces the generated \"anbei erhalten Sie ...\" paragraph"
          },
          "signature": {
            "type": "string",
            "nullable": true,
            "maxLength": 2000,
            "description": "Replaces the closing and seller name; newlines are kept"
          },
          "informal": {
            "type": "boolean",
            "description": "Address the customer as \"du\""
          }
        }
      },
      "UpdateInvoicingSettingsDto": {
        "type": "object",
        "properties": {
          "legalName": {
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true,
            "maxLength": 16
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "taxNumber": {
            "type": "string",
            "nullable": true
          },
          "vatId": {
            "type": "string",
            "nullable": true
          },
          "smallBusiness": {
            "type": "boolean"
          },
          "defaultTaxRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "defaultPaymentTermDays": {
            "type": "number",
            "minimum": 0,
            "maximum": 365
          },
          "taxExemptionNotes": {
            "type": "object",
            "nullable": true,
            "description": "Seller-supplied wording per exempt tax category, keyed by `TaxCategory`\nplus `small_business`. A blank or missing entry keeps the German default,\nso a seller correcting one line does not restate all of them.\n\nThe columns for this and `sellerCountryCode` shipped without a write path:\nneither was on this DTO, and the route whitelists, so a Swiss seller had\nno way to stop printing German statute on their own invoices.\n`sellerCountryCode` is deliberately still absent here — it follows\n`countryCode` in the service rather than being a second country field.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "iban": {
            "type": "string",
            "nullable": true,
            "maxLength": 34
          },
          "bic": {
            "type": "string",
            "nullable": true,
            "maxLength": 11
          },
          "bankName": {
            "type": "string",
            "nullable": true,
            "maxLength": 120
          },
          "contactEmail": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "contactPhone": {
            "type": "string",
            "nullable": true,
            "maxLength": 40
          },
          "website": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "registerInfo": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "managingDirector": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "logoFileAssetId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "dunning": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DunningConfigDto"
              }
            ]
          },
          "autoInvoice": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AutoInvoiceConfigDto"
              }
            ]
          },
          "datev": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DatevConfigDto"
              }
            ]
          },
          "offerAutomation": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OfferAutomationConfigDto"
              }
            ]
          },
          "layout": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PdfLayoutConfigDto"
              }
            ]
          },
          "documentMail": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentMailConfigDto"
              }
            ]
          },
          "defaultHeadText": {
            "type": "string",
            "nullable": true,
            "maxLength": 5000,
            "description": "Default Kopf-Text for new invoices/offers (PDF, above lines)"
          },
          "defaultFootText": {
            "type": "string",
            "nullable": true,
            "maxLength": 5000,
            "description": "Default Fuss-Text for new invoices/offers (PDF, below totals)"
          },
          "documentLanguage": {
            "type": "string",
            "nullable": true,
            "description": "Language new documents are written in. null follows the company language,\nwhich is what a seller who switched meetergo to English expects.",
            "enum": [
              "de",
              "en"
            ]
          }
        }
      },
      "InvoicingBankAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "description": "What the seller calls it, e.g. \"CHF Konto\" or \"Hauptkonto\"."
          },
          "iban": {
            "type": "string"
          },
          "bic": {
            "type": "string",
            "nullable": true
          },
          "bankName": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO 4217 the account is held in. Null means \"use for anything\" — the\npoint of the feature is matching an invoice's currency to an account, but\na seller with one account per currency plus a catch-all should not be\nforced to label the catch-all."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Used when a document names no account and no currency match is found."
          },
          "companyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "iban",
          "isDefault",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "CreateBankAccountDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 120
          },
          "iban": {
            "type": "string",
            "maxLength": 34,
            "pattern": "IBAN_SHAPE"
          },
          "bic": {
            "type": "string",
            "nullable": true,
            "description": "The three optional details below accept null as well as a value: null is\nhow an edit clears one. Without it there is no way to express \"this\naccount no longer has a BIC\" or \"this account is no longer tied to a\ncurrency\" — an omitted field means \"leave alone\" to the update path, so a\ncleared input would save successfully and change nothing.",
            "maxLength": 11
          },
          "bankName": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO 4217. Null for an account usable with any currency.",
            "pattern": "/^[A-Za-z]{3}$/",
            "example": "CHF"
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "iban"
        ]
      },
      "UpdateBankAccountDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 120
          },
          "iban": {
            "type": "string",
            "maxLength": 34,
            "pattern": "IBAN_SHAPE"
          },
          "bic": {
            "type": "string",
            "nullable": true,
            "description": "The three optional details below accept null as well as a value: null is\nhow an edit clears one. Without it there is no way to express \"this\naccount no longer has a BIC\" or \"this account is no longer tied to a\ncurrency\" — an omitted field means \"leave alone\" to the update path, so a\ncleared input would save successfully and change nothing.",
            "maxLength": 11
          },
          "bankName": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO 4217. Null for an account usable with any currency.",
            "pattern": "/^[A-Za-z]{3}$/",
            "example": "CHF"
          },
          "isDefault": {
            "type": "boolean"
          }
        }
      },
      "UpdateNumberRangeDto": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "description": "e.g. RE-{YYYY}-{####}"
          },
          "nextCounter": {
            "type": "number"
          }
        }
      },
      "DocumentKind": {
        "type": "string",
        "enum": [
          "offer",
          "order_confirmation",
          "invoice",
          "credit_note",
          "cancellation"
        ]
      },
      "NumberRange": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentKind"
              }
            ]
          },
          "year": {
            "type": "number"
          },
          "format": {
            "type": "string",
            "description": "Number format with tokens: `{YYYY}` / `{YY}` for the range year and one\n`{####}` counter token (the # count sets zero-padding), e.g.\n\"RE-{YYYY}-{####}\" → \"RE-2026-0042\"."
          },
          "counter": {
            "type": "number",
            "description": "Last allocated counter value. 0 = nothing allocated yet."
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          }
        },
        "required": [
          "id",
          "companyId",
          "kind",
          "year",
          "format",
          "counter",
          "createdAt",
          "updatedAt"
        ]
      },
      "SalesDocumentBuyerDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine1": {
            "type": "string",
            "maxLength": 255
          },
          "addressLine2": {
            "type": "string",
            "maxLength": 255
          },
          "postalCode": {
            "type": "string",
            "maxLength": 16
          },
          "city": {
            "type": "string",
            "maxLength": 120
          },
          "countryCode": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "default": "DE"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string",
            "description": "E.164 phone for WhatsApp delivery of invoices and reminders",
            "maxLength": 32
          },
          "vatId": {
            "type": "string",
            "maxLength": 32
          },
          "reference": {
            "type": "string",
            "description": "BT-10 buyer reference (Leitweg-ID for B2G)",
            "maxLength": 64
          }
        },
        "required": [
          "name"
        ]
      },
      "SalesDocumentLineDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Plain text. Ignored when `descriptionHtml` is sent, because the server derives it from the rich version — this is what reaches the e-invoice XML (BT-154)."
          },
          "descriptionHtml": {
            "type": "string",
            "nullable": true,
            "maxLength": 20000,
            "description": "The description as authored: bold, italic, underline, links, lists."
          },
          "quantity": {
            "type": "number"
          },
          "unitCode": {
            "type": "string",
            "maxLength": 8,
            "default": "C62"
          },
          "unit": {
            "type": "string",
            "nullable": true,
            "maxLength": 32
          },
          "unitPrice": {
            "type": "number"
          },
          "discountPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "default": 0
          },
          "taxCategory": {
            "enum": [
              "S",
              "Z",
              "E",
              "AE",
              "K",
              "G",
              "O"
            ],
            "type": "string"
          },
          "taxRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "productId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "name",
          "quantity",
          "unitPrice"
        ]
      },
      "CreateSalesDocumentDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "Language the document is written in. Defaults to the seller's invoicing\ndefault, so an international buyer can be invoiced in English without\nchanging the account default.",
            "enum": [
              "de",
              "en"
            ]
          },
          "kind": {
            "enum": [
              "offer",
              "order_confirmation",
              "invoice",
              "credit_note",
              "cancellation"
            ],
            "type": "string",
            "default": "invoice"
          },
          "issueDate": {
            "type": "string",
            "description": "ISO date, defaults to today"
          },
          "deliveryDate": {
            "type": "string",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "nullable": true
          },
          "deliveryDateEnd": {
            "type": "string",
            "nullable": true,
            "description": "Leistungszeitraum end"
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "headText": {
            "type": "string",
            "nullable": true
          },
          "footText": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "default": "EUR"
          },
          "buyer": {
            "description": "`@ValidateNested()` alone passes when the property is absent, so a body\nwithout a buyer created a buyerless draft and the spec's own\n`required: [\"buyer\"]` was a promise the API did not keep. With no body at\nall it reached the service as `undefined` and 500'd on `dto.buyer`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SalesDocumentBuyerDto"
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesDocumentLineDto"
            }
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "paymentTermsNote": {
            "type": "string",
            "nullable": true
          },
          "deliveryTermsNote": {
            "type": "string",
            "nullable": true
          },
          "taxTreatment": {
            "enum": [
              "standard",
              "tax_free_de",
              "reverse_charge_13b",
              "reverse_charge_18b",
              "intra_community",
              "oss",
              "export",
              "out_of_scope"
            ],
            "type": "string"
          },
          "skontoPercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0.01,
            "maximum": 100,
            "description": "Skonto percent"
          },
          "skontoDays": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "maximum": 365,
            "description": "Skonto days"
          },
          "totalDiscountPercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Gesamtrabatt percent"
          },
          "internalContactUserId": {
            "type": "string",
            "nullable": true,
            "description": "Interne Kontaktperson"
          },
          "depositPercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0.01,
            "maximum": 100,
            "description": "Anzahlung percent (offers only)"
          },
          "contactId": {
            "type": "string",
            "format": "uuid"
          },
          "dealId": {
            "type": "string",
            "format": "uuid"
          },
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "buyer"
        ]
      },
      "SalesDocumentStatus": {
        "type": "string",
        "enum": [
          "draft",
          "finalized",
          "sent",
          "partially_paid",
          "paid",
          "cancelled",
          "accepted",
          "rejected"
        ]
      },
      "TaxTreatment": {
        "type": "string",
        "enum": [
          "standard",
          "tax_free_de",
          "reverse_charge_13b",
          "reverse_charge_18b",
          "intra_community",
          "oss",
          "export",
          "out_of_scope"
        ]
      },
      "SalesDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentKind"
              }
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SalesDocumentStatus"
              }
            ]
          },
          "number": {
            "type": "string",
            "nullable": true,
            "description": "Allocated at finalization; null on drafts (drafts never consume numbers)"
          },
          "issueDate": {
            "type": "string"
          },
          "deliveryDate": {
            "type": "string",
            "nullable": true,
            "description": "Leistungs-/Lieferdatum (§ 14 Abs. 4 Nr. 6 UStG); period start when\ndeliveryDateEnd is set"
          },
          "deliveryDateEnd": {
            "type": "string",
            "nullable": true,
            "description": "Leistungszeitraum end: set → the document covers a service period\n(BT-73/BT-74) instead of a single date"
          },
          "dueDate": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string"
          },
          "buyer": {
            "type": "object"
          },
          "language": {
            "type": "string",
            "nullable": true,
            "description": "Language this document is written in, chosen when the draft is created and\nfrozen with the rest of the snapshot at finalization.\n\nStored per document, not read from settings at render time: re-rendering a\nfinalized invoice must reproduce the PDF the buyer received, and a seller\nswitching their default must not reword documents already sent. null means\nthe document predates document languages, so it renders in German, the\nonly language the module used to speak.",
            "enum": [
              "de",
              "en"
            ]
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "description": "Betreff shown on the document and as email subject"
          },
          "headText": {
            "type": "string",
            "nullable": true,
            "description": "Kopf-Text: free text above the line items (sevDesk pattern)"
          },
          "footText": {
            "type": "string",
            "nullable": true,
            "description": "Fuss-Text: free text below the totals"
          },
          "note": {
            "type": "string",
            "nullable": true,
            "description": "Free-text document note (also carries the § 19 wording when applicable)"
          },
          "paymentTermsNote": {
            "type": "string",
            "nullable": true
          },
          "deliveryTermsNote": {
            "type": "string",
            "nullable": true,
            "description": "Lieferbedingungen shown on the PDF"
          },
          "totalDiscountPercent": {
            "type": "number",
            "nullable": true,
            "description": "Gesamtrabatt: document-level percent discount, compounded onto every\nline at totals/snapshot time"
          },
          "internalContactUserId": {
            "type": "string",
            "nullable": true,
            "description": "Interne Kontaktperson: company user shown as seller contact (PDF + XML)"
          },
          "skontoPercent": {
            "type": "number",
            "nullable": true,
            "description": "Skonto: early-payment discount in percent (null = no Skonto offered)"
          },
          "skontoDays": {
            "type": "number",
            "nullable": true,
            "description": "Skonto: days from issue date within which the discount applies"
          },
          "depositPercent": {
            "type": "number",
            "nullable": true,
            "description": "Offers only: deposit (Anzahlung) in percent of the gross total. When the\nbuyer accepts the shared offer, a finalized deposit invoice over this\nshare is created automatically (null = no deposit asked)."
          },
          "taxTreatment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxTreatment"
              }
            ]
          },
          "netTotal": {
            "type": "number"
          },
          "taxTotal": {
            "type": "number"
          },
          "grossTotal": {
            "type": "number"
          },
          "snapshot": {
            "type": "object",
            "nullable": true,
            "description": "Frozen EN 16931 record; set exactly once at finalization"
          },
          "pdfFileAssetId": {
            "type": "string",
            "nullable": true
          },
          "xmlFileAssetId": {
            "type": "string",
            "nullable": true
          },
          "finalizedAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "publicToken": {
            "type": "string",
            "nullable": true
          },
          "onlinePayment": {
            "type": "boolean",
            "description": "Whether this invoice may be paid through the connected providers\n(`invoicePayableOnline`): the pay button in mails and reminders AND the\nmethods the pay page offers, so a stale link cannot pay what the mail\ndid not offer. The page link itself stays valid: it is the invoice view\n(PDF, bank details), which WhatsApp delivery and \"copy link\" hand out.\nOff for invoices born from a manual-payment booking whose meeting type\nasked for it; operational state, so it may change after issue."
          },
          "amountPaid": {
            "type": "number"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "When the outstanding amount reached zero"
          },
          "dunningLevel": {
            "type": "number"
          },
          "lastDunningAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "dunningPaused": {
            "type": "boolean",
            "description": "Excluded from dunning auto-send (manual sends stay possible)"
          },
          "companyId": {
            "type": "string"
          },
          "contactId": {
            "type": "string",
            "nullable": true,
            "description": "CRM contact this document belongs to (buyer jsonb stays authoritative)"
          },
          "crmCompanyId": {
            "type": "string",
            "nullable": true,
            "description": "CRM company the buyer was taken from.\n\nThe `buyer` jsonb stays authoritative — an issued document must not change\nbecause someone later edited the company record. This only records where\nthe address came from, so the editor can offer to pull it again and so a\ncompany's documents can be found."
          },
          "dealId": {
            "type": "string",
            "nullable": true
          },
          "bankAccountId": {
            "type": "string",
            "nullable": true,
            "description": "Which of the seller's bank accounts to print. Null falls back to the\nsingle account on invoicing settings, which is what every existing\ndocument does."
          },
          "appointmentId": {
            "type": "string",
            "nullable": true
          },
          "previousDocumentId": {
            "type": "string",
            "nullable": true,
            "description": "Chain reference: offer→invoice conversion, Storno→original"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true,
            "description": "Soft delete is permitted for DRAFTS ONLY (service-enforced)"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesDocumentLineItem"
            }
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "createdBy": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "issueDate",
          "currency",
          "buyer",
          "taxTreatment",
          "netTotal",
          "taxTotal",
          "grossTotal",
          "onlinePayment",
          "amountPaid",
          "dunningLevel",
          "dunningPaused",
          "companyId",
          "createdAt",
          "updatedAt"
        ]
      },
      "SalesDocumentLineItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "position": {
            "type": "number",
            "description": "1-based order on the document (BT-126)"
          },
          "productId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The flat reading of `descriptionHtml`, derived on every write.\n\nWhat leaves the app: drawn into the PDF and emitted as `ram:Description`\n(BT-154) in the EN 16931 e-invoice, which is plain text by specification.\nNever store markup here."
          },
          "descriptionHtml": {
            "type": "string",
            "nullable": true,
            "description": "The description as authored: a small subset of HTML (bold, italic,\nunderline, links, bullet and numbered lists), mirroring `Product`.\n\nThe line keeps its own copy rather than reading through `productId`: a\ndocument is a frozen record, and editing the catalog entry afterwards must\nnot rewrite what an already-issued invoice says."
          },
          "quantity": {
            "type": "number"
          },
          "unitCode": {
            "type": "string",
            "description": "UN/ECE Recommendation 20 code for the XML (C62 piece, HUR hour, ...)"
          },
          "unit": {
            "type": "string",
            "nullable": true,
            "description": "Display unit on the PDF (\"Std.\", \"Stück\"); unitCode stays authoritative"
          },
          "unitPrice": {
            "type": "number"
          },
          "discountPercent": {
            "type": "number"
          },
          "taxCategory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxCategory"
              }
            ]
          },
          "taxRate": {
            "type": "number"
          },
          "netAmount": {
            "type": "number",
            "description": "Rounded line net, recomputed by the service on every draft save"
          },
          "document": {
            "$ref": "#/components/schemas/SalesDocument"
          },
          "product": {
            "description": "Optional catalog origin; line data stays self-contained",
            "allOf": [
              {
                "$ref": "#/components/schemas/Product"
              }
            ]
          }
        },
        "required": [
          "id",
          "documentId",
          "position",
          "name",
          "quantity",
          "unitCode",
          "unitPrice",
          "discountPercent",
          "taxCategory",
          "taxRate",
          "netAmount"
        ]
      },
      "UpdateSalesDocumentDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "description": "Language the document is written in. Defaults to the seller's invoicing\ndefault, so an international buyer can be invoiced in English without\nchanging the account default.",
            "enum": [
              "de",
              "en"
            ]
          },
          "issueDate": {
            "type": "string"
          },
          "deliveryDate": {
            "type": "string",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "nullable": true
          },
          "deliveryDateEnd": {
            "type": "string",
            "nullable": true,
            "description": "Leistungszeitraum end"
          },
          "subject": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "headText": {
            "type": "string",
            "nullable": true
          },
          "footText": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "buyer": {
            "$ref": "#/components/schemas/SalesDocumentBuyerDto"
          },
          "lines": {
            "description": "Full replacement of the line list when provided",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesDocumentLineDto"
            }
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "paymentTermsNote": {
            "type": "string",
            "nullable": true
          },
          "deliveryTermsNote": {
            "type": "string",
            "nullable": true
          },
          "taxTreatment": {
            "enum": [
              "standard",
              "tax_free_de",
              "reverse_charge_13b",
              "reverse_charge_18b",
              "intra_community",
              "oss",
              "export",
              "out_of_scope"
            ],
            "type": "string"
          },
          "skontoPercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0.01,
            "maximum": 100,
            "description": "Skonto percent"
          },
          "skontoDays": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "maximum": 365,
            "description": "Skonto days"
          },
          "totalDiscountPercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 100,
            "description": "Gesamtrabatt percent"
          },
          "internalContactUserId": {
            "type": "string",
            "nullable": true,
            "description": "Interne Kontaktperson"
          },
          "depositPercent": {
            "type": "number",
            "nullable": true,
            "minimum": 0.01,
            "maximum": 100,
            "description": "Anzahlung percent (offers only)"
          },
          "contactId": {
            "type": "string",
            "format": "uuid"
          },
          "dealId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "FinalizeSalesDocumentDto": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "string",
            "enum": [
              "zugferd-en16931",
              "xrechnung-cii"
            ],
            "default": "zugferd-en16931"
          }
        }
      },
      "SendSalesDocumentDto": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "description": "Recipient override; defaults to the document's buyer email",
            "format": "email"
          },
          "includePaymentLink": {
            "type": "boolean",
            "description": "Include the hosted pay-page link in the email (invoices only; defaults\nto true — silently omitted when no payment provider is connected)"
          }
        }
      },
      "SendSalesDocumentWhatsappDto": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "description": "Recipient override; defaults to the document's buyer phone",
            "maxLength": 32
          }
        }
      },
      "OfferStatusDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "SalesDocumentEventType": {
        "type": "string",
        "enum": [
          "created",
          "updated",
          "finalized",
          "sent",
          "payment_recorded",
          "reminder_sent",
          "cancelled",
          "accepted",
          "rejected"
        ]
      },
      "SalesDocumentEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SalesDocumentEventType"
              }
            ]
          },
          "actorUserId": {
            "type": "string",
            "nullable": true
          },
          "payload": {
            "type": "object",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "document": {
            "$ref": "#/components/schemas/SalesDocument"
          }
        },
        "required": [
          "id",
          "documentId",
          "type",
          "createdAt"
        ]
      },
      "DocumentPaymentMethod": {
        "type": "string",
        "enum": [
          "stripe",
          "paypal",
          "mollie",
          "bank_transfer",
          "cash",
          "other",
          "credit_note"
        ]
      },
      "DocumentPaymentStatus": {
        "type": "string",
        "enum": [
          "pending",
          "completed",
          "failed"
        ]
      },
      "DocumentPayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "method": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentPaymentMethod"
              }
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DocumentPaymentStatus"
              }
            ]
          },
          "providerPaymentId": {
            "type": "string",
            "nullable": true,
            "description": "Stripe payment intent id / PayPal order id / Mollie payment id"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true,
            "description": "Wertstellung: when the money arrived (manual entries may backdate)"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "createdByUserId": {
            "type": "string",
            "nullable": true,
            "description": "Set for manually recorded payments; null for provider payments"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "document": {
            "$ref": "#/components/schemas/SalesDocument"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          }
        },
        "required": [
          "id",
          "documentId",
          "companyId",
          "amount",
          "currency",
          "method",
          "status",
          "createdAt",
          "updatedAt"
        ]
      },
      "RecordPaymentDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 1
          },
          "method": {
            "enum": [
              "bank_transfer",
              "cash",
              "other"
            ],
            "type": "string"
          },
          "paidAt": {
            "type": "string",
            "description": "Wertstellung; defaults to now"
          },
          "note": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "amount",
          "method"
        ]
      },
      "UpdateDunningStateDto": {
        "type": "object",
        "properties": {
          "paused": {
            "type": "boolean"
          }
        },
        "required": [
          "paused"
        ]
      },
      "CreateCreditNoteDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Why the invoice is being corrected; printed on the Gutschrift",
            "maxLength": 500
          },
          "lineIds": {
            "description": "Credit only these invoice line ids (partial credit). Omitted or empty\ncredits every line. Amounts can still be edited on the resulting draft.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "reason"
        ]
      },
      "InvoiceCreditSummaryDto": {
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string"
          },
          "creditedTotal": {
            "type": "number",
            "description": "Sum of issued (non-draft) credit notes chained to this invoice"
          },
          "outstanding": {
            "type": "number",
            "description": "grossTotal - amountPaid: what a further credit note may still cover"
          },
          "creditNoteIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "invoiceId",
          "creditedTotal",
          "outstanding",
          "creditNoteIds"
        ]
      },
      "BillableMeetingsDto": {
        "type": "object",
        "properties": {}
      },
      "DatevPeriodDto": {
        "type": "object",
        "properties": {}
      },
      "SendDunningDto": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "description": "Override the recipient; defaults to the buyer email"
          }
        }
      },
      "RecurringInterval": {
        "type": "string",
        "enum": [
          "weekly",
          "monthly",
          "quarterly",
          "semiannually",
          "yearly"
        ]
      },
      "CreateRecurringInvoiceDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "template": {
            "description": "Draft payload each run is created from. Dates inside are ignored —\nevery run stamps its own issue date.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateSalesDocumentDto"
              }
            ]
          },
          "interval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              }
            ]
          },
          "nextRunAt": {
            "type": "string"
          },
          "endDate": {
            "type": "string"
          },
          "autoFinalize": {
            "type": "boolean"
          },
          "autoSend": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "template",
          "interval",
          "nextRunAt"
        ]
      },
      "RecurringInvoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Display name in the recurring list, e.g. \"Retainer Acme GmbH\""
          },
          "template": {
            "description": "Frozen draft payload; each run feeds it to SalesDocumentService.createDraft",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateSalesDocumentDto"
              }
            ]
          },
          "interval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              }
            ]
          },
          "nextRunAt": {
            "type": "string",
            "description": "Next date (inclusive) the cron materializes an invoice"
          },
          "anchorDay": {
            "type": "number",
            "description": "Day-of-month anchor for month-based intervals (Jan 31 → Feb 28 → Mar 31\ninstead of drifting); set from nextRunAt when the schedule is saved"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "description": "No runs after this date; null = runs until deactivated"
          },
          "autoFinalize": {
            "type": "boolean",
            "description": "Finalize the created draft immediately (assigns number + artifacts)"
          },
          "autoSend": {
            "type": "boolean",
            "description": "Email the finalized invoice to the buyer (requires autoFinalize + buyer email)"
          },
          "active": {
            "type": "boolean"
          },
          "lastRunAt": {
            "format": "date-time",
            "type": "string",
            "nullable": true
          },
          "lastDocumentId": {
            "type": "string",
            "nullable": true,
            "description": "Most recent document this schedule created"
          },
          "runsCount": {
            "type": "number"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "company": {
            "$ref": "#/components/schemas/Company"
          },
          "createdBy": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "id",
          "companyId",
          "name",
          "template",
          "interval",
          "nextRunAt",
          "anchorDay",
          "autoFinalize",
          "autoSend",
          "active",
          "runsCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateRecurringInvoiceDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "template": {
            "$ref": "#/components/schemas/CreateSalesDocumentDto"
          },
          "interval": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecurringInterval"
              }
            ]
          },
          "nextRunAt": {
            "type": "string"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "description": "Nullable so a caller can clear the end date, which is why this cannot just\nbe `@IsDateString()`: that would reject the `null`. Unvalidated, any string\nreached the `date` column and came back as\n`invalid input syntax for type date` — a 500 for a typo."
          },
          "autoFinalize": {
            "type": "boolean"
          },
          "autoSend": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "CreateResourceChannelDto": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "description": "Resource user ID"
          },
          "name": {
            "type": "string",
            "description": "Display name for the resource channel. Defaults to the resource name"
          },
          "availabilityId": {
            "type": "string",
            "format": "uuid",
            "description": "Availability ID for the resource"
          },
          "groupName": {
            "type": "string",
            "description": "Group name for resource grouping."
          },
          "groupMemberIndex": {
            "type": "number",
            "minimum": 0,
            "description": "Group member index for ordering"
          }
        },
        "required": [
          "resourceId"
        ]
      },
      "UpdateDaysIntoFutureDto": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "limit",
              "range",
              "forever"
            ],
            "description": "Booking future mode: \"limit\" (rolling window), \"range\" (fixed dates), or \"forever\" (no limit)",
            "example": "limit"
          },
          "bookingLimit": {
            "type": "number",
            "minimum": 1,
            "description": "Maximum booking window in minutes from now (only for mode: \"limit\")",
            "example": 43200
          },
          "rangeMin": {
            "type": "string",
            "description": "Minimum date for bookings (only for mode: \"range\")",
            "example": "2025-01-01T00:00:00.000Z",
            "format": "date-time"
          },
          "rangeMax": {
            "type": "string",
            "description": "Maximum date for bookings (only for mode: \"range\")",
            "example": "2025-12-31T23:59:59.000Z",
            "format": "date-time"
          },
          "countMode": {
            "type": "string",
            "enum": [
              "calendar",
              "weekday"
            ],
            "description": "Whether to count calendar days or weekdays only (Mon-Fri). Only relevant for mode: \"limit\"",
            "example": "calendar"
          }
        }
      },
      "UpdateIcsV4Dto": {
        "type": "object",
        "properties": {
          "title": {
            "description": "Calendar invite title template. Pass a string for single-language or an object like `{ \"en\": \"...\", \"de\": \"...\" }` for multi-language.",
            "oneOf": [
              {
                "type": "string",
                "example": "{!M.Guest.Fullname} / {!M.Host.Fullname}"
              },
              {
                "type": "object",
                "example": {
                  "en": "{!M.Guest.Fullname} / {!M.Host.Fullname}",
                  "de": "{!M.Guest.Fullname} / {!M.Host.Fullname}"
                }
              }
            ]
          },
          "description": {
            "description": "Calendar invite description template. Supports dynamic tags like `{!M.Guest.Email}`, `{!M.Guest.Phone}`, `{!M.Meeting.Name}`. Pass a string for single-language or an object for multi-language.",
            "oneOf": [
              {
                "type": "string",
                "example": "{!M.Meeting.Name}\nEmail: {!M.Guest.Email}\nPhone: {!M.Guest.Phone}"
              },
              {
                "type": "object",
                "example": {
                  "en": "{!M.Meeting.Name}\nEmail: {!M.Guest.Email}",
                  "de": "{!M.Meeting.Name}\nE-Mail: {!M.Guest.Email}"
                }
              }
            ]
          },
          "location": {
            "description": "Calendar invite location template. Pass a string for single-language or an object for multi-language.",
            "oneOf": [
              {
                "type": "string",
                "example": "{!M.Meeting.Venue}"
              },
              {
                "type": "object",
                "example": {
                  "en": "{!M.Meeting.Venue}",
                  "de": "{!M.Meeting.Venue}"
                }
              }
            ]
          }
        }
      },
      "CreateMeetingTypeOptionsDto": {
        "type": "object",
        "properties": {
          "createOneTimeLink": {
            "type": "boolean",
            "description": "Create and return a one-time booking link"
          }
        }
      },
      "CreateMeetingTypeV4Dto": {
        "type": "object",
        "properties": {
          "meetingInfo": {
            "description": "Meeting information",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "meetingOptions": {
            "description": "Meeting options",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingOptions"
              }
            ]
          },
          "slug": {
            "type": "string",
            "description": "Ignored. The slug is derived from the meeting name and kept unique per host.",
            "deprecated": true
          },
          "spots": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of available spots"
          },
          "isGlobalQueue": {
            "type": "boolean",
            "description": "Create the meeting type as a company-wide round robin. Must be a JSON boolean: true or false.",
            "example": true
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "description": "Workspace ID for workspace-based meeting types"
          },
          "userId": {
            "type": "string",
            "description": "User ID for user-specific meeting types"
          },
          "locations": {
            "description": "Available locations",
            "example": [
              "Office A",
              "Conference Room B",
              "Remote"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resourceChannels": {
            "description": "Resource channels for the meeting type",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateResourceChannelDto"
            }
          },
          "cancellationPolicy": {
            "description": "Cancellation policy settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/CancellationPolicySetting"
              }
            ]
          },
          "reschedulingPolicy": {
            "description": "Rescheduling policy settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReschedulingPolicySetting"
              }
            ]
          },
          "daysIntoFuture": {
            "description": "Future booking window settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateDaysIntoFutureDto"
              }
            ]
          },
          "availabilityId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of an existing availability to use. Mutually exclusive with \"availability\"."
          },
          "availability": {
            "description": "Create a new availability inline. Mutually exclusive with \"availabilityId\".",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateAvailabilityDto"
              }
            ]
          },
          "ics": {
            "description": "Calendar invite (ICS) settings. Customize the title, description, and location of calendar events. Each field accepts a plain string (stored under the default language) or an object with language keys.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateIcsV4Dto"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "description": "Key-value metadata for integrations",
            "example": {
              "ticketId": "EVAL-12345"
            }
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "maxLength": 5000,
            "description": "Internal note for organizers. Never shown to customers.",
            "example": "pi009_Markt Tansas Offenbach_TSO – Partner: Max Müller"
          },
          "options": {
            "description": "Request options for additional operations",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateMeetingTypeOptionsDto"
              }
            ]
          }
        },
        "required": [
          "meetingInfo"
        ]
      },
      "WorkspaceBasicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug"
        ]
      },
      "UserBasicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          },
          "familyName": {
            "type": "string"
          },
          "picture": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "userType": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "givenName",
          "familyName",
          "slug",
          "userType"
        ]
      },
      "AvailabilityBasicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "FormBasicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ReminderBasicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "OneTimeBookingLinkResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Full URL for the one-time booking page"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "meetingTypeId",
          "createdAt"
        ]
      },
      "MeetingTypeResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "meetingInfo": {
            "$ref": "#/components/schemas/MeetingInfo"
          },
          "meetingOptions": {
            "$ref": "#/components/schemas/MeetingOptions"
          },
          "crmOptions": {
            "$ref": "#/components/schemas/MeetingCRMOptions"
          },
          "ics": {
            "$ref": "#/components/schemas/IcsInfo"
          },
          "timeslotInterval": {
            "type": "number"
          },
          "spots": {
            "type": "number"
          },
          "enabled": {
            "type": "boolean"
          },
          "slug": {
            "type": "string"
          },
          "bookingMinimum": {
            "type": "number"
          },
          "connectGuestJoinMinutesBeforeStart": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 525600
          },
          "connectGuestJoinMinutesAfterEnd": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 525600
          },
          "daysIntoFuture": {
            "$ref": "#/components/schemas/DaysIntoFutureSetting"
          },
          "enableCalendarInviteNotification": {
            "type": "boolean"
          },
          "roundRobin": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "useSchedule": {
            "type": "boolean"
          },
          "useCompanyLogo": {
            "type": "boolean"
          },
          "useCustomInvite": {
            "type": "boolean"
          },
          "disableActionButtons": {
            "type": "boolean"
          },
          "useCustomForm": {
            "type": "boolean"
          },
          "inCompanyPage": {
            "type": "boolean"
          },
          "formFirst": {
            "type": "boolean"
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isGlobalQueue": {
            "type": "boolean"
          },
          "compact": {
            "type": "boolean"
          },
          "disableTeamsEmail": {
            "type": "boolean"
          },
          "calendarGuestListVisible": {
            "type": "boolean"
          },
          "languageSetting": {
            "$ref": "#/components/schemas/LanguageSetting"
          },
          "customTextSelectChannel": {
            "$ref": "#/components/schemas/CustomTextSelectChannelSetting"
          },
          "timezonePreset": {
            "$ref": "#/components/schemas/TimezonePresetSetting"
          },
          "timeFormat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingTimeFormat"
              }
            ]
          },
          "cssSetting": {
            "$ref": "#/components/schemas/CssSetting"
          },
          "metaSetting": {
            "$ref": "#/components/schemas/MetaSetting"
          },
          "companyId": {
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "formId": {
            "type": "string"
          },
          "availabilityId": {
            "type": "string"
          },
          "queueId": {
            "type": "string"
          },
          "reminderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workspace": {
            "$ref": "#/components/schemas/WorkspaceBasicDto"
          },
          "user": {
            "$ref": "#/components/schemas/UserBasicDto"
          },
          "createdBy": {
            "$ref": "#/components/schemas/UserBasicDto"
          },
          "availability": {
            "$ref": "#/components/schemas/AvailabilityBasicDto"
          },
          "form": {
            "$ref": "#/components/schemas/FormBasicDto"
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderBasicDto"
            }
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "Key-value metadata for integrations",
            "example": {
              "ticketId": "EVAL-12345"
            }
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "description": "Internal note for organizers. Never shown to customers."
          },
          "oneTimeLink": {
            "description": "One-time booking link (only present when requested via options.createOneTimeLink)",
            "allOf": [
              {
                "$ref": "#/components/schemas/OneTimeBookingLinkResponseDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "meetingInfo",
          "meetingOptions",
          "crmOptions",
          "ics",
          "timeslotInterval",
          "spots",
          "enabled",
          "slug",
          "bookingMinimum",
          "daysIntoFuture",
          "enableCalendarInviteNotification",
          "roundRobin",
          "useSchedule",
          "useCompanyLogo",
          "useCustomInvite",
          "disableActionButtons",
          "useCustomForm",
          "inCompanyPage",
          "formFirst",
          "locations",
          "isGlobalQueue",
          "compact",
          "disableTeamsEmail",
          "calendarGuestListVisible",
          "languageSetting",
          "customTextSelectChannel",
          "timezonePreset",
          "timeFormat",
          "cssSetting",
          "metaSetting",
          "companyId",
          "createdById"
        ]
      },
      "MeetingTypeDomain": {
        "type": "string",
        "enum": [
          "all",
          "user",
          "group",
          "workspace",
          "me"
        ]
      },
      "UpdateMeetingInfoDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the meeting type",
            "example": "Sales Discovery Call"
          },
          "description": {
            "type": "string",
            "description": "Description of the meeting type",
            "example": "A 30-minute call to discuss your requirements and how we can help"
          },
          "enableRedirect": {
            "type": "boolean",
            "description": "Enable redirect after booking completion",
            "example": false
          },
          "redirect": {
            "type": "string",
            "format": "uri",
            "description": "Redirect URL to navigate after booking",
            "example": "https://example.com/thank-you"
          },
          "passEventDetailsToRedirect": {
            "type": "boolean",
            "description": "Pass event details (invitee name, email, form answers) as query params to redirect URL",
            "example": true
          },
          "duration": {
            "type": "number",
            "minimum": 5,
            "maximum": 480,
            "description": "Primary duration in minutes",
            "example": 30
          },
          "channel": {
            "description": "Meeting channel/location type",
            "example": "zoom",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeChannel"
              }
            ]
          },
          "customChannelName": {
            "type": "string",
            "description": "Custom name for the meeting channel",
            "example": "My Custom Meeting Room"
          },
          "customChannelLink": {
            "type": "string",
            "format": "uri",
            "description": "Custom link for the meeting channel",
            "example": "https://custom.meeting.link/room-123"
          },
          "connectChannelName": {
            "type": "string",
            "description": "Custom display name for the connect channel",
            "example": "Video Consultation"
          },
          "groupBooking": {
            "type": "boolean",
            "description": "Enable group booking (multiple attendees per slot)",
            "example": false
          },
          "showAvailableSlots": {
            "type": "boolean",
            "description": "Show available spots count on the booking page",
            "example": true
          },
          "enrichInvitee": {
            "type": "boolean",
            "description": "Enable invitee data enrichment",
            "example": false
          },
          "confirmationButton": {
            "description": "Confirmation button settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/ConfirmationButton"
              }
            ]
          },
          "bufferBefore": {
            "type": "number",
            "minimum": 0,
            "maximum": 120,
            "description": "Buffer time before meeting in minutes",
            "example": 15
          },
          "bufferAfter": {
            "type": "number",
            "minimum": 0,
            "maximum": 120,
            "description": "Buffer time after meeting in minutes",
            "example": 15
          },
          "bufferMustStayWithinWorkingHours": {
            "type": "boolean",
            "description": "Only offer slots where buffer fits within working hours (no spillover into breaks or after-hours)",
            "example": false
          },
          "rollingSlots": {
            "type": "boolean",
            "description": "Restart the slot grid after each appointment instead of keeping a fixed grid per working block",
            "example": false
          }
        }
      },
      "MeetingTypeDoubleOptInSetting": {
        "type": "string",
        "enum": [
          "disabled",
          "enabled",
          "useCompanySettings"
        ],
        "description": "Double opt-in confirmation setting"
      },
      "UpdateMeetingOptionsDto": {
        "type": "object",
        "properties": {
          "allowedDurations": {
            "uniqueItems": true,
            "description": "Additional duration options in minutes (shown alongside primary duration)",
            "example": [
              15,
              30,
              60
            ],
            "type": "array",
            "items": {
              "type": "number",
              "maximum": 480,
              "minimum": 5
            }
          },
          "allowSelectChannel": {
            "type": "boolean",
            "description": "Allow attendees to select meeting channel/location",
            "example": false
          },
          "allowHostSelection": {
            "type": "boolean",
            "description": "Allow attendees to select specific host (round-robin only)",
            "example": false
          },
          "forceHostSelection": {
            "type": "boolean",
            "description": "Force host selection (no \"any host\" option available)",
            "example": false
          },
          "allowedChannels": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingTypeChannel"
            },
            "description": "Available channel options when allowSelectChannel is enabled",
            "example": [
              "zoom",
              "google"
            ]
          },
          "allowAddingGuests": {
            "type": "boolean",
            "description": "Allow attendees to invite additional guests",
            "example": false
          },
          "doubleOptIn": {
            "description": "Double opt-in confirmation setting",
            "example": "useCompanySettings",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeDoubleOptInSetting"
              }
            ]
          },
          "requireHostConfirmation": {
            "description": "Require host confirmation for bookings",
            "example": "useCompanySettings",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeDoubleOptInSetting"
              }
            ]
          },
          "enableClusterMeeting": {
            "type": "boolean",
            "description": "Show only time slots adjacent to existing meetings",
            "example": false
          },
          "enableBufferCarryOver": {
            "type": "boolean",
            "description": "Carry over buffer time to next available slot if needed",
            "example": false
          },
          "maxBufferCarryOverDelay": {
            "type": "number",
            "minimum": 0,
            "maximum": 30,
            "description": "Maximum days for buffer carry-over delay",
            "example": 0
          },
          "allowPhoneOnlyBooking": {
            "type": "boolean",
            "description": "Allow phone-only bookings without email (API use case, requires phoneOnlyBooking in request)",
            "example": false
          },
          "confirmationPageCssSetting": {
            "description": "Custom CSS settings for confirmation pages",
            "allOf": [
              {
                "$ref": "#/components/schemas/CssSetting"
              }
            ]
          },
          "channelAvailabilities": {
            "type": "object",
            "description": "Per-channel availability overrides. Each value can be a UUID string (referencing an existing availability) or an inline availability object with \"name\", \"timezone\", and optional \"schedule\" and \"exceptions\"."
          }
        }
      },
      "UpdateMeetingTypeV4Dto": {
        "type": "object",
        "properties": {
          "meetingInfo": {
            "description": "Meeting information to update",
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateMeetingInfoDto"
              }
            ]
          },
          "meetingOptions": {
            "description": "Meeting options to update",
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateMeetingOptionsDto"
              }
            ]
          },
          "enabled": {
            "type": "boolean",
            "description": "Enable or disable the meeting type",
            "example": true
          },
          "slug": {
            "type": "string",
            "description": "Slug for the meeting type URL",
            "example": "discovery-call"
          },
          "timeslotInterval": {
            "type": "number",
            "minimum": 5,
            "maximum": 60,
            "description": "Timeslot interval in minutes",
            "example": 15
          },
          "spots": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of spots available per timeslot",
            "example": 1
          },
          "bookingMinimum": {
            "type": "number",
            "minimum": 0,
            "maximum": 10080,
            "description": "Minimum booking notice in minutes",
            "example": 60
          },
          "daysIntoFuture": {
            "description": "Date range settings for future bookings",
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateDaysIntoFutureDto"
              }
            ]
          },
          "locations": {
            "description": "Available locations for in-person meetings",
            "example": [
              "Office A",
              "Conference Room B"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availabilityId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of an existing availability to associate with this meeting type."
          },
          "ics": {
            "description": "Calendar invite (ICS) settings. Customize the title, description, and location of calendar events. Each field accepts a plain string (stored under the default language) or an object with language keys.",
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateIcsV4Dto"
              }
            ]
          },
          "internalNotes": {
            "type": "string",
            "nullable": true,
            "maxLength": 5000,
            "description": "Internal note for organizers. Never shown to customers.",
            "example": "pi009_Markt Tansas Offenbach_TSO – Partner: Max Müller"
          }
        }
      },
      "AvailabilityCalculationMethod": {
        "type": "string",
        "enum": [
          "everyone",
          "anyone"
        ]
      },
      "UnavailabilityType": {
        "type": "string",
        "enum": [
          "event",
          "block",
          "exception",
          "googleEvent",
          "outlookEvent",
          "exchangeEvent",
          "exchangeTeamsEvent",
          "icloudEvent",
          "caldavEvent",
          "smartWeEvent",
          "icsEvent",
          "salesforceEvent",
          "calendarReadFailed",
          "bufferBefore",
          "bufferAfter",
          "bookingBeforeLimit",
          "bookingAfterLimit",
          "perDayBookingLimit",
          "perWeekBookingLimit",
          "perMonthBookingLimit",
          "perYearBookingLimit",
          "outsideHours",
          "outsideBookingBlock",
          "clusterMeetingNotAdjacent",
          "groupSlotFull"
        ]
      },
      "UnavailabilityEventAttendee": {
        "type": "object",
        "properties": {
          "fullname": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "UnavailabilityEvent": {
        "type": "object",
        "properties": {
          "hostId": {
            "type": "string"
          },
          "hostName": {
            "type": "string"
          },
          "picture": {
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UnavailabilityType"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "online": {
            "type": "boolean"
          },
          "meetingLink": {
            "type": "string"
          },
          "attendees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnavailabilityEventAttendee"
            }
          },
          "allDay": {
            "type": "boolean"
          },
          "affectedSlotCount": {
            "type": "number"
          },
          "takenSpots": {
            "type": "number"
          },
          "totalSpots": {
            "type": "number"
          },
          "scope": {
            "type": "string",
            "enum": [
              "slot",
              "day",
              "week",
              "month",
              "meetingType",
              "availability",
              "calendar"
            ]
          },
          "recommendedAction": {
            "type": "string",
            "enum": [
              "reviewAppointment",
              "reviewConflictCalendars",
              "editAvailability",
              "editBuffers",
              "editBookingWindow",
              "editBookingLimits",
              "editBookingBlocks",
              "editClusterMeeting",
              "reconnectCalendar",
              "editGroupSpots"
            ]
          },
          "settingsRoute": {
            "type": "string"
          },
          "priority": {
            "type": "number"
          }
        },
        "required": [
          "hostId",
          "hostName",
          "type"
        ]
      },
      "Timeframe": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "unavailabilityEvent": {
            "$ref": "#/components/schemas/UnavailabilityEvent"
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "SpotAppointmentInfoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "totalSpots": {
            "type": "number"
          },
          "takenSpots": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "totalSpots",
          "takenSpots"
        ]
      },
      "AvailabilitySpotDto": {
        "type": "object",
        "properties": {
          "startTime": {
            "type": "string"
          },
          "unavailabilityEvents": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnavailabilityEvent"
            }
          },
          "appointment": {
            "$ref": "#/components/schemas/SpotAppointmentInfoDto"
          }
        },
        "required": [
          "startTime"
        ]
      },
      "AvailabilityDateDto": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "spots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilitySpotDto"
            }
          }
        },
        "required": [
          "date",
          "spots"
        ]
      },
      "AvailabilityTroubleshootCause": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UnavailabilityType"
              }
            ]
          },
          "hostId": {
            "type": "string"
          },
          "hostName": {
            "type": "string"
          },
          "affectedSlotCount": {
            "type": "number"
          },
          "scope": {
            "enum": [
              "slot",
              "day",
              "week",
              "month",
              "meetingType",
              "availability",
              "calendar"
            ],
            "type": "string"
          },
          "recommendedAction": {
            "enum": [
              "reviewAppointment",
              "reviewConflictCalendars",
              "editAvailability",
              "editBuffers",
              "editBookingWindow",
              "editBookingLimits",
              "editBookingBlocks",
              "editClusterMeeting",
              "reconnectCalendar",
              "editGroupSpots"
            ],
            "type": "string"
          },
          "settingsRoute": {
            "type": "string"
          },
          "priority": {
            "type": "number"
          }
        },
        "required": [
          "type",
          "hostId",
          "hostName",
          "affectedSlotCount",
          "scope",
          "recommendedAction",
          "settingsRoute",
          "priority"
        ]
      },
      "AvailabilityTroubleshootDaySummary": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "totalSlotCount": {
            "type": "number"
          },
          "availableSlotCount": {
            "type": "number"
          },
          "blockedSlotCount": {
            "type": "number"
          },
          "causes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityTroubleshootCause"
            }
          }
        },
        "required": [
          "date",
          "totalSlotCount",
          "availableSlotCount",
          "blockedSlotCount",
          "causes"
        ]
      },
      "AvailabilityTroubleshootSummary": {
        "type": "object",
        "properties": {
          "totalSlotCount": {
            "type": "number"
          },
          "availableSlotCount": {
            "type": "number"
          },
          "blockedSlotCount": {
            "type": "number"
          },
          "causes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityTroubleshootCause"
            }
          },
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityTroubleshootDaySummary"
            }
          }
        },
        "required": [
          "totalSlotCount",
          "availableSlotCount",
          "blockedSlotCount",
          "causes",
          "days"
        ]
      },
      "BookingAvailabilityResponseDto": {
        "type": "object",
        "properties": {
          "timezone": {
            "type": "string"
          },
          "timeframes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Timeframe"
            }
          },
          "dates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvailabilityDateDto"
            }
          },
          "troubleshootSummary": {
            "$ref": "#/components/schemas/AvailabilityTroubleshootSummary"
          },
          "earliestAvailableDate": {
            "type": "string"
          },
          "earliestMonthAvailability": {
            "description": "Full availability data for the month containing earliestAvailableDate",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingAvailabilityResponseDto"
              }
            ]
          }
        },
        "required": [
          "timezone",
          "timeframes",
          "dates"
        ]
      },
      "UserAvailabilityResponseDto": {
        "type": "object",
        "properties": {
          "hostId": {
            "type": "string"
          },
          "available": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Timeframe"
            }
          },
          "unavailable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Timeframe"
            }
          }
        },
        "required": [
          "hostId",
          "available",
          "unavailable"
        ]
      },
      "QueueConditionOperator": {
        "type": "string",
        "enum": [
          "equals",
          "notEqual",
          "lessThan",
          "greaterThan",
          "lessThanOrEqual",
          "moreThanOrEqual",
          "contains",
          "notContains",
          "blank",
          "notBlank",
          "containsAny",
          "containsNone",
          "startsWith"
        ]
      },
      "QueueConditionTarget": {
        "type": "string",
        "enum": [
          "attendeeEmail",
          "attendeeFullname",
          "attendeeFirstname",
          "attendeeLastname",
          "attendeePhone",
          "attendeePolicyAccepted",
          "attendeeReceiveReminders",
          "attendeeLanguage",
          "attendeeTimezone",
          "attendeeOther",
          "submissionScore",
          "submissionMaxScore",
          "submissionScorePercentage",
          "salesforceField",
          "bookingBlockTarget"
        ]
      },
      "ExpressionCondition": {
        "type": "object",
        "properties": {
          "operator": {
            "allOf": [
              {
                "$ref": "#/components/schemas/QueueConditionOperator"
              }
            ]
          },
          "target": {
            "allOf": [
              {
                "$ref": "#/components/schemas/QueueConditionTarget"
              }
            ]
          },
          "customTarget": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "operator",
          "target",
          "customTarget",
          "value"
        ]
      },
      "UpdateQueueDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "deprecated": true,
            "description": "Assign or deassign specified user. Deprecated: send the full `userIds` set instead, so the result does not depend on how current your copy of the host list is."
          },
          "userIds": {
            "description": "Full desired set of host user IDs. Replaces the queue host list in one transaction.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "userCapacities": {
            "description": "User capacities for queue management",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserCapacity"
            }
          },
          "userPriorities": {
            "description": "Host priorities for round robin (higher = booked first)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserPriority"
            }
          },
          "userCustomLinks": {
            "description": "Per-host overrides for the meeting type custom meeting link. Empty link falls back to the meeting type default.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserCustomLink"
            }
          },
          "type": {
            "description": "Round robin queue type",
            "allOf": [
              {
                "$ref": "#/components/schemas/QueueType"
              }
            ]
          },
          "maxLeadThreshold": {
            "type": "number",
            "minimum": 1,
            "description": "Max bookings a host can be ahead before their availability is hidden"
          },
          "distributionPeriod": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month"
            ],
            "description": "Period over which bookings are counted for equal distribution"
          },
          "prioritizeNearTermAvailability": {
            "type": "boolean",
            "description": "If true, when the lead-threshold filter would push the next available slot more than 14 days past the minimum booking notice, temporarily include over-lead hosts. Disable only for strict fairness."
          }
        }
      },
      "UserCapacityDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "capacity": {
            "type": "number"
          }
        },
        "required": [
          "userId",
          "capacity"
        ]
      },
      "UserCustomLinkDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "link"
        ]
      },
      "RoundRobinEntryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "groupId": {
            "type": "string",
            "nullable": true
          },
          "appointmentId": {
            "type": "string",
            "nullable": true
          },
          "queueId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "selectionReason": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "createdAt"
        ]
      },
      "QueueUserGroupDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserBasicDto"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "users",
          "userIds"
        ]
      },
      "QueueResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/QueueType"
              }
            ]
          },
          "workspaceId": {
            "type": "string"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "userCapacities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserCapacityDto"
            }
          },
          "userCustomLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserCustomLinkDto"
            }
          },
          "roundRobinEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoundRobinEntryDto"
            }
          },
          "userGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueueUserGroupDto"
            }
          },
          "userGroupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserBasicDto"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "meetingTypeId",
          "companyId",
          "userCapacities",
          "userCustomLinks",
          "roundRobinEntries",
          "userGroups",
          "userGroupIds",
          "users",
          "userIds",
          "createdAt",
          "updatedAt"
        ]
      },
      "NextQueueHostsResponseDto": {
        "type": "object",
        "properties": {
          "userIds": {
            "description": "Array of user IDs for the next queue hosts",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupId": {
            "type": "string",
            "description": "Optional group ID if hosts are from a specific group"
          }
        },
        "required": [
          "userIds"
        ]
      },
      "CreateUserGroupDto": {
        "type": "object",
        "properties": {
          "queueId": {
            "type": "string",
            "description": "ID of the queue this group belongs to"
          },
          "name": {
            "type": "string",
            "description": "Name of the user group"
          }
        },
        "required": [
          "queueId",
          "name"
        ]
      },
      "QueueUserGroupResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "capacity": {
            "type": "number"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserBasicDto"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "queueId": {
            "type": "string"
          },
          "mainGroupHost": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/UserBasicDto"
              }
            ]
          },
          "mainGroupHostId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "capacity",
          "users",
          "userIds",
          "queueId",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateUserGroupDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the user group"
          },
          "capacity": {
            "type": "number",
            "description": "Group capacity (minimum 1)"
          },
          "userId": {
            "type": "string",
            "deprecated": true,
            "description": "User to assign or deassign from group. Deprecated: send the full `userIds` set instead, so the result does not depend on how current your copy of the member list is."
          },
          "userIds": {
            "description": "Full desired set of group member IDs. Replaces the membership in one transaction.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mainGroupHostId": {
            "type": "string",
            "nullable": true,
            "description": "Main host user ID for the group (can be null to remove)"
          }
        }
      },
      "CreateMeetingTypeTemplateV4Dto": {
        "type": "object",
        "properties": {
          "meetingInfo": {
            "description": "Meeting information",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "meetingOptions": {
            "description": "Meeting options",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingOptions"
              }
            ]
          },
          "spots": {
            "type": "number",
            "description": "Number of available spots",
            "minimum": 1
          },
          "locations": {
            "description": "Available locations",
            "example": [
              "Office A",
              "Conference Room B",
              "Remote"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "templateType": {
            "enum": [
              "individual",
              "team"
            ],
            "type": "string",
            "description": "Template type: individual (assigned to users) or team (assigned to workspaces)"
          },
          "queueType": {
            "enum": [
              "simpleRoundRobin",
              "advancedRoundRobin",
              "equalDistribution"
            ],
            "type": "string",
            "description": "Queue type for team templates"
          }
        },
        "required": [
          "meetingInfo",
          "meetingOptions"
        ]
      },
      "MeetingTypeTemplateResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "meetingInfo": {
            "$ref": "#/components/schemas/MeetingInfo"
          },
          "meetingOptions": {
            "$ref": "#/components/schemas/MeetingOptions"
          },
          "crmOptions": {
            "$ref": "#/components/schemas/MeetingCRMOptions"
          },
          "ics": {
            "$ref": "#/components/schemas/IcsInfo"
          },
          "timeslotInterval": {
            "type": "number"
          },
          "spots": {
            "type": "number"
          },
          "bookingMinimum": {
            "type": "number"
          },
          "connectGuestJoinMinutesBeforeStart": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 525600
          },
          "connectGuestJoinMinutesAfterEnd": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "maximum": 525600
          },
          "daysIntoFuture": {
            "$ref": "#/components/schemas/DaysIntoFutureSetting"
          },
          "enableCalendarInviteNotification": {
            "type": "boolean"
          },
          "useSchedule": {
            "type": "boolean"
          },
          "useCompanyLogo": {
            "type": "boolean"
          },
          "useCustomInvite": {
            "type": "boolean"
          },
          "disableActionButtons": {
            "type": "boolean"
          },
          "useCustomForm": {
            "type": "boolean"
          },
          "inCompanyPage": {
            "type": "boolean"
          },
          "formFirst": {
            "type": "boolean"
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compact": {
            "type": "boolean"
          },
          "disableTeamsEmail": {
            "type": "boolean"
          },
          "calendarGuestListVisible": {
            "type": "boolean"
          },
          "languageSetting": {
            "$ref": "#/components/schemas/LanguageSetting"
          },
          "customTextSelectChannel": {
            "$ref": "#/components/schemas/CustomTextSelectChannelSetting"
          },
          "timezonePreset": {
            "$ref": "#/components/schemas/TimezonePresetSetting"
          },
          "timeFormat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingTimeFormat"
              }
            ]
          },
          "cssSetting": {
            "$ref": "#/components/schemas/CssSetting"
          },
          "meetingPaymentInfo": {
            "$ref": "#/components/schemas/MeetingPaymentInfo"
          },
          "videoSetting": {
            "$ref": "#/components/schemas/VideoSetting"
          },
          "cancellationPolicy": {
            "$ref": "#/components/schemas/CancellationPolicySetting"
          },
          "reschedulingPolicy": {
            "$ref": "#/components/schemas/ReschedulingPolicySetting"
          },
          "recurringSetting": {
            "$ref": "#/components/schemas/RecurringSetting"
          },
          "lockedFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "templateType": {
            "enum": [
              "individual",
              "team"
            ],
            "type": "string"
          },
          "queueType": {
            "nullable": true,
            "enum": [
              "simpleRoundRobin",
              "advancedRoundRobin",
              "equalDistribution"
            ],
            "type": "string"
          },
          "useHostAvailability": {
            "type": "boolean"
          },
          "bookingFrequencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HostBookingFrequency"
            }
          },
          "companyId": {
            "type": "string"
          },
          "createdById": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string"
          },
          "formId": {
            "type": "string"
          },
          "availabilityId": {
            "type": "string"
          },
          "reminderIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignedToCount": {
            "type": "number"
          },
          "createdBy": {
            "$ref": "#/components/schemas/UserBasicDto"
          },
          "availability": {
            "$ref": "#/components/schemas/AvailabilityBasicDto"
          },
          "form": {
            "$ref": "#/components/schemas/FormBasicDto"
          },
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderBasicDto"
            }
          }
        },
        "required": [
          "id",
          "meetingInfo",
          "meetingOptions",
          "crmOptions",
          "ics",
          "timeslotInterval",
          "spots",
          "bookingMinimum",
          "daysIntoFuture",
          "enableCalendarInviteNotification",
          "useSchedule",
          "useCompanyLogo",
          "useCustomInvite",
          "disableActionButtons",
          "useCustomForm",
          "inCompanyPage",
          "formFirst",
          "locations",
          "compact",
          "disableTeamsEmail",
          "calendarGuestListVisible",
          "languageSetting",
          "customTextSelectChannel",
          "timezonePreset",
          "timeFormat",
          "cssSetting",
          "meetingPaymentInfo",
          "videoSetting",
          "cancellationPolicy",
          "reschedulingPolicy",
          "recurringSetting",
          "lockedFields",
          "templateType",
          "useHostAvailability",
          "bookingFrequencies",
          "companyId",
          "createdById",
          "createdAt",
          "updatedAt"
        ]
      },
      "AssignTemplateHost": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          }
        },
        "required": [
          "userId"
        ]
      },
      "AssignTemplateHostBulk": {
        "type": "object",
        "properties": {
          "userIds": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "userIds"
        ]
      },
      "TemplateMeetingTypeInfoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Meeting type ID"
          },
          "meetingName": {
            "type": "string",
            "description": "Meeting type name"
          },
          "userId": {
            "type": "string",
            "description": "User ID of the meeting type owner"
          },
          "userName": {
            "type": "string",
            "description": "Full name of the user"
          },
          "userEmail": {
            "type": "string",
            "description": "Email of the user"
          },
          "userPicture": {
            "type": "string",
            "description": "Profile picture URL of the user"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the meeting type is enabled"
          }
        },
        "required": [
          "id",
          "meetingName",
          "userId",
          "userName",
          "userEmail",
          "enabled"
        ]
      },
      "AssignTemplateWorkspace": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "workspaceId"
        ]
      },
      "TemplateWorkspaceInfoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Meeting type ID"
          },
          "meetingName": {
            "type": "string",
            "description": "Meeting type name"
          },
          "workspaceId": {
            "type": "string",
            "description": "Workspace ID"
          },
          "workspaceName": {
            "type": "string",
            "description": "Workspace name"
          },
          "workspacePicture": {
            "type": "string",
            "description": "Workspace picture URL"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the meeting type is enabled"
          }
        },
        "required": [
          "id",
          "meetingName",
          "workspaceId",
          "workspaceName",
          "enabled"
        ]
      },
      "UpdateMeetingTypeTemplateV4Dto": {
        "type": "object",
        "properties": {
          "meetingInfo": {
            "description": "Meeting information",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "meetingOptions": {
            "description": "Meeting options",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingOptions"
              }
            ]
          },
          "spots": {
            "type": "number",
            "description": "Number of available spots",
            "minimum": 1
          },
          "locations": {
            "description": "Available locations",
            "example": [
              "Office A",
              "Conference Room B",
              "Remote"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "templateType": {
            "enum": [
              "individual",
              "team"
            ],
            "type": "string",
            "description": "Template type: individual (assigned to users) or team (assigned to workspaces)"
          },
          "queueType": {
            "enum": [
              "simpleRoundRobin",
              "advancedRoundRobin",
              "equalDistribution"
            ],
            "type": "string",
            "description": "Queue type for team templates"
          },
          "lockedFields": {
            "description": "Field keys that assigned users cannot modify on their meeting types.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProvisionalBookingPayloadResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dto": {
            "$ref": "#/components/schemas/BookingDto"
          },
          "type": {
            "enum": [
              "doubleOptIn",
              "requireHostConfirmation"
            ],
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string"
          },
          "queueBookingInfo": {
            "$ref": "#/components/schemas/NextQueueHostsSelectionReasonDto"
          },
          "hosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserBasicDto"
            }
          },
          "meetingTypeId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "dto",
          "type",
          "createdAt"
        ]
      },
      "PaginatedProvisionalBookingsResponseDto": {
        "type": "object",
        "properties": {
          "provisionalBookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProvisionalBookingPayloadResponseDto"
            }
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "provisionalBookings",
          "total"
        ]
      },
      "DeclineProvisionalBookingDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for declining the booking request"
          }
        }
      },
      "HandoffAppointmentDto": {
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "description": "ID of the appointment to handoff"
          },
          "userId": {
            "type": "string",
            "description": "ID of user to handoff appointment to"
          },
          "queueId": {
            "type": "string",
            "description": "ID of queue to handoff appointment to"
          },
          "queueGroupId": {
            "type": "string",
            "description": "ID of queue group to handoff appointment to"
          }
        },
        "required": [
          "appointmentId"
        ]
      },
      "HandoffBlockedReason": {
        "type": "string",
        "enum": [
          "not_available"
        ],
        "description": "Reason why user is blocked from handoff (if applicable)"
      },
      "HandoffUserInfo": {
        "type": "object",
        "properties": {
          "firstname": {
            "type": "string",
            "description": "User first name"
          },
          "lastname": {
            "type": "string",
            "description": "User last name"
          },
          "picture": {
            "type": "string",
            "description": "User profile picture URL"
          },
          "id": {
            "type": "string",
            "description": "User ID"
          },
          "blocked": {
            "description": "Reason why user is blocked from handoff (if applicable)",
            "allOf": [
              {
                "$ref": "#/components/schemas/HandoffBlockedReason"
              }
            ]
          }
        },
        "required": [
          "firstname",
          "lastname",
          "id"
        ]
      },
      "HandoffScope": {
        "type": "string",
        "enum": [
          "workspace",
          "company"
        ],
        "description": "Whether the list is limited to the appointment workspace or spans the company"
      },
      "AvailableHandoffsDto": {
        "type": "object",
        "properties": {
          "users": {
            "description": "List of available users for handoff",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HandoffUserInfo"
            }
          },
          "scope": {
            "description": "Whether the list is limited to the appointment workspace or spans the company",
            "allOf": [
              {
                "$ref": "#/components/schemas/HandoffScope"
              }
            ]
          }
        },
        "required": [
          "users",
          "scope"
        ]
      },
      "BulkHandoffDto": {
        "type": "object",
        "properties": {
          "userId": {
            "description": "Array of user IDs to handoff appointments from",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "start": {
            "type": "string",
            "description": "Period start date in ISO format"
          },
          "end": {
            "type": "string",
            "description": "Period end date in ISO format"
          },
          "targetUserId": {
            "type": "string",
            "description": "Target user ID to handoff appointments to"
          },
          "enableAvailabilityCheck": {
            "type": "boolean",
            "description": "Enable availability check during handoff"
          },
          "targetUserIds": {
            "description": "Array of target user IDs to distribute appointments across (round-robin)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "appointmentIds": {
            "description": "Specific appointment IDs to handoff (cherry-pick). If not provided, all matching appointments are included.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "ignoreAvailability": {
            "type": "boolean",
            "description": "If true, ignore availability conflicts and force handoff all appointments"
          }
        },
        "required": [
          "userId",
          "start",
          "end"
        ]
      },
      "BulkHandoffResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "description": "Array of appointment IDs that were successfully handed off",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conflicts": {
            "description": "Array of appointment IDs that could not be handed off due to conflicts",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "success"
        ]
      },
      "CreateGroupBookingLinkDto": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string"
          },
          "meetingTypeId": {
            "type": "string"
          },
          "hostIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "workspaceId",
          "meetingTypeId",
          "hostIds"
        ]
      },
      "GroupBookingLinkResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the group booking link"
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace this group booking link belongs to"
          },
          "companyId": {
            "type": "string",
            "description": "ID of the company this group booking link belongs to"
          },
          "hostIds": {
            "description": "Array of host user IDs for this group booking link",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meetingTypeId": {
            "type": "string",
            "description": "ID of the meeting type associated with this group booking link"
          },
          "createdAt": {
            "type": "string",
            "description": "Date and time when the group booking link was created"
          },
          "updatedAt": {
            "type": "string",
            "description": "Date and time when the group booking link was last updated"
          },
          "deletedAt": {
            "type": "string",
            "description": "Date and time when the group booking link was soft deleted"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "companyId",
          "hostIds",
          "meetingTypeId",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateGroupBookingLinkDto": {
        "type": "object",
        "properties": {
          "meetingTypeId": {
            "type": "string"
          },
          "hostIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PersonalBookingLinkResponseDto": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "description": "The booking link URL"
          },
          "meetingTypeId": {
            "type": "string",
            "description": "ID of the associated meeting type"
          },
          "fullName": {
            "type": "string",
            "description": "Full name of the user"
          },
          "picture": {
            "type": "string",
            "description": "Profile picture URL"
          },
          "slug": {
            "type": "string",
            "description": "User slug"
          },
          "title": {
            "type": "string",
            "description": "User title or job position"
          },
          "id": {
            "type": "string",
            "description": "User ID"
          },
          "email": {
            "type": "string",
            "description": "User email address"
          }
        },
        "required": [
          "link"
        ]
      },
      "IndividualBookingLinkResponseDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "ID of the user associated with this booking link"
          },
          "firstname": {
            "type": "string",
            "description": "First name of the user"
          },
          "lastname": {
            "type": "string",
            "description": "Last name of the user"
          },
          "picture": {
            "type": "string",
            "description": "Profile picture URL of the user"
          },
          "link": {
            "type": "string",
            "description": "The booking link URL"
          }
        },
        "required": [
          "userId",
          "firstname",
          "lastname",
          "link"
        ]
      },
      "MeetingTypeLinksResponseDto": {
        "type": "object",
        "properties": {
          "meetingTypeId": {
            "type": "string",
            "description": "ID of the meeting type"
          },
          "links": {
            "description": "Array of individual booking links for this meeting type",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IndividualBookingLinkResponseDto"
            }
          }
        },
        "required": [
          "meetingTypeId",
          "links"
        ]
      },
      "WorkspaceBookingLinksResponseDto": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace"
          },
          "meetingTypesLinks": {
            "description": "Array of meeting type links for this workspace",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingTypeLinksResponseDto"
            }
          }
        },
        "required": [
          "workspaceId",
          "meetingTypesLinks"
        ]
      },
      "GetBookingLinksResponseDto": {
        "type": "object",
        "properties": {
          "personalLinks": {
            "description": "Array of personal booking links",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonalBookingLinkResponseDto"
            }
          },
          "workspaceLinks": {
            "description": "Array of workspace booking links",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceBookingLinksResponseDto"
            }
          }
        },
        "required": [
          "personalLinks",
          "workspaceLinks"
        ]
      },
      "BookingLinkResponseDto": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "description": "The booking link URL"
          },
          "meetingTypeId": {
            "type": "string",
            "description": "ID of the meeting type associated with this booking link"
          }
        },
        "required": [
          "link",
          "meetingTypeId"
        ]
      },
      "CompanyPageUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstname": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "picture": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "firstname",
          "lastname"
        ]
      },
      "PublicCompanyInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "Company slug. Public pages address the company by it, e.g. the statutory withdrawal page at /widerruf/<slug>."
          },
          "description": {
            "type": "string"
          },
          "logo": {
            "type": "string"
          },
          "tier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyTier"
              }
            ]
          },
          "primaryColor": {
            "type": "string"
          },
          "useBrandStyling": {
            "type": "boolean"
          },
          "hideMeetergoBranding": {
            "type": "boolean"
          },
          "businessCardTheme": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BusinessCardTheme"
              }
            ]
          },
          "enforceBusinessCardTheme": {
            "type": "boolean"
          },
          "showDataPolicyLink": {
            "type": "boolean"
          },
          "hideDataPolicyCheckbox": {
            "type": "boolean"
          },
          "enableWithdrawalFunction": {
            "type": "boolean",
            "description": "Whether the statutory withdrawal function (§ 356a BGB) is published for this company. Drives the \"Vertrag widerrufen\" link in the booking pages' legal footer."
          },
          "dataPolicyLink": {
            "type": "string",
            "nullable": true
          },
          "imprintLink": {
            "type": "string",
            "nullable": true
          },
          "deleted": {
            "type": "boolean"
          },
          "useFormalBookingLanguage": {
            "type": "boolean"
          },
          "enableCustomLegalText": {
            "type": "boolean"
          },
          "enableCookieBanner": {
            "type": "boolean"
          },
          "customLegalText": {
            "type": "string"
          },
          "customBookingCSS": {
            "type": "string"
          },
          "featureAccess": {
            "$ref": "#/components/schemas/FeatureAccess"
          },
          "language": {
            "type": "string"
          },
          "allowedLanguages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "googleAnalyticsMeasurementId": {
            "type": "string",
            "nullable": true
          },
          "metaPixelId": {
            "type": "string",
            "nullable": true
          },
          "tiktokPixelId": {
            "type": "string",
            "nullable": true
          },
          "gtmContainerId": {
            "type": "string",
            "nullable": true
          },
          "gtmServerContainerUrl": {
            "type": "string",
            "nullable": true
          },
          "matomoUrl": {
            "type": "string",
            "nullable": true
          },
          "matomoSiteId": {
            "type": "string",
            "nullable": true
          },
          "usercentricsSettingsId": {
            "type": "string"
          },
          "usercentricsConfig": {
            "type": "object"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "description",
          "tier",
          "primaryColor",
          "useBrandStyling",
          "hideMeetergoBranding",
          "enforceBusinessCardTheme",
          "showDataPolicyLink",
          "hideDataPolicyCheckbox",
          "enableWithdrawalFunction",
          "dataPolicyLink",
          "imprintLink",
          "deleted",
          "useFormalBookingLanguage",
          "enableCustomLegalText",
          "enableCookieBanner",
          "customLegalText",
          "customBookingCSS",
          "featureAccess",
          "language",
          "googleAnalyticsMeasurementId",
          "metaPixelId",
          "tiktokPixelId",
          "gtmContainerId",
          "gtmServerContainerUrl",
          "matomoUrl",
          "matomoSiteId"
        ]
      },
      "ExtendedMeetingTypeResponseDto": {
        "type": "object",
        "properties": {
          "meetingType": {
            "description": "Meeting type information",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeResponseDto"
              }
            ]
          },
          "link": {
            "type": "string",
            "description": "Booking link for this meeting type"
          }
        },
        "required": [
          "meetingType",
          "link"
        ]
      },
      "CompanyBookingPageResponseDto": {
        "type": "object",
        "properties": {
          "user": {
            "description": "User information",
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyPageUser"
              }
            ]
          },
          "publicCompanyInfo": {
            "description": "Public company information",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicCompanyInfo"
              }
            ]
          },
          "meetingTypes": {
            "description": "Array of meeting types with their booking links",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtendedMeetingTypeResponseDto"
            }
          }
        },
        "required": [
          "user",
          "publicCompanyInfo",
          "meetingTypes"
        ]
      },
      "PersonalPageWithoutMeetingTypes": {
        "type": "object",
        "properties": {
          "useCustomColors": {
            "type": "boolean"
          },
          "primaryColor": {
            "type": "string"
          },
          "secondaryColor": {
            "type": "string"
          },
          "headerImage": {
            "type": "string",
            "nullable": true
          },
          "theme": {
            "nullable": true,
            "description": "Card theme (preset + overrides). Null means the default look; the legacy useCustomColors/primaryColor pair is honored only while theme is null.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BusinessCardTheme"
              }
            ]
          },
          "blocks": {
            "nullable": true,
            "description": "Ordered content blocks (headline, text, video, file, divider) shown on the card. Sanitized in updatePersonaPage.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardBlock"
            }
          },
          "businessCardDraft": {
            "type": "object",
            "nullable": true,
            "description": "Staged, not-yet-published design edits: { theme?, blocks? }. Null means no unpublished changes. Never served on public surfaces."
          },
          "description": {
            "type": "string"
          },
          "onlineProfiles": {
            "$ref": "#/components/schemas/OnlineProfiles"
          },
          "showAllMeetingTypes": {
            "type": "boolean",
            "description": "If true, show all user meeting types on business card. If false, show only selected meeting types.",
            "default": true
          },
          "showMeetingsSection": {
            "type": "boolean",
            "description": "If true, the card renders the automatic meetings section (heading, \"show all\" toggle, its own list) above the content blocks. Cards created since the block editor took over start without it: booking options are placed as `meetingType` blocks instead, so images and text can sit between them. Backfilled to true for every card that already showed at least one booking option.",
            "default": false
          },
          "showContactExchange": {
            "type": "boolean",
            "description": "If true, the card offers visitors the contact-exchange form beside \"save contact\". Owners who only want to hand out their own details switch it off.",
            "default": true
          },
          "meetingTypeOrder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "useCustomColors",
          "primaryColor",
          "secondaryColor",
          "headerImage",
          "description",
          "onlineProfiles",
          "showAllMeetingTypes",
          "showMeetingsSection",
          "showContactExchange"
        ]
      },
      "PersonalPageUserV4": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstname": {
            "type": "string"
          },
          "lastname": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string"
          },
          "picture": {
            "type": "string"
          },
          "personalPage": {
            "$ref": "#/components/schemas/PersonalPageWithoutMeetingTypes"
          }
        },
        "required": [
          "id",
          "firstname",
          "lastname",
          "personalPage"
        ]
      },
      "PersonalBookingPageResponseDto": {
        "type": "object",
        "properties": {
          "user": {
            "description": "User information",
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonalPageUserV4"
              }
            ]
          },
          "company": {
            "description": "Company information",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicCompanyInfo"
              }
            ]
          },
          "meetingTypes": {
            "description": "Array of meeting types with their booking links",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtendedMeetingTypeResponseDto"
            }
          }
        },
        "required": [
          "user",
          "company",
          "meetingTypes"
        ]
      },
      "BookingResponseDto": {
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "description": "ID of appointment. Undefined if DOI flow and not confirmed yet."
          },
          "secret": {
            "type": "string"
          },
          "attendeeEmail": {
            "type": "string"
          },
          "bookingType": {
            "description": "Only defined if DOI flow is enabled. If undefined, its a normal booking",
            "enum": [
              "doubleOptIn",
              "requireHostConfirmation"
            ],
            "type": "string"
          },
          "provisionalBookingId": {
            "type": "string",
            "description": "ID of provsionalBooking. Undefined if its a normal booking."
          },
          "redirectUrl": {
            "type": "string",
            "description": "Redirect URL to navigate to after booking (with any variables replaced).\nOnly set if meeting type has redirect enabled and a URL is configured.\nThis is the single source of truth for redirects."
          },
          "recurringSeriesId": {
            "type": "string",
            "description": "ID of the recurring series if this is a recurring booking.\nUndefined for non-recurring bookings."
          },
          "recurringOccurrences": {
            "type": "number",
            "description": "Total number of occurrences booked if this is a recurring booking.\nUndefined for non-recurring bookings."
          },
          "appointmentIds": {
            "description": "IDs of all appointments created in this recurring booking.\nUndefined for non-recurring bookings.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bundleId": {
            "type": "string",
            "description": "ID of the bundle if this is a bundle booking.\nUndefined for non-bundle bookings."
          },
          "isBundleBooking": {
            "type": "boolean",
            "description": "Whether this is a bundle booking."
          }
        }
      },
      "DraftMeetingFollowUpDto": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "maxLength": 8,
            "description": "Two-letter language code to write the draft in. Defaults to the company language."
          }
        }
      },
      "QuickMailDto": {
        "type": "object",
        "properties": {
          "attendeeId": {
            "type": "string",
            "description": "The unique identifier of the attendee to send email to"
          },
          "title": {
            "type": "string",
            "description": "Email subject line"
          },
          "content": {
            "type": "string",
            "description": "Email message content/body"
          }
        },
        "required": [
          "attendeeId",
          "title",
          "content"
        ]
      },
      "SendMeetingTranscriptDto": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "format": "email",
            "description": "Recipient address."
          },
          "meetingTitle": {
            "type": "string",
            "maxLength": 300,
            "description": "Meeting title, used in the subject and as the heading."
          },
          "summary": {
            "type": "string",
            "maxLength": 100000,
            "description": "Meeting summary, markdown."
          },
          "transcription": {
            "type": "string",
            "maxLength": 500000,
            "description": "Full transcription, markdown."
          },
          "summaryLabel": {
            "type": "string",
            "description": "Heading for the summary section.",
            "maxLength": 120
          },
          "transcriptLabel": {
            "type": "string",
            "maxLength": 120,
            "description": "Heading for the transcript section."
          }
        },
        "required": [
          "to"
        ]
      },
      "PublicAppointmentHost": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Host user unique identifier"
          },
          "firstname": {
            "type": "string",
            "description": "Host first name"
          },
          "lastname": {
            "type": "string",
            "description": "Host last name"
          },
          "picture": {
            "type": "string",
            "description": "Host profile picture URL"
          },
          "emailVerified": {
            "type": "boolean",
            "description": "Whether the host has verified their email"
          }
        },
        "required": [
          "id",
          "firstname",
          "lastname",
          "emailVerified"
        ]
      },
      "RecurringSeriesAppointment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Appointment ID"
          },
          "start": {
            "type": "string",
            "description": "Appointment start time (ISO string)"
          },
          "end": {
            "type": "string",
            "description": "Appointment end time (ISO string)"
          },
          "isCancelled": {
            "type": "boolean",
            "description": "Whether the appointment has been cancelled"
          },
          "occurrenceNumber": {
            "type": "number",
            "description": "1-based index in the recurring series"
          },
          "secret": {
            "type": "string",
            "description": "Secret for this appointment - only included when caller is authenticated"
          }
        },
        "required": [
          "id",
          "start",
          "end",
          "isCancelled",
          "occurrenceNumber"
        ]
      },
      "PublicRecurringSeries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Series ID"
          },
          "mode": {
            "enum": [
              "recurring",
              "multi_slot"
            ],
            "type": "string",
            "description": "Mode of the series (recurring or multi_slot)"
          },
          "frequency": {
            "nullable": true,
            "enum": [
              "weekly",
              "biweekly",
              "monthly"
            ],
            "type": "string",
            "description": "Frequency of the series (only for recurring mode)"
          },
          "totalOccurrences": {
            "type": "number",
            "description": "Total number of occurrences in this series"
          },
          "appointments": {
            "description": "All appointments in this series",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecurringSeriesAppointment"
            }
          }
        },
        "required": [
          "id",
          "mode",
          "totalOccurrences",
          "appointments"
        ]
      },
      "PublicBundleItem": {
        "type": "object",
        "properties": {
          "meetingTypeId": {
            "type": "string",
            "description": "Meeting type ID"
          },
          "meetingTypeName": {
            "type": "string",
            "description": "Meeting type name"
          },
          "duration": {
            "type": "number",
            "description": "Duration in minutes"
          },
          "price": {
            "type": "number",
            "description": "Price"
          },
          "startTime": {
            "type": "string",
            "description": "Start time of this segment (ISO string)"
          },
          "endTime": {
            "type": "string",
            "description": "End time of this segment (ISO string)"
          },
          "sortOrder": {
            "type": "number",
            "description": "Order in the bundle"
          },
          "hosts": {
            "description": "Hosts for this segment",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicAppointmentHost"
            }
          }
        },
        "required": [
          "meetingTypeId",
          "meetingTypeName",
          "duration",
          "startTime",
          "endTime",
          "sortOrder",
          "hosts"
        ]
      },
      "PublicAppointment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Appointment unique identifier"
          },
          "meetingTypeId": {
            "type": "string",
            "description": "Meeting type ID associated with this appointment"
          },
          "meetingInfo": {
            "description": "Meeting information including title, duration, and other details",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "online": {
            "type": "boolean",
            "description": "Whether the appointment is conducted online"
          },
          "start": {
            "type": "string",
            "description": "Appointment start time (ISO string)"
          },
          "end": {
            "type": "string",
            "description": "Appointment end time (ISO string)"
          },
          "isCancelled": {
            "type": "boolean",
            "description": "Whether the appointment has been cancelled"
          },
          "location": {
            "type": "string",
            "description": "Physical location address"
          },
          "channel": {
            "description": "Meeting channel type (e.g., video conference platform)",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingTypeChannel"
              }
            ]
          },
          "hosts": {
            "description": "List of appointment hosts with basic information",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicAppointmentHost"
              }
            ]
          },
          "company": {
            "description": "Public company information",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicCompanyInfo"
              }
            ]
          },
          "disableActionButtons": {
            "type": "boolean",
            "description": "Whether action buttons (reschedule, cancel) are disabled for this appointment"
          },
          "cancellationPolicy": {
            "description": "Cancellation policy for this appointment",
            "allOf": [
              {
                "$ref": "#/components/schemas/CancellationPolicySetting"
              }
            ]
          },
          "reschedulingPolicy": {
            "description": "Rescheduling policy for this appointment",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReschedulingPolicySetting"
              }
            ]
          },
          "timezonePreset": {
            "description": "Timezone preset of the meeting type. When enabled, the reschedule page must render slots in this timezone instead of the visitor device timezone, matching the booking page.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TimezonePresetSetting"
              }
            ]
          },
          "timeFormat": {
            "description": "Default time format on the booking and reschedule pages",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingTimeFormat"
              }
            ]
          },
          "language": {
            "type": "string",
            "description": "Attendee's resolved language for this booking"
          },
          "meetingLink": {
            "type": "string",
            "description": "Meeting link - only provided with proper authentication"
          },
          "ics": {
            "type": "string",
            "description": "ICS calendar file content - only provided with proper authentication"
          },
          "customCss": {
            "type": "string",
            "description": "Custom CSS styling for the appointment page"
          },
          "showConfetti": {
            "type": "boolean",
            "description": "Whether to show confetti animation on the confirmation page"
          },
          "enableWithdrawalButton": {
            "type": "boolean",
            "description": "Whether to show the withdrawal button (\"Widerrufsbutton\") on the confirmation page. Off by default; required from 19 June 2026 (§ 356a BGB) for B2C distance contracts with a right of withdrawal."
          },
          "createdAt": {
            "type": "string",
            "description": "When the appointment was booked (contract conclusion). The 14-day statutory withdrawal window runs from this timestamp."
          },
          "queueId": {
            "type": "string",
            "description": "Queue ID - required for rescheduling on round robin meetings"
          },
          "recurringSeriesId": {
            "type": "string",
            "description": "Recurring series ID if this appointment is part of a recurring series"
          },
          "occurrenceNumber": {
            "type": "number",
            "description": "1-based index of this appointment within the recurring series"
          },
          "recurringSeries": {
            "description": "Recurring series information if this appointment is part of a recurring series",
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicRecurringSeries"
              }
            ]
          },
          "isBundleBooking": {
            "type": "boolean",
            "description": "Whether this appointment was booked as part of a bundle"
          },
          "bundleId": {
            "type": "string",
            "description": "Bundle ID if this is a bundle booking"
          },
          "bundleItems": {
            "description": "Bundle items if this is a bundle booking",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicBundleItem"
            }
          }
        },
        "required": [
          "id",
          "meetingInfo",
          "online",
          "start",
          "end",
          "isCancelled",
          "channel",
          "hosts",
          "company",
          "disableActionButtons",
          "timeFormat",
          "language",
          "showConfetti",
          "enableWithdrawalButton",
          "createdAt"
        ]
      },
      "AppointmentSortBy": {
        "type": "string",
        "enum": [
          "appointment.start",
          "appointment.createdAt"
        ]
      },
      "SortDirection": {
        "type": "string",
        "enum": [
          "ASC",
          "DESC"
        ]
      },
      "AppointmentCalendarSync": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Calendar connection id"
          },
          "type": {
            "type": "string",
            "description": "Calendar connection type. Google, Outlook, etc."
          },
          "hostId": {
            "type": "string",
            "description": "User id of the host"
          },
          "eventId": {
            "type": "string",
            "description": "Id of the external event that is created on the calendar."
          },
          "calendarId": {
            "type": "string",
            "description": "Id of the external calendar on which the event is created."
          }
        },
        "required": [
          "id",
          "type",
          "hostId",
          "eventId",
          "calendarId"
        ]
      },
      "HostingInfoResponseDto": {
        "type": "object",
        "properties": {
          "mainHost": {
            "type": "string",
            "nullable": true,
            "description": "Main host user ID"
          },
          "meetingLink": {
            "type": "string",
            "nullable": true,
            "description": "Meeting link for the appointment"
          },
          "googleEventId": {
            "type": "string",
            "nullable": true,
            "description": "Google Calendar event ID"
          },
          "googleConnectionSub": {
            "type": "string",
            "nullable": true,
            "description": "Google connection subject"
          },
          "calendarConnectionId": {
            "type": "string",
            "description": "Calendar connection ID for external calendars"
          },
          "zoomMeetingId": {
            "type": "number",
            "nullable": true,
            "description": "Zoom meeting ID"
          },
          "connectChannelId": {
            "type": "string",
            "description": "Connect channel ID for external integrations"
          },
          "wherebyMeetingId": {
            "type": "string",
            "nullable": true,
            "description": "Whereby meeting ID"
          },
          "alfaviewMeetingId": {
            "type": "string",
            "nullable": true,
            "description": "alfaview meeting ID"
          },
          "alfaviewModeratorLink": {
            "type": "string",
            "nullable": true,
            "description": "alfaview join URL with moderator permissions, for the host only"
          },
          "calendarSyncProviders": {
            "nullable": true,
            "description": "Calendar sync provider configurations",
            "allOf": [
              {
                "$ref": "#/components/schemas/AppointmentCalendarSync"
              }
            ]
          }
        }
      },
      "BookingActionInfoResponseDto": {
        "type": "object",
        "properties": {
          "actionAt": {
            "type": "string",
            "description": "Timestamp when the action occurred"
          },
          "actionBy": {
            "type": "string",
            "nullable": true,
            "description": "User ID who performed the action"
          },
          "actionSource": {
            "nullable": true,
            "description": "Source of the booking action (Host, Attendee, Company)",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingActionSource"
              }
            ]
          },
          "reason": {
            "type": "string",
            "description": "Reason for the action (e.g., cancellation reason)"
          }
        },
        "required": [
          "actionSource"
        ]
      },
      "AttendeeBasicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Attendee ID"
          },
          "secret": {
            "type": "string",
            "description": "Attendee secret for authentication"
          },
          "email": {
            "type": "string",
            "description": "Attendee email address"
          },
          "fullname": {
            "type": "string",
            "description": "Attendee full name"
          },
          "firstname": {
            "type": "string",
            "description": "Attendee first name"
          },
          "lastname": {
            "type": "string",
            "description": "Attendee last name"
          },
          "bringalongEmails": {
            "description": "Additional attendee emails (bring-along)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Attendee notes as key-value pairs"
          },
          "receiveReminders": {
            "type": "boolean",
            "description": "Whether attendee receives reminders"
          },
          "phone": {
            "type": "string",
            "description": "Attendee phone number"
          },
          "language": {
            "type": "string",
            "description": "Attendee preferred language"
          },
          "timezone": {
            "type": "string",
            "description": "Attendee timezone"
          },
          "noShow": {
            "type": "boolean",
            "description": "Whether attendee was a no-show"
          },
          "noShowAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "dataPolicyAccepted": {
            "type": "boolean",
            "description": "Whether data policy was accepted"
          },
          "doubleOptIn": {
            "type": "string",
            "description": "Double opt-in confirmation timestamp"
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp"
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update timestamp"
          },
          "deletedAt": {
            "type": "string",
            "description": "Soft deletion timestamp"
          },
          "billingDetails": {
            "nullable": true,
            "description": "Billing details entered on the booking page",
            "allOf": [
              {
                "$ref": "#/components/schemas/AttendeeBillingDetails"
              }
            ]
          }
        },
        "required": [
          "id",
          "secret",
          "bringalongEmails",
          "notes",
          "receiveReminders",
          "language",
          "timezone",
          "noShow",
          "dataPolicyAccepted",
          "createdAt",
          "updatedAt"
        ]
      },
      "ResolvableErrorBasicDto": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "Error code identifying the type of error"
          }
        },
        "required": [
          "errorCode"
        ]
      },
      "AppointmentResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Appointment ID"
          },
          "secret": {
            "type": "string",
            "description": "Secret key for appointment authentication"
          },
          "ics": {
            "type": "string",
            "description": "ICS calendar data"
          },
          "meetingInfo": {
            "description": "Meeting information including title, duration, etc.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "hostingInfo": {
            "description": "Hosting information including links and integration IDs",
            "allOf": [
              {
                "$ref": "#/components/schemas/HostingInfoResponseDto"
              }
            ]
          },
          "cancel": {
            "description": "Cancellation information",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingActionInfoResponseDto"
              }
            ]
          },
          "crmOptions": {
            "description": "CRM integration options",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingCRMOptions"
              }
            ]
          },
          "start": {
            "type": "string",
            "description": "Appointment start time (ISO string)"
          },
          "end": {
            "type": "string",
            "description": "Appointment end time (ISO string)"
          },
          "isCancelled": {
            "type": "boolean",
            "description": "Whether the appointment is cancelled"
          },
          "rescheduledAt": {
            "type": "string",
            "description": "When the appointment was rescheduled"
          },
          "rescheduledBy": {
            "type": "string",
            "nullable": true,
            "description": "Email address of the attendee, host, or operator who last rescheduled the appointment"
          },
          "location": {
            "type": "string",
            "description": "Meeting location"
          },
          "attendees": {
            "description": "Appointment attendees without relation properties",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttendeeBasicDto"
            }
          },
          "attendeeIds": {
            "description": "Array of attendee IDs",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "roundRobinEntries": {
            "description": "Round robin entries for this appointment",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoundRobinEntryDto"
            }
          },
          "meetingTypeId": {
            "type": "string",
            "description": "Meeting type ID"
          },
          "hostIds": {
            "description": "Array of host user IDs",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scheduledReminderIds": {
            "description": "Array of scheduled reminder IDs",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "companyId": {
            "type": "string",
            "description": "Company ID this appointment belongs to"
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp"
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update timestamp"
          },
          "deletedAt": {
            "type": "string",
            "description": "Soft deletion timestamp"
          },
          "resolvableErrors": {
            "description": "Appointment resolvable errors (error codes only)",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResolvableErrorBasicDto"
            }
          },
          "paymentId": {
            "type": "string",
            "description": "Payment ID if this is a paid appointment"
          },
          "note": {
            "type": "string",
            "description": "Appointment note"
          },
          "transcription": {
            "type": "string",
            "nullable": true,
            "description": "Full meeting transcription in markdown format"
          },
          "summary": {
            "type": "string",
            "nullable": true,
            "description": "AI-generated summary of the meeting in markdown format"
          }
        },
        "required": [
          "id",
          "secret",
          "ics",
          "meetingInfo",
          "hostingInfo",
          "cancel",
          "crmOptions",
          "start",
          "end",
          "isCancelled",
          "attendees",
          "attendeeIds",
          "roundRobinEntries",
          "meetingTypeId",
          "hostIds",
          "scheduledReminderIds",
          "companyId",
          "createdAt",
          "updatedAt",
          "resolvableErrors"
        ]
      },
      "PaginatedAppointmentsResponseDto": {
        "type": "object",
        "properties": {
          "appointments": {
            "description": "Array of appointments for the current page",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppointmentResponseDto"
            }
          },
          "total": {
            "type": "number",
            "description": "Total number of appointments matching the criteria"
          }
        },
        "required": [
          "appointments",
          "total"
        ]
      },
      "AddGuestEmailsDto": {
        "type": "object",
        "properties": {
          "attendeeId": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "attendeeId",
          "email"
        ]
      },
      "RemoveGuestEmailDto": {
        "type": "object",
        "properties": {
          "attendeeId": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "attendeeId",
          "email"
        ]
      },
      "UpdateNotesDto": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string"
          }
        },
        "required": [
          "note"
        ]
      },
      "UpdateTranscriptionDto": {
        "type": "object",
        "properties": {
          "transcription": {
            "type": "string",
            "nullable": true,
            "maxLength": 500000,
            "description": "Full meeting transcription in markdown format. Set to null to clear."
          },
          "summary": {
            "type": "string",
            "nullable": true,
            "maxLength": 100000,
            "description": "AI-generated summary of the meeting in markdown format. Set to null to clear."
          },
          "actualStartAt": {
            "type": "string",
            "description": "ISO-8601. When the recorded conversation actually began. Optional."
          },
          "actualEndAt": {
            "type": "string",
            "description": "ISO-8601. When the recorded conversation actually ended. Optional."
          }
        }
      },
      "CancelAppointmentDto": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "description": "Reason for cancellation. Included in notification emails sent to participants.",
            "example": "Schedule conflict"
          },
          "attendeeId": {
            "type": "string",
            "format": "uuid",
            "description": "For group bookings: the ID of the attendee to remove. The appointment continues for remaining attendees. If omitted on a group booking, `cancelAll` must be set to `true`."
          },
          "cancelAll": {
            "type": "boolean",
            "description": "Required for group bookings when `attendeeId` is not provided. Confirms intent to cancel the entire group appointment for all attendees. Ignored for non-group bookings.",
            "default": false
          },
          "cancelEntireSeries": {
            "type": "boolean",
            "description": "If `true` and the appointment is part of a recurring series, cancels all future occurrences in addition to this one. Defaults to `false`.",
            "default": false
          }
        }
      },
      "RescheduleAppointmentDto": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "description": "New start time for the appointment in ISO 8601 format. The duration remains unchanged.",
            "example": "2026-03-10T14:00:00.000Z"
          },
          "ignoreAvailability": {
            "type": "boolean",
            "description": "Skip availability and conflict checks. Allows scheduling outside available hours or on top of existing appointments. Defaults to `false`.",
            "default": false
          }
        },
        "required": [
          "start"
        ]
      },
      "RescheduleResponseDto": {
        "type": "object",
        "properties": {
          "appointment": {
            "description": "The rescheduled appointment with updated start and end times",
            "allOf": [
              {
                "$ref": "#/components/schemas/AppointmentResponseDto"
              }
            ]
          },
          "previousStart": {
            "type": "string",
            "description": "The previous start time before rescheduling (ISO 8601)",
            "example": "2026-03-08T10:00:00.000Z"
          }
        },
        "required": [
          "appointment",
          "previousStart"
        ]
      },
      "CreateAttendeePendingDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Attendee email address. Required for all standard bookings.\nOptional only when `BookingDto.phoneOnlyBooking` is true.\nValidated as email format when provided.",
            "format": "email"
          },
          "firstname": {
            "type": "string",
            "description": "Either fullname or firstname/lastname is required",
            "maxLength": 150
          },
          "lastname": {
            "type": "string",
            "description": "Either fullname or firstname/lastname is required",
            "maxLength": 150
          },
          "fullname": {
            "type": "string",
            "description": "Either fullname or firstname/lastname is required",
            "maxLength": 150
          },
          "bringalongEmails": {
            "description": "Additional attendee emails (max 5)",
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "notes": {
            "type": "object",
            "description": "An object containing attendee form entries.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "billingDetails": {
            "nullable": true,
            "description": "Billing details from the booking page's billing block, shown when the\nmeeting type sets `meetingPaymentInfo.collectBillingDetails`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BookingBillingDetailsDto"
              }
            ]
          },
          "phone": {
            "type": "string"
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Language"
              }
            ]
          },
          "timezone": {
            "type": "string"
          },
          "dataPolicyAccepted": {
            "type": "boolean"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "notes",
          "companyId"
        ]
      },
      "AttendeePendingResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Pending attendee ID"
          },
          "companyId": {
            "type": "string",
            "description": "Company ID that the pending attendee was booking"
          },
          "email": {
            "type": "string",
            "description": "Attendee email address"
          },
          "fullname": {
            "type": "string",
            "description": "Attendee full name"
          },
          "firstname": {
            "type": "string",
            "description": "Attendee first name"
          },
          "lastname": {
            "type": "string",
            "description": "Attendee last name"
          },
          "bringalongEmails": {
            "description": "Additional attendee emails (bring-along)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Attendee notes as key-value pairs"
          },
          "phone": {
            "type": "string",
            "description": "Attendee phone number"
          },
          "language": {
            "type": "string",
            "description": "Attendee preferred language"
          },
          "timezone": {
            "type": "string",
            "description": "Attendee timezone"
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp"
          },
          "updatedAt": {
            "type": "string",
            "description": "Last update timestamp"
          },
          "deletedAt": {
            "type": "string",
            "description": "Soft deletion timestamp"
          }
        },
        "required": [
          "id",
          "companyId",
          "email",
          "bringalongEmails",
          "notes",
          "phone",
          "language",
          "timezone",
          "createdAt",
          "updatedAt"
        ]
      },
      "MeetingTypeBasicResponseDto": {
        "type": "object",
        "properties": {
          "meetingInfo": {
            "description": "Meeting information (title, description, duration, etc.)",
            "allOf": [
              {
                "$ref": "#/components/schemas/MeetingInfo"
              }
            ]
          },
          "spots": {
            "type": "number",
            "description": "Number of available spots for the meeting"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the meeting type is enabled"
          },
          "slug": {
            "type": "string",
            "description": "Meeting type unique slug"
          },
          "formId": {
            "type": "string",
            "description": "Form ID associated with the meeting type"
          },
          "communicationSettingsId": {
            "type": "number",
            "nullable": true,
            "description": "Communication settings ID"
          },
          "availabilityId": {
            "type": "string",
            "description": "Availability ID associated with the meeting type"
          },
          "companyId": {
            "type": "string",
            "description": "Company ID that owns this meeting type"
          },
          "queueId": {
            "type": "string",
            "description": "Queue ID if meeting type uses a queue"
          },
          "locations": {
            "description": "Available meeting locations",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workspaceId": {
            "type": "string",
            "description": "Workspace ID if meeting type belongs to a workspace"
          },
          "isGlobalQueue": {
            "type": "boolean",
            "description": "Whether this meeting type uses a global queue"
          },
          "userId": {
            "type": "string",
            "description": "User ID who owns this meeting type"
          },
          "createdById": {
            "type": "string",
            "description": "User ID who created this meeting type"
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp"
          },
          "deletedAt": {
            "type": "string",
            "description": "Deletion timestamp if soft deleted"
          },
          "resourceChannelIds": {
            "description": "IDs of resource channels associated with this meeting type",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "meetingInfo",
          "spots",
          "enabled",
          "slug",
          "companyId",
          "locations",
          "isGlobalQueue",
          "createdById",
          "createdAt"
        ]
      },
      "PersonalPageResponseDto": {
        "type": "object",
        "properties": {
          "useCustomColors": {
            "type": "boolean",
            "description": "Whether custom colors are enabled for the personal page"
          },
          "primaryColor": {
            "type": "string",
            "description": "Primary color for the personal page theme"
          },
          "secondaryColor": {
            "type": "string",
            "description": "Secondary color for the personal page theme"
          },
          "headerImage": {
            "type": "string",
            "nullable": true,
            "description": "Header image URL for the personal page"
          },
          "description": {
            "type": "string",
            "description": "Personal page description text"
          },
          "onlineProfiles": {
            "description": "Online profiles and social media links",
            "allOf": [
              {
                "$ref": "#/components/schemas/OnlineProfiles"
              }
            ]
          },
          "meetingTypes": {
            "description": "Meeting types assigned to this personal page",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeetingTypeBasicResponseDto"
            }
          }
        },
        "required": [
          "useCustomColors",
          "primaryColor",
          "secondaryColor",
          "description",
          "onlineProfiles"
        ]
      },
      "UpdateOnlineProfilesDto": {
        "type": "object",
        "properties": {
          "linkedIn": {
            "type": "string"
          },
          "facebook": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          },
          "instagram": {
            "type": "string"
          },
          "xing": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "customLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomLink"
            }
          },
          "addressStreet": {
            "type": "string"
          },
          "addressCity": {
            "type": "string"
          },
          "addressPostalCode": {
            "type": "string"
          },
          "addressCountry": {
            "type": "string"
          }
        }
      },
      "UpdatePersonalPageDto": {
        "type": "object",
        "properties": {
          "useCustomColors": {
            "type": "boolean"
          },
          "primaryColor": {
            "type": "string"
          },
          "secondaryColor": {
            "type": "string"
          },
          "headerImage": {
            "type": "string",
            "nullable": true
          },
          "theme": {
            "nullable": true,
            "description": "Card theme (preset + overrides). Null means the default look; the legacy useCustomColors/primaryColor pair is honored only while theme is null.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BusinessCardTheme"
              }
            ]
          },
          "blocks": {
            "nullable": true,
            "description": "Ordered content blocks (headline, text, video, file, divider) shown on the card. Sanitized in updatePersonaPage.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardBlock"
            }
          },
          "businessCardDraft": {
            "type": "object",
            "nullable": true,
            "description": "Staged, not-yet-published design edits: { theme?, blocks? }. Null means no unpublished changes. Never served on public surfaces."
          },
          "description": {
            "type": "string"
          },
          "showAllMeetingTypes": {
            "type": "boolean",
            "description": "If true, show all user meeting types on business card. If false, show only selected meeting types.",
            "default": true
          },
          "showMeetingsSection": {
            "type": "boolean",
            "description": "If true, the card renders the automatic meetings section (heading, \"show all\" toggle, its own list) above the content blocks. Cards created since the block editor took over start without it: booking options are placed as `meetingType` blocks instead, so images and text can sit between them. Backfilled to true for every card that already showed at least one booking option.",
            "default": false
          },
          "showContactExchange": {
            "type": "boolean",
            "description": "If true, the card offers visitors the contact-exchange form beside \"save contact\". Owners who only want to hand out their own details switch it off.",
            "default": true
          },
          "meetingTypeOrder": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "onlineProfiles": {
            "$ref": "#/components/schemas/UpdateOnlineProfilesDto"
          }
        }
      },
      "CreateAvailabilityOptionDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the availability. Defaults to \"{givenName}'s Default Availability\""
          },
          "schedule": {
            "description": "Weekly schedule for availability. Defaults to business hours (9-17 Mon-Fri)",
            "allOf": [
              {
                "$ref": "#/components/schemas/WeeklySchedule"
              }
            ]
          },
          "timezone": {
            "type": "string",
            "description": "Timezone for the availability. Inherits from user timezone if not specified"
          }
        }
      },
      "CreateMeetingTypeOptionDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the meeting type. Defaults to \"30min Meeting\""
          },
          "duration": {
            "type": "number",
            "minimum": 1,
            "description": "Duration of the meeting in minutes. Defaults to 30"
          },
          "slug": {
            "type": "string",
            "description": "URL slug for the meeting type. Auto-generated if not provided",
            "minLength": 3
          },
          "daysIntoFuture": {
            "description": "Date range restrictions for booking availability. Controls when meetings can be booked (limit/range/forever modes)",
            "allOf": [
              {
                "$ref": "#/components/schemas/DaysIntoFutureSetting"
              }
            ]
          },
          "channel": {
            "enum": [
              "local",
              "local-attendee",
              "google",
              "zoom",
              "phone",
              "phone-incoming",
              "whatsapp",
              "connect",
              "webex",
              "skypeForConsumer",
              "skypeForBusiness",
              "teamsForBusiness",
              "teamsForBusiness2",
              "teamsForExchange",
              "teams2ForExchange",
              "custom",
              "resource",
              "whereby",
              "kmeet",
              "zava",
              "jitsi",
              "nextcloudTalk",
              "openTalk",
              "alfaview"
            ],
            "type": "string",
            "description": "Meeting channel/venue type. Defaults to \"phone\" (outgoing call)"
          }
        }
      },
      "CreatePlatformUserDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email address of the user"
          },
          "givenName": {
            "type": "string",
            "description": "The first name of the user. Defaults to the email prefix"
          },
          "familyName": {
            "type": "string",
            "description": "The last name of the user. Defaults to empty string"
          },
          "slug": {
            "type": "string",
            "minLength": 5,
            "description": "Optional unique slug for the user (minimum 5 characters). Defaults to creating slug via the email."
          },
          "timezone": {
            "type": "string",
            "description": "User timezone. Defaults to \"Europe/Berlin\"",
            "example": "America/New_York"
          },
          "availability": {
            "description": "Availability configuration. Creates default availability if not specified",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateAvailabilityOptionDto"
              }
            ]
          },
          "meetingType": {
            "description": "Meeting type configuration. Creates default meeting type if not specified",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateMeetingTypeOptionDto"
              }
            ]
          }
        },
        "required": [
          "email"
        ]
      },
      "CreatePlatformUserResponseDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "Unique ID of the created platform user",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "availabilityId": {
            "type": "string",
            "description": "ID of the created availability schedule",
            "example": "660e8400-e29b-41d4-a716-446655440001"
          },
          "meetingTypeId": {
            "type": "string",
            "description": "ID of the created meeting type",
            "example": "770e8400-e29b-41d4-a716-446655440002"
          },
          "bookingUrl": {
            "type": "string",
            "description": "Public URL where customers can book appointments",
            "example": "https://book.customdomain.com/john-doe/30min-meeting"
          },
          "companyId": {
            "type": "string",
            "description": "ID of the company this user belongs to",
            "example": "880e8400-e29b-41d4-a716-446655440003"
          }
        },
        "required": [
          "userId",
          "availabilityId",
          "meetingTypeId",
          "bookingUrl",
          "companyId"
        ]
      },
      "UserType": {
        "type": "string",
        "enum": [
          "standard",
          "resource",
          "api-platform",
          "partner",
          "viewer"
        ]
      },
      "CompanyBasicDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Company unique identifier"
          },
          "name": {
            "type": "string",
            "description": "Company name"
          },
          "slug": {
            "type": "string",
            "description": "Company unique slug"
          },
          "logo": {
            "type": "string",
            "description": "Company logo URL"
          },
          "description": {
            "type": "string",
            "description": "Company description"
          },
          "timezone": {
            "type": "string",
            "description": "Company timezone"
          },
          "language": {
            "type": "string",
            "description": "Company language"
          },
          "tier": {
            "type": "string",
            "description": "Effective plan tier (trial resolves to the trialled tier)"
          },
          "isInTrial": {
            "type": "boolean",
            "description": "Whether the company is in a trial"
          },
          "featureAccess": {
            "type": "object",
            "description": "Resolved plan entitlements and limits. Lets an integration explain a limit before hitting it instead of failing into one.",
            "additionalProperties": true
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "timezone",
          "language"
        ]
      },
      "UserResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User unique identifier"
          },
          "companyId": {
            "type": "string",
            "nullable": true,
            "description": "Company ID the user belongs to"
          },
          "email": {
            "type": "string",
            "description": "User email address"
          },
          "isAdmin": {
            "type": "boolean",
            "description": "Whether user is a company administrator"
          },
          "familyName": {
            "type": "string",
            "description": "User family name/lastname"
          },
          "givenName": {
            "type": "string",
            "description": "User given name/firstname"
          },
          "picture": {
            "type": "string",
            "description": "URL to user profile picture"
          },
          "createdAt": {
            "type": "string",
            "description": "User creation timestamp"
          },
          "updatedAt": {
            "type": "string",
            "description": "User last update timestamp"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true,
            "description": "User deletion timestamp"
          },
          "title": {
            "type": "string",
            "description": "User job title"
          },
          "anonymousBooking": {
            "type": "boolean",
            "description": "Whether user allows anonymous booking"
          },
          "anonymousCalendarActivity": {
            "type": "boolean",
            "description": "Whether user allows anonymous calendar activity"
          },
          "slug": {
            "type": "string",
            "description": "User unique slug for public URLs"
          },
          "showGettingStartedList": {
            "type": "boolean",
            "description": "Whether to show getting started list"
          },
          "recieveEmailMarketing": {
            "type": "boolean",
            "description": "Whether user receives marketing emails"
          },
          "timezone": {
            "type": "string",
            "description": "User timezone"
          },
          "language": {
            "description": "User preferred language",
            "allOf": [
              {
                "$ref": "#/components/schemas/Language"
              }
            ]
          },
          "referralId": {
            "type": "string",
            "description": "Referral ID if user was referred"
          },
          "personalPage": {
            "description": "User personal page configuration",
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonalPageResponseDto"
              }
            ]
          },
          "calendarSyncProviders": {
            "nullable": true,
            "description": "Calendar sync provider settings",
            "allOf": [
              {
                "$ref": "#/components/schemas/CalendarSync"
              }
            ]
          },
          "defaultAvailabilityId": {
            "type": "string",
            "description": "Default availability ID"
          },
          "aircallUserId": {
            "type": "string",
            "description": "Aircall user ID"
          },
          "phone": {
            "type": "string",
            "description": "User phone number"
          },
          "userType": {
            "description": "Type of user (standard, resource, api-platform)",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserType"
              }
            ]
          },
          "wherebyApiKey": {
            "type": "string",
            "nullable": true,
            "description": "Whereby API key"
          },
          "fullName": {
            "type": "string",
            "description": "User full name (computed)"
          },
          "groupIds": {
            "description": "IDs of groups the user belongs to",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupAdminIds": {
            "description": "IDs of groups the user is admin of",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meetingTypeIds": {
            "description": "IDs of meeting types owned by the user",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meetingTypeTemplateIds": {
            "description": "IDs of meeting type templates created by the user",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "appointmentIds": {
            "description": "IDs of appointments where user is a host",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workspaceIds": {
            "description": "IDs of workspaces the user belongs to",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reminderIds": {
            "description": "IDs of reminders owned by the user",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "formIds": {
            "description": "IDs of forms owned by the user",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "queueIds": {
            "description": "IDs of queues the user belongs to",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "queueUserGroupIds": {
            "description": "IDs of queue user groups the user belongs to",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availabilityIds": {
            "description": "IDs of availabilities owned by the user",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "company": {
            "description": "Company basic information",
            "allOf": [
              {
                "$ref": "#/components/schemas/CompanyBasicDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "isAdmin",
          "familyName",
          "givenName",
          "createdAt",
          "updatedAt",
          "title",
          "anonymousBooking",
          "anonymousCalendarActivity",
          "slug",
          "showGettingStartedList",
          "recieveEmailMarketing",
          "timezone",
          "language",
          "personalPage",
          "userType",
          "fullName"
        ]
      },
      "ListUsersResponseDto": {
        "type": "object",
        "properties": {
          "users": {
            "description": "Array of users matching the query criteria",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserResponseDto"
            }
          },
          "total": {
            "type": "number",
            "description": "Total number of users matching the query criteria (before pagination)",
            "minimum": 0,
            "example": 25
          },
          "count": {
            "type": "number",
            "description": "Number of users returned in this response",
            "minimum": 0,
            "example": 10
          },
          "offset": {
            "type": "number",
            "description": "Number of users skipped (pagination offset)",
            "minimum": 0,
            "example": 0
          }
        },
        "required": [
          "users",
          "total",
          "count",
          "offset"
        ]
      },
      "DeleteUserWithTransferDto": {
        "type": "object",
        "properties": {
          "transferMeetingTypes": {
            "type": "boolean",
            "default": true,
            "description": "Whether to transfer meeting types"
          },
          "transferForms": {
            "type": "boolean",
            "default": true,
            "description": "Whether to transfer forms"
          },
          "transferWorkflows": {
            "type": "boolean",
            "default": true,
            "description": "Whether to transfer workflows/reminders"
          },
          "transferAvailabilities": {
            "type": "boolean",
            "default": true,
            "description": "Whether to transfer availabilities"
          },
          "transferQualifiers": {
            "type": "boolean",
            "default": true,
            "description": "Whether to transfer qualifiers"
          },
          "targetUserId": {
            "type": "string",
            "description": "ID of the user to transfer resources to",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          }
        }
      },
      "UpdatePlatformUserDto": {
        "type": "object",
        "properties": {
          "givenName": {
            "type": "string",
            "description": "User's first name",
            "example": "John"
          },
          "familyName": {
            "type": "string",
            "description": "User's last name",
            "example": "Smith"
          },
          "slug": {
            "type": "string",
            "minLength": 5,
            "description": "Public booking slug. Must be unique and at least 5 characters. Invalid characters are normalized automatically (e.g. 'John Doe' becomes 'john-doe').",
            "example": "john-smith"
          }
        }
      },
      "UpdateUserCalendarSyncDTO": {
        "type": "object",
        "properties": {
          "calendarSyncProviders": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CalendarSync"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "id of the user to be updated.\nIf undefined, the user making the request is updated"
          }
        },
        "required": [
          "calendarSyncProviders"
        ]
      },
      "UpdateCalendarConnectionDto": {
        "type": "object",
        "properties": {
          "primaryCalendar": {
            "type": "string",
            "description": "Calendar ID to use for creating new events (e.g. \"primary\" for Google, or a specific calendar ID)",
            "example": "primary"
          },
          "selectedCalendars": {
            "description": "Calendar IDs to check for availability conflicts. Pass the calendar IDs from the GET /calendars endpoint.",
            "example": [
              "primary",
              "work@group.calendar.google.com"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "validateAvailability": {
            "type": "boolean",
            "description": "Whether to check this connection for availability conflicts when booking",
            "example": true
          },
          "cancelIfDeclinedOrDeleted": {
            "type": "boolean",
            "description": "Whether to auto-cancel the meetergo appointment if the attendee declines or deletes the calendar event",
            "example": true
          },
          "disableAttendeeNotification": {
            "type": "boolean",
            "description": "Whether to suppress attendee notifications on the calendar event",
            "example": false
          },
          "syncBuffersToCalendar": {
            "type": "boolean",
            "description": "Whether to sync buffer events to the connected calendar",
            "example": false
          }
        }
      },
      "ApiError": {
        "type": "object",
        "required": [
          "statusCode",
          "message"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "example": 400
          },
          "message": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ],
            "description": "A sentence, or the list of field constraints that failed. Validation errors name the offending property.",
            "example": [
              "limit must not be greater than 100"
            ]
          },
          "error": {
            "type": "string",
            "example": "BadRequestException"
          }
        }
      },
      "TextFormatOptions": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "length",
              "digits",
              "preset",
              "mask"
            ]
          },
          "minLength": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "maximum": 10000,
            "description": "kind = length"
          },
          "maxLength": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "maximum": 10000,
            "description": "kind = length"
          },
          "length": {
            "type": "number",
            "nullable": true,
            "minimum": 1,
            "maximum": 64,
            "description": "kind = digits: exact digit count"
          },
          "preset": {
            "type": "string",
            "nullable": true,
            "enum": [
              "se_orgnr",
              "de_plz",
              "at_plz",
              "ch_plz",
              "de_steuer_id",
              "pl_nip"
            ],
            "description": "kind = preset"
          },
          "mask": {
            "type": "string",
            "nullable": true,
            "maxLength": 64,
            "pattern": "/[#A*]/",
            "description": "kind = mask. # = digit, A = letter, * = letter or digit, anything else is a literal."
          },
          "errorMessage": {
            "type": "string",
            "nullable": true,
            "maxLength": 200,
            "description": "Host-authored message shown instead of the derived one"
          }
        },
        "required": [
          "kind"
        ]
      },
      "CrmCloseReasonOptionDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Stored on the deal. Stable across relabels, so history keeps resolving.",
            "maxLength": 64
          },
          "label": {
            "type": "string",
            "description": "Omitted on built-ins, which the client translates from `key`.",
            "maxLength": 60
          },
          "archived": {
            "type": "boolean",
            "description": "Hidden from new closes; deals already closed under it keep resolving."
          }
        },
        "required": [
          "key"
        ]
      },
      "CrmCloseReasonSettingsDto": {
        "type": "object",
        "properties": {
          "reasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmCloseReasonOptionDto"
            }
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "reasons",
          "required"
        ]
      },
      "SpaceFormFieldOption": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "value",
          "label"
        ]
      },
      "SpaceFormFieldMeta": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "fieldType": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceFormFieldOption"
            }
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "key",
          "label",
          "fieldType"
        ]
      },
      "RequestSpaceMagicLinkDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "no",
              "nl",
              "it",
              "pl",
              "se",
              "tr",
              "da"
            ]
          }
        },
        "required": [
          "email"
        ]
      },
      "CrmEmailIndexDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "externalMessageId": {
            "type": "string"
          },
          "threadId": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "snippet": {
            "type": "string"
          },
          "fromEmail": {
            "type": "string"
          },
          "toEmails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "direction": {
            "type": "object"
          },
          "sentAt": {
            "type": "string"
          },
          "provider": {
            "type": "object"
          },
          "contactId": {
            "type": "string"
          },
          "dealId": {
            "type": "string"
          },
          "providerUrl": {
            "type": "string",
            "description": "Deep link to open this email in Gmail or Outlook"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "externalMessageId",
          "subject",
          "fromEmail",
          "toEmails",
          "direction",
          "sentAt",
          "provider",
          "createdAt"
        ]
      },
      "PaginatedCrmEmailIndexDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmEmailIndexDto"
            }
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "data",
          "total"
        ]
      },
      "CrmEmailAttachmentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "downloadable": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "filename",
          "contentType",
          "size",
          "downloadable"
        ]
      },
      "CrmEmailBodyDto": {
        "type": "object",
        "properties": {
          "html": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmEmailAttachmentDto"
            }
          }
        }
      },
      "CrmSendCapabilityDto": {
        "type": "object",
        "properties": {
          "canSend": {
            "type": "boolean",
            "description": "Whether this user has a mailbox we can send from"
          },
          "provider": {
            "type": "string",
            "description": "Which rail a send would take",
            "enum": [
              "google",
              "microsoft",
              "imap"
            ]
          }
        },
        "required": [
          "canSend"
        ]
      },
      "ComposeCrmEmailDto": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 255
          },
          "text": {
            "type": "string",
            "maxLength": 50000
          },
          "dealId": {
            "type": "string",
            "description": "Files the mail against a deal as well as the contact."
          }
        },
        "required": [
          "subject",
          "text"
        ]
      },
      "ReplyCrmEmailDto": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 50000
          }
        },
        "required": [
          "text"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request did not validate. `message` lists the constraints that failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, malformed, or expired credentials.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Authenticated, but not allowed: the plan does not include this feature, or the token is scoped away from it.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource in your account. Resources belonging to another account are reported the same way.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limited. Back off and retry.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    }
  }
}
