{
  "openapi": "3.1.1",
  "info": {
    "title": "Boost.space API",
    "description": "Generated on 23.7.2026 22:20:00\n\n## Authentication\n\nAll secured endpoints require a Bearer token in the `Authorization` header: `Authorization: Bearer <token>`. Tokens are created in the user profile or via `POST /auth/{userId}/token`.",
    "contact": {
      "name": "Boost.space team",
      "email": "team@boost.space"
    },
    "license": {
      "name": "Proprietary - for use with licensed Boost.space instances only"
    },
    "version": "5.5.4"
  },
  "servers": [
    {
      "url": "https://{system}.boost.space/api",
      "description": "Boost.space client server",
      "variables": {
        "system": {
          "default": "test",
          "description": "Boost.space system name as it appears in the hostname (e.g. for `https://test.boost.space` the value is `test`)"
        }
      }
    }
  ],
  "paths": {
    "/ai/column-data-transform/{entityId}": {
      "get": {
        "tags": [
          "AI Features"
        ],
        "summary": "Get a column data transform config",
        "operationId": "getAiColumnDataTransform",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data transform config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ai column data transform config record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataTransform"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "AI Features"
        ],
        "summary": "Update a column data transform config",
        "operationId": "updateAiColumnDataTransform",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data transform config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColumnDataTransform"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Ai column data transform config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataTransform"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Create a column data transform config",
        "operationId": "createAiColumnDataTransform",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColumnDataTransform"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created Ai column data transform config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataTransform"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "AI Features"
        ],
        "summary": "Delete a column data transform config",
        "operationId": "deleteAiColumnDataTransform",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data transform config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/ai/column-data-transform": {
      "get": {
        "tags": [
          "AI Features"
        ],
        "summary": "List column data transform configs",
        "operationId": "listAiColumnDataTransform",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of Ai column data transform config records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataTransforms"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/ai/column-data-validation/{entityId}": {
      "get": {
        "tags": [
          "AI Features"
        ],
        "summary": "Get a column data validation config",
        "operationId": "getAiColumnDataValidation",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ai column data validation config record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "AI Features"
        ],
        "summary": "Update a column data validation config",
        "operationId": "updateColumnDataValidation",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColumnDataValidation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Ai column data validation config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "AI Features"
        ],
        "summary": "Delete a column data validation config",
        "operationId": "deleteAiColumnDataValidation",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/ai/column-data-validation": {
      "get": {
        "tags": [
          "AI Features"
        ],
        "summary": "List column data validation configs",
        "operationId": "listAiColumnDataValidation",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of Ai column data validation config records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidations"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Create a column data validation config",
        "operationId": "createColumnDataValidation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColumnDataValidation"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created Ai column data validation config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/ai/column-data-validation-result/{entityId}": {
      "get": {
        "tags": [
          "AI Features"
        ],
        "summary": "Get a column data validation result",
        "operationId": "getAiColumnDataValidationResult",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation result config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ai column data validation result config record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidationResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "AI Features"
        ],
        "summary": "Update a column data validation result",
        "operationId": "updateAiColumnDataValidationResult",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation result config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColumnDataValidationResult"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Ai column data validation result config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidationResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "AI Features"
        ],
        "summary": "Delete a column data validation result",
        "operationId": "deleteAiColumnDataValidationResult",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation result config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/ai/column-data-validation-result": {
      "get": {
        "tags": [
          "AI Features"
        ],
        "summary": "List column data validation results",
        "operationId": "listAiColumnDataValidationResults",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of Ai column data validation result config records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidationResults"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Create a column data validation result",
        "operationId": "createAiColumnDataValidationResult",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ColumnDataValidationResult"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created Ai column data validation result config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColumnDataValidationResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/column-data-transform/{entityId}/execute": {
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Execute a column data transform on demand",
        "description": "Applies a saved column data transform rule to a batch of record IDs, rewriting each record's custom field value according to the configured AI prompt. Requires sufficient AI token balance.",
        "operationId": "executeColumnDataTransform",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "description": "Record IDs to transform",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Transformed data."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/ai/column-data-validation/{entityId}/execute": {
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Execute a column data validation on demand",
        "operationId": "executeAiColumnDataValidation",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "description": "Record IDs to validate",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Transformed data."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/ai/generate-custom-modules": {
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Generate module definitions using AI",
        "description": "Generates module definitions using AI from a single prompt. Requires sufficient AI token balance.",
        "operationId": "generateModules",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "prompt": {
                    "description": "User-provided text prompt for the AI tool.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "result": {
                      "description": "The generated output of the tool",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unsupported type"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/ai/generate-custom-field": {
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Generate a value for a custom field using AI",
        "description": "Generates a value for a custom field using AI based on the provided prompt and module context. Requires sufficient AI token balance.",
        "operationId": "generateCustomField",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "prompt": {
                    "description": "User-provided text prompt for the AI tool.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "table": {
                    "description": "Boost.space table identifier related to the tool execution.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "module": {
                    "description": "Boost.space module identifier related to the tool execution.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "result": {
                      "description": "The generated output of the tool",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unsupported type"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/column-data-transform/{entityId}/preview": {
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Preview a column data transform without saving",
        "description": "Performs a one-time transformation on a single preview object using a custom prompt, without saving any configuration. Useful for testing prompts before creating a transform rule.",
        "operationId": "previewColumnDataTransform",
        "parameters": [
          {
            "name": "entityId",
            "in": "path",
            "description": "ID of Ai column data validation config",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "prompt",
                  "preview"
                ],
                "properties": {
                  "prompt": {
                    "description": "AI prompt to test",
                    "type": "string"
                  },
                  "preview": {
                    "description": "Sample record object to transform",
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Transformed data."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/auth/oauth/client/{clientId}": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Get OAuth2 client",
        "description": "Handle OAuth2 client CRUD operations\nRoute: auth/oauth/client[/<subResourceId>]",
        "operationId": "getAuthOauthClient",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "ID of OAuth2 client",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth2 client details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2Client"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "OAuth2 client not found"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Authentication"
        ],
        "summary": "Update OAuth2 client",
        "description": "Updates client name, redirect URIs, or scopes. Include regenerateSecret: true in the request body to rotate the clientSecret.",
        "operationId": "updateAuthOauthClient",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "ID of OAuth2 client",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "clientName": {
                    "description": "Client application name",
                    "type": "string"
                  },
                  "clientSecret": {
                    "description": "New client secret",
                    "type": "string"
                  },
                  "redirectUris": {
                    "description": "Allowed redirect URIs",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "scope": {
                    "description": "Space-delimited scopes per RFC 7591",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OAuth2 client updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2Client"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "OAuth2 client not found"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Authentication"
        ],
        "summary": "Delete OAuth2 client",
        "description": "Revokes the OAuth2 client and immediately invalidates all tokens issued to it.",
        "operationId": "deleteAuthOauthClient",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "ID of OAuth2 client",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth2 client deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "OAuth2 client not found"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/auth/oauth/client": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "List OAuth2 clients",
        "operationId": "listAuthOauthClient",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of OAuth2 clients",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2Clients"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Create OAuth2 client",
        "description": "Registers a new OAuth2 client. Requires clientName and redirectUris (HTTPS only, max 5, localhost allowed). Returns auto-generated clientId and clientSecret (secret shown only once).",
        "operationId": "createAuthOauthClient",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "clientName",
                  "redirectUris"
                ],
                "properties": {
                  "clientName": {
                    "description": "Client application name",
                    "type": "string"
                  },
                  "redirectUris": {
                    "description": "Allowed redirect URIs (HTTPS required except localhost, max 5)",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "scope": {
                    "description": "Space-delimited scopes per RFC 7591, e.g. 'user:read todo:write'",
                    "type": "string"
                  },
                  "grantTypes": {
                    "description": "Defaults to both if not provided",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "authorization_code",
                        "refresh_token"
                      ]
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OAuth2 client created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2Client"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/auth/oauth/authorize": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "OAuth2 authorization endpoint",
        "description": "OAuth2 Authorization Endpoint (Authorization Code Flow)",
        "operationId": "authorizeAuthOauth",
        "parameters": [
          {
            "name": "response_type",
            "in": "query",
            "description": "Must be 'code' for authorization code flow",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "code"
              ]
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "OAuth2 client ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "description": "Registered redirect URI",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Optional state parameter for CSRF protection",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "description": "Optional space-separated scopes",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirects to redirect_uri with authorization code",
            "headers": {
              "Location": {
                "description": "Redirect URL with code parameter",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": [
          {
            "Token": []
          }
        ]
      }
    },
    "/auth/oauth/token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "OAuth2 token endpoint",
        "description": "Exchanges an authorization code for an access/refresh token pair (grant_type: authorization_code) or refreshes an expired access token (grant_type: refresh_token). Returns access_token, token_type: Bearer, expires_in (seconds), and refresh_token.",
        "operationId": "createAuthOauthToken",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret"
                ],
                "properties": {
                  "grant_type": {
                    "description": "Grant type",
                    "type": "string",
                    "enum": [
                      "authorization_code",
                      "refresh_token"
                    ]
                  },
                  "client_id": {
                    "description": "OAuth2 client ID",
                    "type": "string"
                  },
                  "client_secret": {
                    "description": "OAuth2 client secret",
                    "type": "string"
                  },
                  "code": {
                    "description": "Authorization code (required for authorization_code grant)",
                    "type": "string"
                  },
                  "redirect_uri": {
                    "description": "Redirect URI (required for authorization_code grant)",
                    "type": "string"
                  },
                  "refresh_token": {
                    "description": "Refresh token (required for refresh_token grant)",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "access_token": {
                      "description": "Access token",
                      "type": "string"
                    },
                    "token_type": {
                      "description": "Token type",
                      "type": "string",
                      "example": "Bearer"
                    },
                    "expires_in": {
                      "description": "Token expiration time in seconds",
                      "type": "integer"
                    },
                    "refresh_token": {
                      "description": "Refresh token",
                      "type": "string"
                    },
                    "scope": {
                      "description": "Granted scopes",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or grant"
          },
          "401": {
            "description": "Invalid client credentials"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/auth/oauth/token-info": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "OAuth2 token info endpoint",
        "description": "Validates an access token and returns its metadata: client_id, scope array, and exp (expiration timestamp). Returns an OAuth error if the token is invalid or expired.",
        "operationId": "getOauthTokenInfo",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Access token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Token info",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "client_id": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "exp": {
                      "description": "Expiration timestamp",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/auth/oauth/renew": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Renew access token using refresh token",
        "description": "Exchanges a refresh_token for a new access_token and refresh_token pair, invalidating the previous refresh token.",
        "operationId": "renewAuthOauth",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "refresh_token"
                ],
                "properties": {
                  "refresh_token": {
                    "description": "Refresh token",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "New access and refresh tokens returned",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "token_type": {
                      "type": "string",
                      "example": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer"
                    },
                    "refresh_token": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/auth/oauth/revoke": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "OAuth2 token revocation endpoint",
        "description": "Revokes an access or refresh token. Returns {revoked: boolean} without disclosing whether the token previously existed.",
        "operationId": "revokeAuthOauth",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "token",
                  "client_id",
                  "client_secret"
                ],
                "properties": {
                  "token": {
                    "description": "The token to revoke (access or refresh)",
                    "type": "string"
                  },
                  "token_type_hint": {
                    "description": "Optional token type hint",
                    "type": "string",
                    "enum": [
                      "access_token",
                      "refresh_token"
                    ]
                  },
                  "client_id": {
                    "description": "OAuth2 client ID",
                    "type": "string"
                  },
                  "client_secret": {
                    "description": "OAuth2 client secret",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revocation processed",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "revoked": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Invalid client credentials"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/auth/{userId}/token/{tokenId}": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Get an API token by ID",
        "operationId": "getUserToken",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tokenId",
            "in": "path",
            "description": "ID of token",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get one record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Authentication"
        ],
        "summary": "Update an API token",
        "operationId": "updateUserToken",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tokenId",
            "in": "path",
            "description": "ID of token",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Token"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Authentication"
        ],
        "summary": "Delete an API token",
        "operationId": "deleteUserToken",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "tokenId",
            "in": "path",
            "description": "ID of token",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/auth/{userId}/token": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "List API tokens",
        "operationId": "listUserTokens",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get record list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tokens"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Create an API token",
        "description": "Creates a new private API token for the user with optional per-module CRUD permissions. The token value is returned only once in this response.",
        "operationId": "createUserToken",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "requestBody": {
          "description": "Token to be created",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Token"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/category/{id}": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "Get a category by ID",
        "operationId": "getCategory",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Category ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Category object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Category"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/category": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "List all categories",
        "operationId": "listCategories",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of categories",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Categories"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/module/{moduleId}": {
      "get": {
        "tags": [
          "Modules"
        ],
        "summary": "Get a module by ID",
        "operationId": "getModule",
        "parameters": [
          {
            "name": "moduleId",
            "in": "path",
            "description": "Module ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get one module",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Module"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Modules"
        ],
        "summary": "Delete a module",
        "operationId": "deleteModule",
        "parameters": [
          {
            "name": "moduleId",
            "in": "path",
            "description": "Module ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted",
            "description": "Module deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/module": {
      "get": {
        "tags": [
          "Modules"
        ],
        "summary": "List modules",
        "operationId": "listModules",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Get module list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Modules"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Modules"
        ],
        "summary": "Bulk update modules",
        "operationId": "bulkUpdateModules",
        "requestBody": {
          "description": "Array of module updates with IDs",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Module"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Modules updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Module"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "Modules"
        ],
        "summary": "Bulk create modules",
        "operationId": "createModule",
        "requestBody": {
          "description": "Array of modules to be created",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Module"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Modules created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Module"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/record/deleted": {
      "get": {
        "tags": [
          "Records"
        ],
        "summary": "Get deleted record IDs",
        "operationId": "listDeletedRecords",
        "parameters": [
          {
            "name": "updatedSince",
            "in": "query",
            "description": "Unix timestamp; only return record IDs deleted after this point",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of deleted record IDs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/{recordId}/file": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get record's file upload status",
        "operationId": "checkRecordFileUpload",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "resumableIdentifier",
            "in": "query",
            "description": "Reusmable identifier to check if part is uploaded",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "This part has been succesfully uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "description": "No-Content",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "This part has not been uploaded yet"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/{recordId}/file/{fileId}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get record's file",
        "operationId": "getRecordFile",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete record's file",
        "operationId": "deleteRecordFile",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/{recordId}/file/": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List record's connected files",
        "operationId": "listRecordFiles",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of connected files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Files"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/{recordId}/file-weight": {
      "put": {
        "tags": [
          "Files"
        ],
        "summary": "Update record file weight(s)",
        "operationId": "updateRecordFileWeight",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "ID of record",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "required": [
                        "id",
                        "weight"
                      ],
                      "properties": {
                        "id": {
                          "description": "File ID",
                          "type": "integer"
                        },
                        "weight": {
                          "description": "New weight value",
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "type": "object"
                    }
                  },
                  {
                    "required": [
                      "id",
                      "weight"
                    ],
                    "properties": {
                      "id": {
                        "description": "File ID",
                        "type": "integer"
                      },
                      "weight": {
                        "description": "New weight value",
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Map of fileId => new weight for rows that actually changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/module/{moduleId}/item/{recordId}": {
      "get": {
        "tags": [
          "Records"
        ],
        "summary": "Get a record by ID",
        "operationId": "getModuleRecord",
        "parameters": [
          {
            "name": "moduleId",
            "in": "path",
            "description": "Module ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/module/{moduleId}/item": {
      "get": {
        "tags": [
          "Records"
        ],
        "summary": "List records",
        "operationId": "listModuleRecords",
        "parameters": [
          {
            "name": "moduleId",
            "in": "path",
            "description": "Module ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Records"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/{recordId}/label/{labelId}": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "Get a label connected to a record",
        "operationId": "getRecordLabel",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "labelId",
            "in": "path",
            "description": "Label id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connected label",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Labels"
        ],
        "summary": "Connect a label to a record",
        "operationId": "createRecordLabel",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "labelId",
            "in": "path",
            "description": "Label id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "201": {
            "$ref": "#/components/responses/201_blank"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Labels"
        ],
        "summary": "Disconnect a label from a record",
        "operationId": "deleteRecordLabel",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "labelId",
            "in": "path",
            "description": "Label id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succesfully disconnected"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/{recordId}/label": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "List labels connected to a record",
        "operationId": "listRecordLabels",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Connected labels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Labels"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/{recordId}": {
      "get": {
        "tags": [
          "Records"
        ],
        "summary": "Get a record by ID",
        "operationId": "getRecordById",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Records"
        ],
        "summary": "Update a record",
        "operationId": "updateRecord",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "Record data to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Record"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Records"
        ],
        "summary": "Delete a record",
        "operationId": "deleteRecord",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "description": "Record ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record": {
      "get": {
        "tags": [
          "Records"
        ],
        "summary": "List records",
        "operationId": "listRecords",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "description": "Unix timestamp; only return items updated after this point",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Records"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Records"
        ],
        "summary": "Bulk update records",
        "operationId": "bulkUpdateRecords",
        "requestBody": {
          "description": "Array of records to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Records"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Records"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "Records"
        ],
        "summary": "Create a record",
        "operationId": "createRecord",
        "requestBody": {
          "description": "Record to be created. Optionally you may provide 'rawPayload' (string JSON or object) to auto-map fields. Explicit fields override values from rawPayload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Record"
                  },
                  {
                    "properties": {
                      "rawPayload": {
                        "description": "Whole source payload (JSON string or object) that will be auto-mapped to entity fields and customFieldsValues",
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Record created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/record/remote/{remoteId}/{remoteApplication}": {
      "get": {
        "tags": [
          "Records"
        ],
        "summary": "Get a record by remote ID",
        "operationId": "getRecordByRemoteId",
        "parameters": [
          {
            "name": "remoteId",
            "in": "path",
            "description": "Remote ID of record to be synchronized",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "remoteApplication",
            "in": "path",
            "description": "Name of remote application",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Records"
        ],
        "summary": "Upsert a record by remote ID",
        "operationId": "upsertRecordByRemoteId",
        "parameters": [
          {
            "name": "remoteId",
            "in": "path",
            "description": "Remote ID of record to be synchronized",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "remoteApplication",
            "in": "path",
            "description": "Name of remote application",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "description": "Record data. Optionally you may provide 'rawPayload' (string JSON or object) to auto-map fields. Explicit fields override values from rawPayload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Record"
                  },
                  {
                    "properties": {
                      "rawPayload": {
                        "description": "Whole source payload (JSON string or object) that will be auto-mapped to entity fields and customFieldsValues",
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Record found & updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "201": {
            "description": "Record created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/record/vector/similar": {
      "get": {
        "tags": [
          "Vector Database"
        ],
        "summary": "Find Record records semantically similar to a text query, scoped to one space.",
        "description": "Returns the top-N records from a single space whose embedded text fields are\n     *         closest to the query (cosine similarity, descending). Pre-filtering via `filter` or\n     *         `segment_id` runs BEFORE vector ranking so the candidate base is the same as an\n     *         equivalent `GET /record?filter=...` listing.",
        "operationId": "listRecordVectorSimilar",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "description": "Tenant scope. Rows from other spaces are excluded. The acting user must have read access. The custom module the records belong to is derived from `space.custom_module_id` — the caller does not pass it.",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 123,
              "minimum": 1
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Free-text query to embed and rank against. Max 4000 characters to keep the URL within Apache/NGINX default 8 KB limits.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "software company focused on automation",
              "maxLength": 4000,
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum records to return. Defaults to 20. No hard upper cap at the API layer.",
            "required": false,
            "schema": {
              "type": "integer",
              "example": 20,
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter expression in the same syntax as `GET /record?filter=...`. Resolves to a candidate-record set via FilterManager before vector ranking. Mutually exclusive with `segment_id`.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "category=software;status=active"
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "description": "ID of a saved segment whose filter to apply. Mutually exclusive with `filter`. Segment must belong to module `custom-module-item`.",
            "required": false,
            "schema": {
              "type": "integer",
              "example": 789,
              "minimum": 1
            }
          },
          {
            "name": "min_similarity",
            "in": "query",
            "description": "Cosine similarity floor in [0, 1]. Records whose best embedding is below this similarity are dropped at SQL level (HAVING).",
            "required": false,
            "schema": {
              "type": "number",
              "format": "float",
              "example": 0.8,
              "maximum": 1,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked records.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "recordId": {
                            "type": "integer",
                            "example": 12345
                          },
                          "similarity": {
                            "type": "number",
                            "format": "float",
                            "example": 0.94,
                            "maximum": 1,
                            "minimum": 0
                          },
                          "record": {
                            "$ref": "#/components/schemas/Record"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "totalCandidates": {
                      "description": "Number of records with at least one embedding in the filtered scope.",
                      "type": "integer",
                      "example": 8000
                    },
                    "queryTimeMs": {
                      "type": "integer",
                      "example": 38
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error (missing required param, segment/filter mutual exclusion, invalid threshold range, space/module mismatch, …)."
          },
          "401": {
            "description": "Not authenticated."
          },
          "403": {
            "description": "User lacks read access to the requested space."
          },
          "405": {
            "description": "Method not GET."
          },
          "502": {
            "description": "Embedding provider call failed (logged; client may retry)."
          }
        }
      }
    },
    "/record/vector/outliers": {
      "get": {
        "tags": [
          "Vector Database"
        ],
        "summary": "Find Record records semantically furthest from a text query, scoped to one space.",
        "description": "Inverse of `/similar`: returns records whose embedded text fields are most\n     *         DISTANT from the query (cosine distance, descending). Same filter/scope rules as\n     *         `/similar`. Note: HNSW indexes do not accelerate distance-DESC queries; outlier\n     *         ranking is closer to a full scan over the filtered candidate set.",
        "operationId": "listRecordVectorOutliers",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "description": "Tenant scope. Custom module derived from `space.custom_module_id`.",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 123,
              "minimum": 1
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Free-text query to embed; ranking returns records UNLIKE this. Max 4000 characters.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "premium wireless headphones",
              "maxLength": 4000,
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "example": 20,
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter expression. Mutually exclusive with `segment_id`.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "status=active"
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "description": "ID of a saved segment whose filter to apply. Mutually exclusive with `filter`.",
            "required": false,
            "schema": {
              "type": "integer",
              "example": 789,
              "minimum": 1
            }
          },
          {
            "name": "max_distance",
            "in": "query",
            "description": "Cosine-distance floor in [0, 2]. Records whose best embedding is CLOSER than this are dropped.",
            "required": false,
            "schema": {
              "type": "number",
              "format": "float",
              "example": 0.5,
              "maximum": 2,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Records ranked by descending cosine distance.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "recordId": {
                            "type": "integer",
                            "example": 99887
                          },
                          "distance": {
                            "type": "number",
                            "format": "float",
                            "example": 0.91,
                            "maximum": 2,
                            "minimum": 0
                          },
                          "record": {
                            "$ref": "#/components/schemas/Record"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "totalCandidates": {
                      "type": "integer",
                      "example": 8000
                    },
                    "queryTimeMs": {
                      "type": "integer",
                      "example": 38
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error."
          },
          "401": {
            "description": "Not authenticated."
          },
          "403": {
            "description": "User lacks read access to the requested space."
          },
          "405": {
            "description": "Method not GET."
          },
          "502": {
            "description": "Embedding provider call failed."
          }
        }
      }
    },
    "/record/vector/context": {
      "get": {
        "tags": [
          "Vector Database"
        ],
        "summary": "Lightweight semantic-context lookup designed for AI agents.",
        "description": "Returns a compact list of records most semantically relevant to the query.\n     *         Custom field values are emitted in short notation only (`value, id, created, updated,\n     *         customFieldInputId, customFieldInputName`) — no full DB representation. Designed for\n     *         AI agents that need lean context before acting; planned for future MCP-tool wrapping\n     *         so the response shape stays trivial to transform.",
        "operationId": "listRecordVectorContext",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "description": "Tenant scope. Custom module derived from `space.custom_module_id`.",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 123,
              "minimum": 1
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 4000,
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Filter expression. Mutually exclusive with `segment_id`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "segment_id",
            "in": "query",
            "description": "Saved segment whose filter to apply. When present, the response includes `fromSegment` with the segment name.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compact records.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "context": {
                      "type": "array",
                      "items": {
                        "description": "Record in short notation.",
                        "type": "object"
                      }
                    },
                    "retrieved": {
                      "type": "integer",
                      "example": 10
                    },
                    "fromSegment": {
                      "description": "Segment name; only present when `segment_id` was provided.",
                      "type": "string",
                      "example": "Enterprise Deals Q2"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error."
          },
          "401": {
            "description": "Not authenticated."
          },
          "403": {
            "description": "User lacks read access to the requested space."
          },
          "405": {
            "description": "Method not GET."
          },
          "502": {
            "description": "Embedding provider call failed."
          }
        }
      }
    },
    "/field/by-space/{spaceId}": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "List fields available in the given spaces",
        "description": "Lists field definitions available in the specified spaces. Pass space IDs as a comma-separated spaces query parameter (takes precedence) or as a path parameter.",
        "operationId": "listFieldsBySpace",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of space which fields to get",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "spaces",
            "in": "query",
            "description": "Array of space IDs which fields to get (separated by comma) - if set, takes precedence before spaceId parameter",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldInputs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/custom-field/by-space/{spaceId}": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "[Deprecated] Use /field/by-space/{spaceId}",
        "description": "Deprecated alias kept for backward compatibility after the `custom-field` module was renamed to `field`. Responses carry an RFC 9745 `Deprecation` header and a successor `Link` header; migrate to the canonical `GET /field/by-space/{spaceId}`.",
        "operationId": "listFieldsBySpaceDeprecated",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of space which fields to get",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "spaces",
            "in": "query",
            "description": "Array of space IDs which fields to get (separated by comma) - if set, takes precedence before spaceId parameter",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldInputs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "deprecated": true
      }
    },
    "/field-group/{fieldGroupId}": {
      "get": {
        "tags": [
          "Field Groups"
        ],
        "summary": "Get a field group by ID",
        "operationId": "getFieldGroup",
        "parameters": [
          {
            "name": "fieldGroupId",
            "in": "path",
            "description": "ID of Element group",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field Group record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Field Groups"
        ],
        "summary": "Update a field group",
        "operationId": "updateFieldGroup",
        "parameters": [
          {
            "name": "fieldGroupId",
            "in": "path",
            "description": "ID of Element group",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldGroup"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Field Group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Field Groups"
        ],
        "summary": "Delete a field group",
        "operationId": "deleteFieldGroup",
        "parameters": [
          {
            "name": "fieldGroupId",
            "in": "path",
            "description": "ID of Element group",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/field-group": {
      "get": {
        "tags": [
          "Field Groups"
        ],
        "summary": "List field groups",
        "operationId": "listFieldGroups",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of Field Group records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldGroups"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Field Groups"
        ],
        "summary": "Create a field group",
        "operationId": "createFieldGroup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldGroup"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created Field Group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/field/generate/{fieldId}": {
      "get": {
        "tags": [
          "AI Features"
        ],
        "summary": "Generate a value for a field using AI",
        "description": "Uses AI to generate values for one or more fields on a given entity. entityId may be a single ID or a JSON-encoded array. Requires edit permissions on the entity and sufficient AI token balance.",
        "operationId": "getFieldGenerate",
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "description": "A JSON-encoded list of IDs or a single field ID.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "entityModule",
            "in": "query",
            "description": "Module of field value",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "description": "Id of field value",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Field"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/field-group/{groupId}/input": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "List fields of a group",
        "operationId": "listFieldGroupInputs",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "ID of field group",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Response 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldInputs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/field/{fieldId}": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "Get a field definition",
        "operationId": "getField",
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "description": "ID of field",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Field"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Fields"
        ],
        "summary": "Update a field",
        "operationId": "updateField",
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "description": "ID of field",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Field"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Field"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Fields"
        ],
        "summary": "Delete a field",
        "operationId": "deleteField",
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "description": "ID of field",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/field": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "List fields",
        "operationId": "listFields",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of field input definitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldInputs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Fields"
        ],
        "summary": "Bulk update fields",
        "operationId": "bulkUpdateFields",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldInputs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldInputs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "Fields"
        ],
        "summary": "Create a field",
        "operationId": "createField",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Field"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Response 201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Field"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/field/of/{module}/{entityId}": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "List fields defined for a specific entity type",
        "operationId": "listFieldsOf",
        "parameters": [
          {
            "name": "module",
            "in": "path",
            "description": "Module of which fields to get",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "description": "Id of entity which fields to get",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldInputs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/field/order/": {
      "put": {
        "tags": [
          "Fields"
        ],
        "summary": "Reorder field inputs within a group",
        "operationId": "bulkUpdateFieldOrder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldInputs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Field input order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldInputs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/field/position": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "List field group positions",
        "operationId": "listFieldPositions",
        "responses": {
          "200": {
            "description": "Get Field Group Positions",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Key-value array, where key is position ID and value is position value",
                  "type": "array",
                  "items": {
                    "properties": {
                      "position": {
                        "description": "Group position",
                        "type": "string",
                        "enum": [
                          "tab",
                          "bottom",
                          "todolist",
                          "list-top",
                          "list-bottom"
                        ]
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/custom-field/position": {
      "get": {
        "tags": [
          "Fields"
        ],
        "summary": "[Deprecated] Use /field/position",
        "description": "Deprecated alias kept for backward compatibility after the `custom-field` module was renamed to `field`. Responses carry an RFC 9745 `Deprecation` header and a successor `Link` header; migrate to the canonical `GET /field/position`.",
        "operationId": "listFieldPositionsDeprecated",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Get Field Group Positions",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Key-value array, where key is position ID and value is position value",
                  "type": "array",
                  "items": {
                    "properties": {
                      "position": {
                        "description": "Group position",
                        "type": "string",
                        "enum": [
                          "tab",
                          "bottom",
                          "todolist",
                          "list-top",
                          "list-bottom"
                        ]
                      }
                    },
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "deprecated": true
      }
    },
    "/validate-calculation-function": {
      "post": {
        "tags": [
          "AI Features"
        ],
        "summary": "Validate a field calculation formula",
        "description": "Validates a field calculation formula against the supplied parameters. Returns a success flag and an error message if validation fails.",
        "operationId": "createValidateCalculationFunction",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "inputCalculation",
                  "params"
                ],
                "properties": {
                  "inputCalculation": {
                    "description": "Calculation formula to validate",
                    "type": "string"
                  },
                  "params": {
                    "description": "Parameters to evaluate the formula against",
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Formula was validated."
          },
          "400": {
            "description": "Request is not valid."
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/file/{fileId}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get a file record by ID",
        "operationId": "getFile",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get one File Record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Files"
        ],
        "summary": "Update a file record",
        "operationId": "updateFile",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/File"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File update",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete an attached file",
        "operationId": "deleteFile",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/file/{fileId}/show": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Stream file inline for browser preview",
        "description": "Streams the file inline for browser preview. Add base64=true to receive the content as a base64-encoded JSON string instead of raw bytes.",
        "operationId": "showFile",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "show",
            "in": "query",
            "description": "Set to true to stream the file inline",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "base64",
            "in": "query",
            "description": "Set to true to receive file content as a base64-encoded JSON string instead of raw bytes",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File contents"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/file/{fileId}/download": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Download a file",
        "description": "Serves the file with an attachment Content-Disposition header and the original filename, triggering a browser download dialog.",
        "operationId": "downloadFile",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "download",
            "in": "query",
            "description": "Set to true to trigger a browser download dialog",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Downloaded file"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/file/": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List file records",
        "operationId": "listFiles",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Get File list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Files"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/file": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Upload and register a file",
        "description": "Uploads a file from base64-encoded data. Accepts an optional sizes array for thumbnail generation. Validates MIME type and size limits.",
        "operationId": "uploadFile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "image",
                  "name"
                ],
                "properties": {
                  "image": {
                    "description": "Base64-encoded file content",
                    "type": "string",
                    "format": "byte"
                  },
                  "name": {
                    "description": "Original filename",
                    "type": "string"
                  },
                  "sizes": {
                    "description": "Optional thumbnail sizes to generate",
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "File create",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/file/{fileId}/label/connectible": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "List labels available to connect",
        "operationId": "listFileLabelConnectible",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Connectible labels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Labels"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/file/{fileId}/label/{labelId}": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "Get a connected label",
        "operationId": "getFileLabel",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "labelId",
            "in": "path",
            "description": "Label id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connected label",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Labels"
        ],
        "summary": "Connect a label",
        "operationId": "createFileLabel",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of business order",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "labelId",
            "in": "path",
            "description": "Label id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "201": {
            "$ref": "#/components/responses/201_blank"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Labels"
        ],
        "summary": "Disconnect a label",
        "operationId": "deleteFileLabel",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "labelId",
            "in": "path",
            "description": "Label id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succesfully disconnected"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/file/{fileId}/label": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "List connected labels",
        "operationId": "listFileLabel",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Connected labels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Labels"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/label": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "List labels",
        "operationId": "listLabel",
        "parameters": [
          {
            "name": "space",
            "in": "query",
            "description": "Filter labels by space ID. Accepts a single ID or a comma-separated list. Labels with no space (global) are always included",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Label records list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Labels"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Labels"
        ],
        "summary": "Bulk update labels",
        "operationId": "bulkUpdateLabel",
        "requestBody": {
          "description": "Label - array of Label records to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Labels"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Label updated records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Labels"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "Labels"
        ],
        "summary": "Create a label",
        "operationId": "createLabel",
        "requestBody": {
          "description": "Label to be created",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Label"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Label - Created record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      },
      "delete": {
        "tags": [
          "Labels"
        ],
        "summary": "Bulk delete labels",
        "operationId": "bulkDeleteLabel",
        "requestBody": {
          "description": "Labels - array of IDs to be deleted",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted_array"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/label/{labelId}": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "Get a label by ID",
        "operationId": "getLabel",
        "parameters": [
          {
            "name": "labelId",
            "in": "path",
            "description": "ID of label",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label - Get record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Labels"
        ],
        "summary": "Update a label",
        "operationId": "updateLabel",
        "parameters": [
          {
            "name": "labelId",
            "in": "path",
            "description": "ID of label",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "Label - array of values to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Label"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Label updated record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Labels"
        ],
        "summary": "Delete a label",
        "operationId": "deleteLabel",
        "parameters": [
          {
            "name": "labelId",
            "in": "path",
            "description": "ID of label",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted",
            "description": "Label - record deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/menu/{menuId}": {
      "get": {
        "tags": [
          "Menus"
        ],
        "summary": "Get a menu item by ID",
        "operationId": "getMenu",
        "parameters": [
          {
            "name": "menuId",
            "in": "path",
            "description": "Menu item ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Menu object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Menu"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Menus"
        ],
        "summary": "Update a menu item",
        "operationId": "updateMenu",
        "parameters": [
          {
            "name": "menuId",
            "in": "path",
            "description": "Menu item ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Menu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated menu item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Menu"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Menus"
        ],
        "summary": "Delete a menu item",
        "operationId": "deleteMenu",
        "parameters": [
          {
            "name": "menuId",
            "in": "path",
            "description": "Menu item ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/menu": {
      "get": {
        "tags": [
          "Menus"
        ],
        "summary": "List menu items",
        "operationId": "listMenus",
        "parameters": [
          {
            "name": "space_id",
            "in": "query",
            "description": "If provided, returns the menu items of the given space (requires administration permission). If omitted, returns the menu items available to the current user.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "loadAll",
            "in": "query",
            "description": "When set to 'true' and the current user is an admin, returns all menu items across spaces instead of only the user's items.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of menu items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Menus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Menus"
        ],
        "summary": "Create a menu item",
        "operationId": "createMenu",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Menu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created menu item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Menu"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/space/{spaceId}": {
      "get": {
        "tags": [
          "Spaces"
        ],
        "summary": "Get a space by ID",
        "operationId": "getSpace",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of Space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get one Space",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Spaces"
        ],
        "summary": "Update a space",
        "operationId": "updateSpace",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of Space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Space"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Space update",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Spaces"
        ],
        "summary": "Delete a space",
        "operationId": "deleteSpace",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of Space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/space": {
      "get": {
        "tags": [
          "Spaces"
        ],
        "summary": "List spaces",
        "operationId": "listSpace",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Get Space list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Spaces"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Spaces"
        ],
        "summary": "Create a space",
        "operationId": "createSpace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Space"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Space create",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/space/{spaceId}/file": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get file upload status",
        "operationId": "checkSpaceFileUpload",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "resumableIdentifier",
            "in": "query",
            "description": "Reusmable identifier to check if part is uploaded",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "This part has been succesfully uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "description": "No-Content",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "This part has not been uploaded yet"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/space/{spaceId}/file/{fileId}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get an attached file",
        "operationId": "getSpaceFile",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Files"
        ],
        "summary": "Update an attached file",
        "operationId": "updateSpaceFile",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/File"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete an attached file",
        "operationId": "deleteSpaceFile",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "ID of file",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/space/{spaceId}/file/": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List attached files",
        "operationId": "fileSpace",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "description": "ID of space",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of connected files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Files"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/space/weight": {
      "put": {
        "tags": [
          "Spaces"
        ],
        "summary": "Reorder spaces by weight",
        "description": "Reorders spaces by updating their display weight. Accepts either a single space object or an array. Admin-only; id and weight must be positive integers.",
        "operationId": "weightSpace",
        "requestBody": {
          "description": "Array of space IDs with their new weights",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "required": [
                    "id",
                    "weight"
                  ],
                  "properties": {
                    "id": {
                      "description": "Space ID",
                      "type": "integer"
                    },
                    "weight": {
                      "description": "New weight value",
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Space weight reorder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Spaces"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/status/{statusId}": {
      "get": {
        "tags": [
          "Statuses"
        ],
        "summary": "Get a status by ID",
        "operationId": "getStatus",
        "parameters": [
          {
            "name": "statusId",
            "in": "path",
            "description": "ID of Status",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Statuses"
        ],
        "summary": "Update a status",
        "operationId": "updateStatus",
        "parameters": [
          {
            "name": "statusId",
            "in": "path",
            "description": "ID of Status",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "Array of Status records values to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status record updated values",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Statuses"
        ],
        "summary": "Delete a status",
        "operationId": "deleteStatus",
        "parameters": [
          {
            "name": "statusId",
            "in": "path",
            "description": "ID of Status",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted",
            "description": "list of deleted Status records IDs"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/status/": {
      "get": {
        "tags": [
          "Statuses"
        ],
        "summary": "List statuses",
        "operationId": "listStatuses",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "name": "modul",
            "in": "query",
            "description": "Status module",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "spaceId",
            "in": "query",
            "description": "Status spaceId. Multiple ids can be separated using comma",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "statusSystemId",
            "in": "query",
            "description": "StatusSystem ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status list of records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statuses"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Statuses"
        ],
        "summary": "Bulk update statuses",
        "operationId": "bulkUpdateStatuses",
        "requestBody": {
          "description": "Array of Status records values to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Statuses"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status records updated values",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Statuses"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "Statuses"
        ],
        "summary": "Create a status",
        "operationId": "createStatus",
        "requestBody": {
          "description": "Status record array",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Status"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status record created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/status-system/{statusSystemId}": {
      "get": {
        "tags": [
          "Statuses"
        ],
        "summary": "Get a system status by ID",
        "operationId": "getStatusSystem",
        "parameters": [
          {
            "name": "statusSystemId",
            "in": "path",
            "description": "ID of StatusSystem",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "StatusSystem record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusSystem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Statuses"
        ],
        "summary": "Update a system status",
        "operationId": "updateStatusSystem",
        "parameters": [
          {
            "name": "statusSystemId",
            "in": "path",
            "description": "StatusSystem ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "StatusSystem values to be updated ",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusSystem"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "StatusSystem record updated values",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusSystem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/status-system/": {
      "get": {
        "tags": [
          "Statuses"
        ],
        "summary": "List system statuses",
        "operationId": "listStatusSystem",
        "parameters": [
          {
            "name": "modul",
            "in": "query",
            "description": "Module for which to get status system (empty for all modules)",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "list of StatusSystem records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusSystems"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/team/{id}": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "Get a team by ID",
        "operationId": "getTeam",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Team object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/team": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "List all teams",
        "operationId": "listTeams",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "List of teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Teams"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/team/{id}/user": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "List users in a team",
        "operationId": "listTeamUsers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Team ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Users"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/user/{userId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a user by ID",
        "operationId": "getUser",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update a user",
        "operationId": "updateUser",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "User record to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated values",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete a user",
        "operationId": "deleteUser",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/user": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Search users",
        "operationId": "listUsers",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "User records list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Users"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Bulk update users",
        "operationId": "bulkUpdateUser",
        "requestBody": {
          "description": "Array of User records to be updated",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create a user",
        "operationId": "createUser",
        "requestBody": {
          "description": "User to be created",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User record created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/user/remote/{remoteId}/{remoteApplication}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a user by remote ID",
        "description": "Retrieves a user by its external remote ID and application name, using the integration_pair mapping table. Returns 404 if no mapping exists.",
        "operationId": "getUserRemote",
        "parameters": [
          {
            "name": "remoteId",
            "in": "path",
            "description": "Remote ID of record to be synchronized",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "remoteApplication",
            "in": "path",
            "description": "Name of remote application",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "User record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Upsert record by remote ID (create or update)",
        "description": "Upsert by remote ID: updates the existing user if a mapping is found (200), otherwise creates a new one and stores the mapping (201).",
        "operationId": "createUserRemote",
        "parameters": [
          {
            "name": "remoteId",
            "in": "path",
            "description": "Remote ID of record to be synchronized",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "remoteApplication",
            "in": "path",
            "description": "Name of remote application",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "description": "Record data",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Record found & updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "201": {
            "description": "Record created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/user/invitation/{invitationId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a user invitation by ID",
        "operationId": "getUserInvitation",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "description": "ID of Invitation",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get one One record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Revoke a user invitation",
        "operationId": "deleteUserInvitation",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "description": "ID of Invitation",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/user/invitation/hash": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a user invitation by its hash token",
        "description": "Public endpoint — retrieves invitation details by hash token without authentication, allowing an invitee to view the invitation before accepting. Returns 404 if already accepted.",
        "operationId": "listUserInvitationHash",
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "description": "Invitation hash",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/user/invitation": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List user invitations",
        "operationId": "listUserInvitation",
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Get List of records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitations"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Send a user invitation",
        "description": "Sends an email invitation to join the system. Requires role (admin, user, supervisor, guest, or client) and optional team/category assignments. Generates a unique registration link valid until accepted or revoked.",
        "operationId": "createUserInvitation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invitation"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    },
    "/user/{userId}/rate/{rateId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a user pay rate by ID",
        "operationId": "getUserRate",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "rateId",
            "in": "path",
            "description": "ID of rate",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get one record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update a user pay rate",
        "operationId": "updateUserRate",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "rateId",
            "in": "path",
            "description": "ID of rate",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete a user pay rate",
        "operationId": "deleteUserRate",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "rateId",
            "in": "path",
            "description": "ID of rate",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200_deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/user/{userId}/rate": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List user pay rates",
        "operationId": "listUserRate",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Get List of records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRates"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create a user pay rate",
        "operationId": "createUserRate",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/value-metric": {
      "get": {
        "tags": [
          "Value Metrics"
        ],
        "summary": "Get ValueMetrics list",
        "description": "Lists metric records, optionally filtered by year and month query parameters for use in dashboard charts and time-series widgets.",
        "operationId": "listValueMetric",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "description": "Year for which data to select",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "query",
            "description": "Month for which data to select",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "responses": {
          "200": {
            "description": "Value metrics records list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValueMetrics"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Value Metrics"
        ],
        "summary": "Track ValueMetric",
        "description": "Records a metric value for the given Make scenario. If a record for the same makeScenarioId already exists for the current date, the value is added to the existing record rather than creating a new one.",
        "operationId": "createValueMetric",
        "requestBody": {
          "description": "Value Metrics to be created",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValueMetric"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ValueMetrics - Created record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValueMetric"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "parameters": []
      }
    }
  },
  "components": {
    "schemas": {
      "AllModulesDash": {
        "title": "All modules in system (dash syntax)",
        "description": "Module name in `kebab-case` (dash-separated) format, used in URL path parameters. Open set (built-ins plus custom modules); not restricted to an enum.",
        "type": "string",
        "example": "activities"
      },
      "ColumnDataTransforms": {
        "title": "Array of multiple ColumnDataTransform objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ColumnDataTransform"
        },
        "example": [
          {
            "id": 42,
            "columnKey": "string",
            "module": "string",
            "prompt": "string",
            "enabled": true,
            "provider": "platform",
            "aiVoiceTone": "auto",
            "aiCreativity": "high",
            "customInputId": 42,
            "type": "auto"
          }
        ]
      },
      "ColumnDataTransform": {
        "title": "ColumnDataTransform entity",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "columnKey": {
            "description": "Identifier of the custom field column this transform is applied to.",
            "type": "string"
          },
          "module": {
            "description": "System name of the module (e.g. contact, deal) that owns the column being transformed.",
            "type": "string"
          },
          "prompt": {
            "description": "User-defined instruction sent to the AI to guide how the column value should be transformed.",
            "type": "string"
          },
          "enabled": {
            "description": "Whether this column data transform is active and will be applied during processing.",
            "type": "boolean"
          },
          "provider": {
            "description": "AI backend used for the transformation: platform = Boost.space built-in AI, websearch = web-augmented AI, custom = user-configured provider.",
            "type": "string",
            "enum": [
              "platform",
              "websearch",
              "custom"
            ]
          },
          "aiVoiceTone": {
            "description": "Determines the style and attitude in which the generated content is delivered.",
            "type": "string",
            "enum": [
              "auto",
              "professional",
              "technical",
              "casual",
              "straightforward",
              "confident",
              "friendly",
              "humorous",
              "inspirational"
            ]
          },
          "aiCreativity": {
            "description": "Controls how expressive and varied the AI output language is; high allows more creative responses.",
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "customInputId": {
            "description": "ID of the custom field input (Field) this transform is bound to.",
            "type": "integer"
          },
          "type": {
            "description": "Specifies whether the AI transformation runs automatically on record change (auto) or only when triggered manually.",
            "type": "string",
            "enum": [
              "auto",
              "manual"
            ]
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "columnKey": "string",
          "module": "string",
          "prompt": "string",
          "enabled": true,
          "provider": "platform",
          "aiVoiceTone": "auto",
          "aiCreativity": "high",
          "customInputId": 42,
          "type": "auto"
        }
      },
      "ColumnDataValidations": {
        "title": "Array of multiple ColumnDataValidation objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ColumnDataValidation"
        },
        "example": [
          {
            "id": 42,
            "columnKey": "string",
            "module": "string",
            "provider": "platform",
            "prompt": "string",
            "enabled": true,
            "includeEmptyFields": true,
            "customInputId": 42
          }
        ]
      },
      "ColumnDataValidation": {
        "title": "ColumnDataValidation entity",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "columnKey": {
            "description": "Identifier of the custom field column this validation rule is applied to.",
            "type": "string"
          },
          "module": {
            "description": "System name of the module (e.g. contact, deal) that owns the column being validated.",
            "type": "string"
          },
          "provider": {
            "description": "AI backend used for the validation: platform = Boost.space built-in AI, websearch = web-augmented AI, custom = user-configured provider.",
            "type": "string",
            "enum": [
              "platform",
              "websearch",
              "custom"
            ]
          },
          "prompt": {
            "description": "User-defined instruction sent to the AI describing how the column value should be validated.",
            "type": "string"
          },
          "enabled": {
            "description": "Whether this column data validation rule is active and will be applied during processing.",
            "type": "boolean"
          },
          "includeEmptyFields": {
            "description": "When true, records with an empty value in the target column are also submitted for validation.",
            "type": "boolean"
          },
          "customInputId": {
            "description": "ID of the custom field input (Field) this validation rule is bound to.",
            "type": "integer"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "columnKey": "string",
          "module": "string",
          "provider": "platform",
          "prompt": "string",
          "enabled": true,
          "includeEmptyFields": true,
          "customInputId": 42
        }
      },
      "ColumnDataValidationResults": {
        "title": "Array of multiple ColumnDataValidationResult objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ColumnDataValidationResult"
        },
        "example": [
          {
            "id": 42,
            "result": "string",
            "aiColumnDataValidationId": 42,
            "entityId": "string"
          }
        ]
      },
      "ColumnDataValidationResult": {
        "title": "ColumnDataValidationResult entity",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "result": {
            "description": "AI-generated validation outcome text for the evaluated record field.",
            "type": "string"
          },
          "aiColumnDataValidationId": {
            "description": "ID of the ColumnDataValidation configuration that produced this result.",
            "type": "integer"
          },
          "entityId": {
            "description": "ID of the record (entity) whose field was validated.",
            "type": "string"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "result": "string",
          "aiColumnDataValidationId": 42,
          "entityId": "string"
        }
      },
      "OAuth2Clients": {
        "title": "Array of multiple OAuth2Client objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/OAuth2Client"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "clientId": "string",
            "clientName": "Sample clientName",
            "redirectUris": [
              "https://acme.boost.space"
            ],
            "scopes": [
              "string"
            ],
            "tokenId": 42
          }
        ]
      },
      "OAuth2Client": {
        "title": "OAuth2Client",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "clientId": {
            "description": "Publicly known OAuth2 client identifier used in authorization and token requests",
            "type": "string"
          },
          "clientName": {
            "description": "Human-readable display name of the OAuth2 application",
            "type": "string"
          },
          "redirectUris": {
            "description": "Permitted redirect URIs that the authorization server will send the auth code to",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes": {
            "description": "OAuth2 scopes this client is authorized to request",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tokenId": {
            "description": "ID of the MCP API token linked to this OAuth2 client for machine-to-machine access",
            "type": "integer"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "clientId": "string",
          "clientName": "Sample clientName",
          "redirectUris": [
            "https://acme.boost.space"
          ],
          "scopes": [
            "string"
          ],
          "tokenId": 42
        }
      },
      "Tokens": {
        "title": "Array of multiple Token objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Token"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "userId": 42,
            "token": "string",
            "description": "string",
            "priority": 1,
            "boostId": "string",
            "permissions": [
              {
                "id": 42,
                "created": "string",
                "createdUserId": 42,
                "tokenId": 42,
                "create": true,
                "read": true,
                "update": true,
                "delete": true,
                "boostId": "string"
              }
            ],
            "allowedIps": [
              "string"
            ],
            "mcp": true
          }
        ]
      },
      "Token": {
        "title": "Token",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "userId": {
            "description": "ID of the user this token authenticates on behalf of",
            "type": "integer",
            "readOnly": true
          },
          "token": {
            "description": "Bearer token value used in the Authorization header",
            "type": "string",
            "readOnly": true
          },
          "description": {
            "description": "Human-readable description of the token's purpose",
            "type": "string"
          },
          "priority": {
            "description": "Default conflict-resolution priority across tokens; lower value takes precedence",
            "type": "integer"
          },
          "boostId": {
            "description": "Globally unique boost.space identifier for this record (UUID-like)",
            "type": "string",
            "readOnly": true
          },
          "permissions": {
            "description": "Per-module CRUD permissions granted to this token",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenPermission"
            }
          },
          "allowedIps": {
            "description": "Whitelist of IPv4/IPv6 addresses or CIDR ranges; empty means unrestricted",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mcp": {
            "description": "When true, this token is an MCP (Model Context Protocol) token for AI integrations",
            "type": "boolean"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "userId": 42,
          "token": "string",
          "description": "string",
          "priority": 1,
          "boostId": "string",
          "permissions": [
            {
              "id": 42,
              "created": "string",
              "createdUserId": 42,
              "tokenId": 42,
              "module": "activities",
              "create": true,
              "read": true,
              "update": true,
              "delete": true,
              "boostId": "string"
            }
          ],
          "allowedIps": [
            "string"
          ],
          "mcp": true
        }
      },
      "TokenPermission": {
        "title": "Token Permission",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "tokenId": {
            "description": "ID of the token this permission entry belongs to",
            "type": "integer"
          },
          "module": {
            "description": "Module whose resources this permission controls",
            "type": "string",
            "oneOf": [
              {
                "$ref": "#/components/schemas/AllModulesDash"
              }
            ]
          },
          "create": {
            "description": "Whether the token may create records in this module",
            "type": "boolean"
          },
          "read": {
            "description": "Whether the token may read records in this module",
            "type": "boolean"
          },
          "update": {
            "description": "Whether the token may update records in this module",
            "type": "boolean"
          },
          "delete": {
            "description": "Whether the token may delete records in this module",
            "type": "boolean"
          },
          "boostId": {
            "description": "Globally unique boost.space identifier for this record (UUID-like)",
            "type": "string",
            "readOnly": true
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "string",
          "createdUserId": 42,
          "tokenId": 42,
          "module": "activities",
          "create": true,
          "read": true,
          "update": true,
          "delete": true,
          "boostId": "string"
        }
      },
      "Categories": {
        "title": "Array of multiple Category objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Category"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "name": "Sample name",
            "default": true,
            "color": "#1f6feb",
            "fileId": 42,
            "statusSystemId": 42,
            "users": [
              1
            ],
            "resources": [
              1
            ],
            "status_system": {
              "id": 42,
              "color": "#1f6feb",
              "icon_prefix": "string",
              "icon": "string",
              "module": "string",
              "weight": 1,
              "name": "Sample name",
              "system_name": "Sample system_name",
              "activated": 1,
              "custom": true,
              "allow_move": "string",
              "boostId": "string"
            },
            "image_url": "https://acme.boost.space"
          }
        ]
      },
      "Category": {
        "title": "Category",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of the user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of the user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "description": "Display name of the category",
            "type": "string"
          },
          "default": {
            "description": "1 if this is the default category assigned to new users, 0 otherwise",
            "type": "boolean"
          },
          "color": {
            "description": "Display color for this category in hex format (e.g. #FF5733)",
            "type": "string"
          },
          "fileId": {
            "description": "ID of the file used as the category avatar image",
            "type": "integer"
          },
          "statusSystemId": {
            "description": "ID of the StatusSystem assigned to this category",
            "type": "integer"
          },
          "users": {
            "description": "IDs of users who belong to this category",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "resources": {
            "description": "IDs of resources assigned to this category",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "status_system": {
            "$ref": "#/components/schemas/StatusSystem",
            "description": "Expanded StatusSystem object"
          },
          "image_url": {
            "description": "URL of the category avatar image",
            "type": "string",
            "readOnly": true
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "name": "Sample name",
          "default": true,
          "color": "#1f6feb",
          "fileId": 42,
          "statusSystemId": 42,
          "users": [
            1
          ],
          "resources": [
            1
          ],
          "status_system": {
            "id": 42,
            "color": "#1f6feb",
            "icon_prefix": "string",
            "icon": "string",
            "module": "string",
            "weight": 1,
            "name": "Sample name",
            "system_name": "Sample system_name",
            "activated": 1,
            "custom": true,
            "allow_move": "string",
            "boostId": "string"
          },
          "image_url": "https://acme.boost.space"
        }
      },
      "Remote": {
        "title": "Remote id",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "description": "Remote ID",
            "type": "string"
          },
          "application": {
            "description": "Remote Application",
            "type": "string"
          },
          "delete": {
            "description": "Delete Remote ID",
            "type": "boolean"
          }
        },
        "type": "object",
        "example": {
          "id": "1",
          "application": "string",
          "delete": true
        }
      },
      "Error": {
        "title": "Error",
        "description": "Standard Boost.space error body returned by all 4xx/5xx responses.",
        "properties": {
          "code": {
            "description": "Boost.space error code — the HTTP status for generic errors (e.g. 400, 401, 403, 404, 500) or a specific internal code for finer cases (e.g. 4002 missing required field, 4005 object not found, 4031 2FA required, 4227 OAuth error).",
            "type": "integer"
          },
          "message": {
            "description": "Human-readable description of the error, e.g. `Missing required field: name` or `Object not found: Contact 123`.",
            "type": "string"
          }
        },
        "type": "object",
        "example": {
          "code": 1,
          "message": "string"
        }
      },
      "Modules": {
        "title": "Array of multiple Module objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Module"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "iconName": "Sample iconName",
            "iconPrefix": "string",
            "name": "Sample name",
            "description": "string",
            "color": "#1f6feb",
            "boostId": "string",
            "isDemo": true
          }
        ]
      },
      "Module": {
        "title": "Module",
        "required": [
          "iconName",
          "iconPrefix",
          "name",
          "color"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user that created this module",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last updated timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "iconName": {
            "description": "FontAwesome icon name (e.g. 'database', 'user').",
            "type": "string"
          },
          "iconPrefix": {
            "description": "FontAwesome icon style prefix (e.g. 'fas', 'far', 'fab').",
            "type": "string"
          },
          "name": {
            "description": "Display name of the module, unique within a space.",
            "type": "string"
          },
          "description": {
            "description": "More detailed description of the module",
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "description": "Accent color for the module displayed in the UI, in 6-digit HEX format (e.g. '#FF5733').",
            "type": "string"
          },
          "boostId": {
            "description": "Globally unique cross-system identifier for this record (used for integrations and deduplication).",
            "type": "string",
            "readOnly": true
          },
          "isDemo": {
            "description": "Whether this module is a demo module",
            "type": "boolean"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "iconName": "Sample iconName",
          "iconPrefix": "string",
          "name": "Sample name",
          "description": "string",
          "color": "#1f6feb",
          "boostId": "string",
          "isDemo": true
        }
      },
      "Records": {
        "title": "Array of multiple Record objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Record"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "statusSystemId": 42,
            "statusId": 42,
            "spaceId": 42,
            "featuredImageId": 42,
            "files": [
              1
            ],
            "labels": [
              1
            ],
            "boostId": "string",
            "customFieldsValues": [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "valueWysiwyg": "string",
                "valueInt": 1,
                "valueFloat": 1.5,
                "valueDatetime": "2026-01-15T09:30:00Z",
                "valueModule": "string",
                "value": "string",
                "fileId": 42,
                "customFieldInputId": 42,
                "table": "string",
                "entityId": 42,
                "customFieldInputName": "Sample customFieldInputName",
                "selected": true,
                "ipAddress": "string",
                "translatable": true
              }
            ]
          }
        ]
      },
      "Record": {
        "title": "Record",
        "required": [
          "statusSystemId",
          "spaceId"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "statusSystemId": {
            "description": "ID of the system-level status (pipeline stage) this record belongs to; must be valid for the module.",
            "type": "integer"
          },
          "statusId": {
            "description": "ID of the user-defined sub-status within the system status.",
            "type": "integer"
          },
          "spaceId": {
            "description": "ID of the space this record belongs to.",
            "type": "integer"
          },
          "featuredImageId": {
            "description": "ID of the File used as the default image for this record.",
            "type": "integer"
          },
          "files": {
            "description": "IDs of files attached to this record.",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "readOnly": true
          },
          "labels": {
            "description": "IDs of labels assigned to this record.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "boostId": {
            "description": "Globally unique cross-system identifier for this record (used for integrations and deduplication).",
            "type": "string",
            "readOnly": true
          },
          "customFieldsValues": {
            "description": "Values for all custom fields defined in the module, keyed by field definition.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldValue"
            }
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "statusSystemId": 42,
          "statusId": 42,
          "spaceId": 42,
          "featuredImageId": 42,
          "files": [
            1
          ],
          "labels": [
            1
          ],
          "boostId": "string",
          "customFieldsValues": [
            {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "valueWysiwyg": "string",
              "valueInt": 1,
              "valueFloat": 1.5,
              "valueDatetime": "2026-01-15T09:30:00Z",
              "valueModule": "string",
              "value": "string",
              "fileId": 42,
              "customFieldInputId": 42,
              "module": "activities",
              "table": "string",
              "entityId": 42,
              "customFieldInputName": "Sample customFieldInputName",
              "selected": true,
              "ipAddress": "string",
              "translatable": true,
              "translations": {
                "en": {
                  "field1": "translation1",
                  "field2": "translation2"
                },
                "it": {
                  "field1": "translation1",
                  "field2": "translation2"
                },
                "cs": {
                  "field1": "translation1",
                  "field2": "translation2"
                }
              }
            }
          ]
        }
      },
      "FieldGroups": {
        "title": "Array of multiple FieldGroup objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/FieldGroup"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "name": "Sample name",
            "module": "string",
            "table": "string",
            "size": "string",
            "weight": 1,
            "inputSize": "string",
            "static": "string",
            "systemName": "Sample systemName",
            "derivedFrom": 1,
            "boostId": "string",
            "protected": true,
            "inputs": [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "createdUserId": 42,
                "name": "Sample name",
                "description": "string",
                "tooltip": "string",
                "percentUpTo100": true,
                "isLabel": "string",
                "className": "Sample className",
                "relatedEntityCfId": "string",
                "relatedValueCounterpart": true,
                "property": "string",
                "inputType": "related_entity",
                "required": true,
                "order=0": 1,
                "fieldGroups": [],
                "actionId": 42,
                "currencyId": 42,
                "inputOptions": [],
                "remotes": [],
                "spaces": [],
                "inputCalculation": "string",
                "relatedCustomModuleId": 42,
                "relatedEntityProperty": "string",
                "provider": "platform",
                "providerId": 42,
                "visible": true,
                "rollupRelationInputId": 42,
                "rollupTargetInputId": 42,
                "rollupAggregation": "showOriginal",
                "aiPrompt": "string",
                "aiVoiceTone": "auto",
                "aiLength": "auto",
                "aiFormatting": "text",
                "aiCreativity": "high",
                "aiType": "auto",
                "translatable": true
              }
            ],
            "entities": [
              {
                "entityId": 42,
                "module": "string",
                "spaceId": 42,
                "fieldGroupPositionId": 42,
                "position": "string"
              }
            ],
            "autoAttach": true
          }
        ]
      },
      "FieldGroupEntity": {
        "title": "FieldGroup entity",
        "required": [
          "module",
          "fieldGroupPositionId"
        ],
        "properties": {
          "entityId": {
            "description": "Related entity id",
            "type": "integer"
          },
          "module": {
            "description": "Module name identifying the type of entity this field group is attached to (e.g. 'contact', 'custom-module-item').",
            "type": "string"
          },
          "spaceId": {
            "description": "ID of the space this field group attachment is scoped to.",
            "type": "integer"
          },
          "fieldGroupPositionId": {
            "description": "Positional slot ID that determines where the group appears within the entity layout.",
            "type": "integer"
          },
          "position": {
            "description": "Field group position in this entity. Common values: tab, form, form-top, top-todolist, case-top, case-bottom, contract-top, contract-bottom; a value outside these falls back to the module default position (e.g. 'bottom', or 'tab' for stock items). Not an enum — any string may be returned.",
            "type": "string"
          }
        },
        "type": "object",
        "example": {
          "entityId": 42,
          "module": "string",
          "spaceId": 42,
          "fieldGroupPositionId": 42,
          "position": "string"
        }
      },
      "FieldGroup": {
        "title": "FieldGroup",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "name": {
            "description": "Name of the Field Group.",
            "type": "string"
          },
          "module": {
            "description": "Module name this field group belongs to (e.g. 'contact', 'deal').",
            "type": "string"
          },
          "table": {
            "description": "Specific table within the module this field group targets; used when a module has multiple tables.",
            "type": "string"
          },
          "size": {
            "description": "Layout width of the field group in the UI (e.g. 'full', 'half').",
            "type": "string"
          },
          "weight": {
            "description": "Ordering index controlling the display sequence of field groups; lower values appear first.",
            "type": "integer"
          },
          "inputSize": {
            "description": "Default layout width applied to each field inside this group (e.g. 'full', 'half').",
            "type": "string"
          },
          "static": {
            "description": "Static HTML/text content rendered inside the group; used for informational or decorative groups with no input fields.",
            "type": "string"
          },
          "systemName": {
            "description": "Group system name - if set (non-changeable) - only for protected field groups",
            "type": "string"
          },
          "derivedFrom": {
            "description": "ID of group from which this group has been derived - only for protected field groups",
            "type": "integer"
          },
          "boostId": {
            "description": "Boost space internal record identification",
            "type": "string",
            "readOnly": true
          },
          "protected": {
            "description": "Marks field group as system default - non-changeable",
            "type": "boolean"
          },
          "inputs": {
            "description": "Ordered list of fields belonging to this field group.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Field"
            }
          },
          "entities": {
            "description": "Entity attachment records describing which records and positions this field group is rendered in.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldGroupEntity"
            }
          },
          "autoAttach": {
            "description": "When true, this field group is automatically attached to new records in the target module.",
            "type": "boolean"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "name": "Sample name",
          "module": "string",
          "table": "string",
          "size": "string",
          "weight": 1,
          "inputSize": "string",
          "static": "string",
          "systemName": "Sample systemName",
          "derivedFrom": 1,
          "boostId": "string",
          "protected": true,
          "inputs": [
            {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "createdUserId": 42,
              "name": "Sample name",
              "description": "string",
              "tooltip": "string",
              "percentUpTo100": true,
              "isLabel": "string",
              "className": "Sample className",
              "relatedEntityCfId": "string",
              "relatedValueCounterpart": true,
              "property": "string",
              "inputType": "related_entity",
              "required": true,
              "order=0": 1,
              "fieldGroups": [
                1
              ],
              "actionId": 42,
              "currencyId": 42,
              "inputOptions": [
                {}
              ],
              "remotes": [
                {
                  "id": "1",
                  "application": "string",
                  "delete": true
                }
              ],
              "spaces": [
                1
              ],
              "inputCalculation": "string",
              "relatedCustomModuleId": 42,
              "relatedEntityProperty": "string",
              "provider": "platform",
              "providerId": 42,
              "visible": true,
              "rollupRelationInputId": 42,
              "rollupTargetInputId": 42,
              "rollupAggregation": "showOriginal",
              "aiPrompt": "string",
              "aiVoiceTone": "auto",
              "aiLength": "auto",
              "aiFormatting": "text",
              "aiCreativity": "high",
              "aiType": "auto",
              "translatable": true
            }
          ],
          "entities": [
            {
              "entityId": 42,
              "module": "string",
              "spaceId": 42,
              "fieldGroupPositionId": 42,
              "position": "string"
            }
          ],
          "autoAttach": true
        }
      },
      "FieldInputs": {
        "title": "Array of multiple Field objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Field"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "name": "Sample name",
            "description": "string",
            "tooltip": "string",
            "percentUpTo100": true,
            "isLabel": "string",
            "className": "Sample className",
            "relatedEntityCfId": "string",
            "relatedValueCounterpart": true,
            "property": "string",
            "inputType": "related_entity",
            "required": true,
            "order=0": 1,
            "fieldGroups": [
              1
            ],
            "actionId": 42,
            "currencyId": 42,
            "inputOptions": [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "createdUserId": 42,
                "customFieldInputId": 42,
                "label": "string",
                "value": "string",
                "color": "#1f6feb"
              }
            ],
            "remotes": [
              {
                "id": "1",
                "application": "string",
                "delete": true
              }
            ],
            "spaces": [
              1
            ],
            "inputCalculation": "string",
            "relatedCustomModuleId": 42,
            "relatedEntityProperty": "string",
            "provider": "platform",
            "providerId": 42,
            "visible": true,
            "rollupRelationInputId": 42,
            "rollupTargetInputId": 42,
            "rollupAggregation": "showOriginal",
            "aiPrompt": "string",
            "aiVoiceTone": "auto",
            "aiLength": "auto",
            "aiFormatting": "text",
            "aiCreativity": "high",
            "aiType": "auto",
            "translatable": true
          }
        ]
      },
      "Field": {
        "title": "Field",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "description": "Name of the Input.",
            "type": "string"
          },
          "description": {
            "description": "Description of input",
            "type": "string"
          },
          "tooltip": {
            "description": "Content of tooltip.",
            "type": "string"
          },
          "percentUpTo100": {
            "description": "If true percent can be only 0 to 100.",
            "type": "boolean"
          },
          "isLabel": {
            "description": "If true input is used as a label",
            "type": "string"
          },
          "className": {
            "description": "Name of CSS class.",
            "type": "string"
          },
          "relatedEntityCfId": {
            "description": "This is the link for the field type related_value, linking to a related_entity field. The related_value field uses this link to load a module and entity ID.",
            "type": "string"
          },
          "relatedValueCounterpart": {
            "description": "This is an option for the field type related_entity that enables rendering the counterpart in the entity this field links to.",
            "type": "boolean"
          },
          "property": {
            "description": "It is used for the field type related_value. It describes which entity property should be load.",
            "type": "string"
          },
          "inputType": {
            "description": "Type of input",
            "type": "string",
            "enum": [
              "related_entity",
              "related_entities",
              "related_value",
              "image",
              "money",
              "rating",
              "percent",
              "text",
              "number",
              "float",
              "select",
              "multiselect",
              "datetime",
              "file",
              "wysiwyg",
              "checkbox",
              "checkbox_group",
              "radio",
              "hidden",
              "firstname",
              "lastname",
              "email",
              "phone",
              "address",
              "gdpr_accept",
              "cookies_accept",
              "newsletter_accept",
              "address_city",
              "address_post_code",
              "address_country",
              "calculation",
              "rollup",
              "date",
              "url",
              "ai",
              "button",
              "users"
            ]
          },
          "required": {
            "description": "Whether filling out this field is required when submitting the form (true = required, false = optional).",
            "type": "boolean"
          },
          "order=0": {
            "description": "Display order of this field within its field group; lower values appear first.",
            "type": "integer"
          },
          "fieldGroups": {
            "description": "IDs of the FieldGroup's this field belongs to, controlling where it is rendered.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "actionId": {
            "description": "The action to fire after the button click.",
            "type": "integer"
          },
          "currencyId": {
            "description": "ID of the currency used for the money input type.",
            "type": "integer"
          },
          "inputOptions": {
            "description": "In case of select or multiselect, set of options",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldOption"
            }
          },
          "remotes": {
            "description": "IDs of remote integrations linked to this field.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Remote"
            }
          },
          "spaces": {
            "description": "IDs of spaces this field's related_entity/related_value lookup is restricted to; empty means no restriction.",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "inputCalculation": {
            "description": "Formula used to compute the field value. The value is evaluated at read time and is not stored; the resulting FieldValue is read-only. Syntax: reference other fields of the same record with FIELD(\"Field Name\"), where the argument is the field's name (customFieldInputName) for custom fields, or the property name of a core column (e.g. FIELD(\"id\"), FIELD(\"created\")). String literals are written in double quotes (\"text\"), numbers as plain literals (42, 3.14), booleans as true/false. Operators: arithmetic + - * / % ^, comparison == != > < >= <=, logical && || !, parentheses for grouping. Functions are called as name(arg1, arg2, ...) and their names are case-insensitive. Available functions — arithmetic: sum, subtract, multiply, divide, mod, power, sqrt, abs, round, roundUp, roundDown, ceil, floor, average, max, min, count, countAll; logic: if, switch, and, or, not, xor, equals, greaterThan, lessThan, isEmpty, isNotEmpty, isError; text: concat, length, lower, upper, trim, contains, startsWith, endsWith, replace, substring, left, right, split, indexOf, regexMatch, regexExtract, regexReplace, format; date: now, today, dateAdd, dateSubtract, dateDiff, formatDate, year, month, day, weekday, isAfter, isBefore, workdays; array: arrayJoin, arrayUnique, arrayLength; conversion: toNumber, toString, toBoolean, toDate; record: field, recordId, createdAt, updatedAt, createdByUserId, createdByUserName. Example: if(FIELD(\"Deal Value\") > 1000, concat(\"VIP: \", FIELD(\"Company\")), \"Standard\"). Use POST /validate-calculation-function to check a formula before saving. Only works if type=calculation",
            "type": "string"
          },
          "relatedCustomModuleId": {
            "description": "ID of the custom module a related_entity/related_entities field links to. When null, the field's `module` column identifies the linked module.",
            "type": "integer"
          },
          "relatedEntityProperty": {
            "description": "Name of the related entity's property to load, used when the source is an entity property rather than a custom field.",
            "type": "string"
          },
          "provider": {
            "description": "AI provider used to generate the field value. Only works if type=ai",
            "type": "string",
            "enum": [
              "platform",
              "websearch",
              "custom"
            ]
          },
          "providerId": {
            "description": "ID of the provider configuration; used when provider=custom. Only works if type=ai",
            "type": "integer"
          },
          "visible": {
            "description": "Whether the field is visible (true = visible, false = hidden).",
            "type": "boolean"
          },
          "rollupRelationInputId": {
            "description": "ID of the relation field the rollup follows to reach the linked records; must be a field of inputType related_entity or related_entities. Required for the rollup to compute. Only works if type=rollup",
            "type": "integer"
          },
          "rollupTargetInputId": {
            "description": "ID of the custom field on the linked records whose values get aggregated; must not be a rollup or calculation field. Required for the rollup to compute. Only works if type=rollup",
            "type": "integer"
          },
          "rollupAggregation": {
            "description": "Aggregation function applied to the target field values of the linked records; the rollup's return type is derived from this aggregation and the target field's data type. Required for the rollup to compute. Only works if type=rollup",
            "type": "string",
            "enum": [
              "showOriginal",
              "showUnique",
              "countAll",
              "countValues",
              "countUniqueValues",
              "countEmpty",
              "countNotEmpty",
              "percentEmpty",
              "percentNotEmpty",
              "sum",
              "average",
              "median",
              "min",
              "max",
              "range",
              "earliestDate",
              "latestDate",
              "dateRange",
              "checked",
              "unchecked",
              "percentChecked",
              "percentUnchecked"
            ]
          },
          "aiPrompt": {
            "description": "The Prompt field is a text parameter used to define the specific input for generating responses or actions in OpenAI's models. Only works if type=ai",
            "type": "string"
          },
          "aiVoiceTone": {
            "description": "Determines the style and attitude of AI response. Only works if type=ai",
            "type": "string",
            "enum": [
              "auto",
              "professional",
              "casual",
              "straightforward",
              "confident",
              "friendly",
              "humorous",
              "inspirational"
            ]
          },
          "aiLength": {
            "description": "Specifies the desired extent of the content. Only works if type=ai",
            "type": "string",
            "enum": [
              "auto",
              "word_or_two",
              "sentence",
              "few_sentences",
              "paragraph",
              "three_paragraphs"
            ]
          },
          "aiFormatting": {
            "description": "Refers to the structural and visual organization of the content. Only works if type=ai",
            "type": "string",
            "enum": [
              "text",
              "formatted_text",
              "bullets",
              "numbered_list"
            ]
          },
          "aiCreativity": {
            "description": "Controls the expressiveness of the language in the content. Only works if type=ai",
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "aiType": {
            "description": "Specifies whether the AI field should be controlled automatically or manually.",
            "type": "string",
            "enum": [
              "auto",
              "manual"
            ]
          },
          "translatable": {
            "description": "Is field translatable",
            "type": "boolean"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "name": "Sample name",
          "description": "string",
          "tooltip": "string",
          "percentUpTo100": true,
          "isLabel": "string",
          "className": "Sample className",
          "relatedEntityCfId": "string",
          "relatedValueCounterpart": true,
          "property": "string",
          "inputType": "related_entity",
          "required": true,
          "order=0": 1,
          "fieldGroups": [
            1
          ],
          "actionId": 42,
          "currencyId": 42,
          "inputOptions": [
            {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "createdUserId": 42,
              "customFieldInputId": 42,
              "label": "string",
              "value": "string",
              "color": "#1f6feb"
            }
          ],
          "remotes": [
            {
              "id": "1",
              "application": "string",
              "delete": true
            }
          ],
          "spaces": [
            1
          ],
          "inputCalculation": "string",
          "relatedCustomModuleId": 42,
          "relatedEntityProperty": "string",
          "provider": "platform",
          "providerId": 42,
          "visible": true,
          "rollupRelationInputId": 42,
          "rollupTargetInputId": 42,
          "rollupAggregation": "showOriginal",
          "aiPrompt": "string",
          "aiVoiceTone": "auto",
          "aiLength": "auto",
          "aiFormatting": "text",
          "aiCreativity": "high",
          "aiType": "auto",
          "translatable": true
        }
      },
      "FieldOption": {
        "title": "FieldOption",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "customFieldInputId": {
            "description": "ID of parent field",
            "type": "integer"
          },
          "label": {
            "description": "Label of this option",
            "type": "string"
          },
          "value": {
            "description": "Internal stored value for this option; use this value (not the label) when setting a field value of type select or multiselect.",
            "type": "string"
          },
          "color": {
            "description": "Accent color for this option displayed in the UI, in 6-digit HEX format (e.g. '#FF5733').",
            "type": "string"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "customFieldInputId": 42,
          "label": "string",
          "value": "string",
          "color": "#1f6feb"
        }
      },
      "FieldValue": {
        "title": "FieldValue",
        "description": "A single custom field value attached to a record. The field is identified either by `customFieldInputId`, or by `customFieldInputName` + `module`. Values of computed fields (inputType `calculation` and `rollup`) are read-only: a calculation value is evaluated at read time from the field's `inputCalculation` formula and never stored, a rollup value is recomputed automatically from related records; writes to either are ignored.",
        "required": [
          "value"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier of this field value record.",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation datetime",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "valueWysiwyg": {
            "description": "Input value, stored as Wysiwig (inner db representation of TEXT value)",
            "type": "string",
            "readOnly": true
          },
          "valueInt": {
            "description": "Input value, stored as Integer (inner db representation of INT value",
            "type": "integer",
            "readOnly": true
          },
          "valueFloat": {
            "description": "Input value, stored as Float (inner db representation of DOUBLE value",
            "type": "number",
            "format": "float",
            "readOnly": true
          },
          "valueDatetime": {
            "description": "Input value, stored as Datetime (inner db representation of DATETIME value",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "valueModule": {
            "description": "Module of connected entity. It's only for values from connected-value fields.",
            "type": "string"
          },
          "value": {
            "description": "The field value as a string; the actual storage column (valueInt, valueFloat, valueDatetime, valueWysiwyg) used internally is determined by the field's inputType. For inputType `calculation` and `rollup` this value is computed by the system and read-only — see the schema description.",
            "type": "string"
          },
          "fileId": {
            "description": "ID of the uploaded file; used when the field inputType is 'file'.",
            "type": "integer"
          },
          "customFieldInputId": {
            "description": "Field id. If this field is not specified, ID is loaded using `customFieldInputName` and `module`",
            "type": "integer"
          },
          "module": {
            "description": "Module this field value belongs to",
            "type": "string",
            "oneOf": [
              {
                "$ref": "#/components/schemas/AllModulesDash"
              }
            ]
          },
          "table": {
            "description": "Module table (if module has more tables). If not filled, is loaded automatically",
            "type": "string"
          },
          "entityId": {
            "description": "ID of the record (within the given module) that this value is attached to.",
            "type": "integer"
          },
          "customFieldInputName": {
            "description": "Name of field which gets filled. Applied only when `customFieldInputId` is not set",
            "type": "string"
          },
          "selected": {
            "description": "TRUE if this value is selected (used for checkboxes and radio sets)",
            "type": "boolean"
          },
          "ipAddress": {
            "description": "IP address from which this value was submitted; used for GDPR, newsletter, and cookie acceptance inputs.",
            "type": "string"
          },
          "translatable": {
            "description": "Is field translatable",
            "type": "boolean"
          },
          "translations": {
            "$ref": "#/components/schemas/TranslationLanguage"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "valueWysiwyg": "string",
          "valueInt": 1,
          "valueFloat": 1.5,
          "valueDatetime": "2026-01-15T09:30:00Z",
          "valueModule": "string",
          "value": "string",
          "fileId": 42,
          "customFieldInputId": 42,
          "module": "activities",
          "table": "string",
          "entityId": 42,
          "customFieldInputName": "Sample customFieldInputName",
          "selected": true,
          "ipAddress": "string",
          "translatable": true,
          "translations": {
            "en": {
              "field1": "translation1",
              "field2": "translation2"
            },
            "it": {
              "field1": "translation1",
              "field2": "translation2"
            },
            "cs": {
              "field1": "translation1",
              "field2": "translation2"
            }
          }
        }
      },
      "Files": {
        "title": "Array of multiple File objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/File"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "statusId": 42,
            "statusSystemId": 42,
            "path": "string",
            "fileName": "Sample fileName",
            "name": "Sample name",
            "type": "string",
            "customType": 1,
            "storage": 1,
            "filesize": "string",
            "boostId": "string",
            "customFieldsValues": [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "valueWysiwyg": "string",
                "valueInt": 1,
                "valueFloat": 1.5,
                "valueDatetime": "2026-01-15T09:30:00Z",
                "valueModule": "string",
                "value": "string",
                "fileId": 42,
                "customFieldInputId": 42,
                "module": "activities",
                "table": "string",
                "entityId": 42,
                "customFieldInputName": "Sample customFieldInputName",
                "selected": true,
                "ipAddress": "string",
                "translatable": true,
                "translations": {
                  "en": {
                    "field1": "translation1",
                    "field2": "translation2"
                  },
                  "it": {
                    "field1": "translation1",
                    "field2": "translation2"
                  },
                  "cs": {
                    "field1": "translation1",
                    "field2": "translation2"
                  }
                }
              }
            ],
            "publicUrl": "https://acme.boost.space",
            "resize": [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "path": "string"
              }
            ],
            "status": {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "created_user_id": 42,
              "name": "Sample name",
              "color": "#1f6feb",
              "icon": "string",
              "icon_prefix": "string",
              "weight": 1,
              "status_system_id": 42,
              "boostId": "string",
              "spaces": [
                1
              ],
              "statusSystem": {}
            },
            "statusSystem": {
              "id": 42,
              "color": "#1f6feb",
              "icon_prefix": "string",
              "icon": "string",
              "module": "string",
              "weight": 1,
              "name": "Sample name",
              "system_name": "Sample system_name",
              "activated": 1,
              "custom": true,
              "allow_move": "string",
              "boostId": "string"
            },
            "labels": [
              []
            ],
            "isFeaturedImage": true,
            "usage": [
              []
            ]
          }
        ]
      },
      "FileUsages": {
        "title": "Array of multiple FileUsage objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/FileUsage"
        },
        "example": [
          {
            "name": 1
          }
        ]
      },
      "FileResize": {
        "title": "File resize information",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "path": {
            "description": "Full file-path",
            "type": "string"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "path": "string"
        }
      },
      "FileUsage": {
        "title": "File usage information",
        "properties": {
          "name": {
            "description": "ID of record in which this file is used for given module name",
            "type": "integer"
          }
        },
        "type": "object",
        "example": {
          "name": 1
        }
      },
      "File": {
        "title": "File",
        "required": [
          "statusSystemId"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last updated timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "statusId": {
            "description": "ID of the user-defined status applied to this file",
            "type": "integer"
          },
          "statusSystemId": {
            "description": "ID of the system status that determines the file lifecycle stage",
            "type": "integer"
          },
          "path": {
            "description": "Relative storage path where the file is persisted on the server or remote storage",
            "type": "string"
          },
          "fileName": {
            "description": "Internal filename as stored on disk (may differ from the original upload name)",
            "type": "string",
            "readOnly": true
          },
          "name": {
            "description": "Original file name (human-readable)",
            "type": "string"
          },
          "type": {
            "description": "MIME type of the file (e.g. image/png, application/pdf)",
            "type": "string",
            "readOnly": true
          },
          "customType": {
            "description": "ID of the custom type classification applied to this file",
            "type": "integer",
            "x-list-url": "/api/custom-type/file/customType"
          },
          "storage": {
            "description": "Storage flag (0 = local disk, non-zero = remote/cloud storage)",
            "type": "integer",
            "readOnly": true
          },
          "filesize": {
            "description": "Human-readable file size string (e.g. '4 kB')",
            "type": "string",
            "readOnly": true
          },
          "boostId": {
            "description": "Globally unique boost.space identifier for this record (UUID-like)",
            "type": "string",
            "readOnly": true
          },
          "customFieldsValues": {
            "description": "Values of space-specific custom fields attached to this file",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldValue"
            }
          },
          "publicUrl": {
            "description": "Publicly accessible URL for reading the file without authentication",
            "type": "string",
            "readOnly": true
          },
          "resize": {
            "title": "Array of thumbnails resizes",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileResize"
            }
          },
          "status": {
            "$ref": "#/components/schemas/Status",
            "description": "Full Status object for the user-defined status applied to this file"
          },
          "statusSystem": {
            "$ref": "#/components/schemas/StatusSystem",
            "description": "Full StatusSystem object for the system lifecycle status applied to this file"
          },
          "labels": {
            "description": "Labels attached to this file",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Labels"
            }
          },
          "isFeaturedImage": {
            "description": "When true, this image is used as the featured/cover image for the parent record",
            "type": "boolean"
          },
          "usage": {
            "description": "List of records across modules that reference this file",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileUsages"
            },
            "readOnly": true
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "statusId": 42,
          "statusSystemId": 42,
          "path": "string",
          "fileName": "Sample fileName",
          "name": "Sample name",
          "type": "string",
          "customType": 1,
          "storage": 1,
          "filesize": "string",
          "boostId": "string",
          "customFieldsValues": [
            {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "valueWysiwyg": "string",
              "valueInt": 1,
              "valueFloat": 1.5,
              "valueDatetime": "2026-01-15T09:30:00Z",
              "valueModule": "string",
              "value": "string",
              "fileId": 42,
              "customFieldInputId": 42,
              "module": "activities",
              "table": "string",
              "entityId": 42,
              "customFieldInputName": "Sample customFieldInputName",
              "selected": true,
              "ipAddress": "string",
              "translatable": true,
              "translations": {
                "en": {
                  "field1": "translation1",
                  "field2": "translation2"
                },
                "it": {
                  "field1": "translation1",
                  "field2": "translation2"
                },
                "cs": {
                  "field1": "translation1",
                  "field2": "translation2"
                }
              }
            }
          ],
          "publicUrl": "https://acme.boost.space",
          "resize": [
            {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "path": "string"
            }
          ],
          "status": {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "created_user_id": 42,
            "name": "Sample name",
            "color": "#1f6feb",
            "icon": "string",
            "icon_prefix": "string",
            "weight": 1,
            "status_system_id": 42,
            "boostId": "string",
            "spaces": [
              1
            ],
            "statusSystem": {
              "id": 42,
              "color": "#1f6feb",
              "icon_prefix": "string",
              "icon": "string",
              "module": "string",
              "weight": 1,
              "name": "Sample name",
              "system_name": "Sample system_name",
              "activated": 1,
              "custom": true,
              "allow_move": "string",
              "boostId": "string"
            }
          },
          "statusSystem": {
            "id": 42,
            "color": "#1f6feb",
            "icon_prefix": "string",
            "icon": "string",
            "module": "string",
            "weight": 1,
            "name": "Sample name",
            "system_name": "Sample system_name",
            "activated": 1,
            "custom": true,
            "allow_move": "string",
            "boostId": "string"
          },
          "labels": [
            [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "createdUserId": 42,
                "updated": "2026-01-15T09:30:00Z",
                "updatedUserId": 42,
                "spaces": {
                  "12": [
                    "contact",
                    "todo"
                  ],
                  "34": []
                },
                "name": "Sample name",
                "color": "#1f6feb",
                "type": "string",
                "module": "string",
                "editable": true
              }
            ]
          ],
          "isFeaturedImage": true,
          "usage": [
            [
              {
                "name": 1
              }
            ]
          ]
        }
      },
      "Labels": {
        "title": "Array of multiple Label objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Label"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "spaces": {
              "12": [
                "contact",
                "todo"
              ],
              "34": []
            },
            "name": "Sample name",
            "color": "#1f6feb",
            "type": "string",
            "module": "string",
            "editable": true
          }
        ]
      },
      "Label": {
        "title": "Label",
        "required": [
          "name",
          "color"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last updated timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "spaces": {
            "description": "Spaces this label is assigned to, and the optional per-space module restriction. Keys are space IDs; each value is an array of module names (in dash syntax) the label may be attached to within that space, or an empty array / null to allow all modules in that space. An empty `spaces` object makes the label global - visible to every space and every user.",
            "type": "object",
            "example": {
              "12": [
                "contact",
                "todo"
              ],
              "34": []
            },
            "additionalProperties": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "string"
              }
            }
          },
          "name": {
            "description": "Name of this label",
            "type": "string"
          },
          "color": {
            "description": "Color of this label",
            "type": "string"
          },
          "type": {
            "description": "Scope of this label. SHARED labels are visible to all users with access to the assigned spaces; a SHARED label with no spaces is global and visible to everyone.",
            "type": "string",
            "default": "SHARED"
          },
          "module": {
            "description": "Name of the module this label can be attached to. When set, the label can only be attached to records of this module. Leave empty to allow any module (subject to per-space restrictions in `spaces`).",
            "type": "string"
          },
          "editable": {
            "description": "Determines if label can be edited by currently logged user",
            "type": "boolean",
            "readOnly": true
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "spaces": {
            "12": [
              "contact",
              "todo"
            ],
            "34": []
          },
          "name": "Sample name",
          "color": "#1f6feb",
          "type": "string",
          "module": "string",
          "editable": true
        }
      },
      "Menus": {
        "title": "Array of multiple Menu objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Menu"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "modified": "2026-01-15T09:30:00Z",
            "entityId": 42,
            "parentId": 42,
            "customModuleId": 42,
            "spaceId": 42,
            "type": "module",
            "module": "string",
            "view": "string",
            "content": "string",
            "target": "string",
            "order": 1,
            "name": "Sample name",
            "color": "#1f6feb",
            "icon": "string",
            "display": true,
            "users": [
              1
            ],
            "teams": [
              1
            ],
            "categories": [
              1
            ]
          }
        ]
      },
      "Menu": {
        "title": "Menu",
        "required": [
          "name",
          "spaceId"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of the user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of the user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "modified": {
            "description": "Timestamp of the last modification of the menu item",
            "type": "string",
            "format": "date-time"
          },
          "entityId": {
            "description": "ID of the entity the menu item points to",
            "type": "integer"
          },
          "parentId": {
            "description": "ID of the parent menu item; null for top-level items",
            "type": [
              "integer",
              "null"
            ]
          },
          "customModuleId": {
            "description": "ID of the custom module the menu item is bound to",
            "type": "integer"
          },
          "spaceId": {
            "description": "ID of the space this menu item belongs to",
            "type": "integer"
          },
          "type": {
            "description": "Type of the menu item",
            "type": "string",
            "enum": [
              "module",
              "link",
              "folder",
              "custom-module"
            ]
          },
          "module": {
            "description": "System name of the module the item links to (for type 'module')",
            "type": "string"
          },
          "view": {
            "description": "View/action within the target module",
            "type": "string"
          },
          "content": {
            "description": "Link URL or custom content (for type 'link')",
            "type": "string"
          },
          "target": {
            "description": "Link target (e.g. _blank, _self)",
            "type": "string"
          },
          "order": {
            "description": "Sort order of the menu item within its level",
            "type": "integer"
          },
          "name": {
            "description": "Display name of the menu item",
            "type": "string"
          },
          "color": {
            "description": "Display color for the menu item in hex format (e.g. #FF5733)",
            "type": "string"
          },
          "icon": {
            "description": "Icon identifier for the menu item",
            "type": "string"
          },
          "display": {
            "description": "True if the menu item should be displayed, false otherwise",
            "type": "boolean"
          },
          "users": {
            "description": "IDs of users allowed to see this menu item",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "teams": {
            "description": "IDs of teams allowed to see this menu item",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "categories": {
            "description": "IDs of categories allowed to see this menu item",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "modified": "2026-01-15T09:30:00Z",
          "entityId": 42,
          "parentId": 42,
          "customModuleId": 42,
          "spaceId": 42,
          "type": "module",
          "module": "string",
          "view": "string",
          "content": "string",
          "target": "string",
          "order": 1,
          "name": "Sample name",
          "color": "#1f6feb",
          "icon": "string",
          "display": true,
          "users": [
            1
          ],
          "teams": [
            1
          ],
          "categories": [
            1
          ]
        }
      },
      "Spaces": {
        "title": "Array of multiple Space objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Space"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "name": "Sample name",
            "description": "string",
            "module": "string",
            "weight": 1,
            "status_system_id": 42,
            "status_id": 42,
            "color": "#1f6feb",
            "right": "project",
            "right_id": 42,
            "lft": 1,
            "rgt": 1,
            "trid": 42,
            "depth": 1,
            "parent_node_id": 42,
            "is_visible": true,
            "vectorSearchEnabled": true,
            "estimated_time": 1,
            "customModuleId": 42,
            "boostId": "string",
            "assigned_users": [
              1
            ],
            "assigned_categories": [
              1
            ],
            "assigned_teams": [
              1
            ],
            "users": {
              "owner": [
                1
              ],
              "manager": [
                1
              ],
              "member": [
                1
              ]
            },
            "teams": {
              "owner": [
                1
              ],
              "manager": [
                1
              ],
              "member": [
                1
              ]
            },
            "categories": {
              "owner": [
                1
              ],
              "manager": [
                1
              ],
              "member": [
                1
              ]
            },
            "status_system": {
              "id": 42,
              "color": "#1f6feb",
              "icon_prefix": "string",
              "icon": "string",
              "module": "string",
              "weight": 1,
              "name": "Sample name",
              "system_name": "Sample system_name",
              "activated": 1,
              "custom": true,
              "allow_move": "string",
              "boostId": "string"
            },
            "spacesAllowed": {
              "key": [
                1
              ]
            },
            "customFieldsValues": [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "valueWysiwyg": "string",
                "valueInt": 1,
                "valueFloat": 1.5,
                "valueDatetime": "2026-01-15T09:30:00Z",
                "valueModule": "string",
                "value": "string",
                "fileId": 42,
                "customFieldInputId": 42,
                "module": "activities",
                "table": "string",
                "entityId": 42,
                "customFieldInputName": "Sample customFieldInputName",
                "selected": true,
                "ipAddress": "string",
                "translatable": true,
                "translations": {
                  "en": {
                    "field1": "translation1",
                    "field2": "translation2"
                  },
                  "it": {
                    "field1": "translation1",
                    "field2": "translation2"
                  },
                  "cs": {
                    "field1": "translation1",
                    "field2": "translation2"
                  }
                }
              }
            ],
            "files": [
              {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "createdUserId": 42,
                "updated": "2026-01-15T09:30:00Z",
                "updatedUserId": 42,
                "statusId": 42,
                "statusSystemId": 42,
                "path": "string",
                "fileName": "Sample fileName",
                "name": "Sample name",
                "type": "string",
                "customType": 1,
                "storage": 1,
                "filesize": "string",
                "boostId": "string",
                "customFieldsValues": [
                  {
                    "id": 42,
                    "created": "2026-01-15T09:30:00Z",
                    "valueWysiwyg": "string",
                    "valueInt": 1,
                    "valueFloat": 1.5,
                    "valueDatetime": "2026-01-15T09:30:00Z",
                    "valueModule": "string",
                    "value": "string",
                    "fileId": 42,
                    "customFieldInputId": 42,
                    "module": "activities",
                    "table": "string",
                    "entityId": 42,
                    "customFieldInputName": "Sample customFieldInputName",
                    "selected": true,
                    "ipAddress": "string",
                    "translatable": true,
                    "translations": {
                      "en": {
                        "field1": "translation1",
                        "field2": "translation2"
                      },
                      "it": {
                        "field1": "translation1",
                        "field2": "translation2"
                      },
                      "cs": {
                        "field1": "translation1",
                        "field2": "translation2"
                      }
                    }
                  }
                ],
                "publicUrl": "https://acme.boost.space",
                "resize": [
                  {
                    "id": 42,
                    "created": "2026-01-15T09:30:00Z",
                    "path": "string"
                  }
                ],
                "status": {
                  "id": 42,
                  "created": "2026-01-15T09:30:00Z",
                  "created_user_id": 42,
                  "name": "Sample name",
                  "color": "#1f6feb",
                  "icon": "string",
                  "icon_prefix": "string",
                  "weight": 1,
                  "status_system_id": 42,
                  "boostId": "string",
                  "spaces": [
                    1
                  ],
                  "statusSystem": {}
                },
                "statusSystem": {
                  "id": 42,
                  "color": "#1f6feb",
                  "icon_prefix": "string",
                  "icon": "string",
                  "module": "string",
                  "weight": 1,
                  "name": "Sample name",
                  "system_name": "Sample system_name",
                  "activated": 1,
                  "custom": true,
                  "allow_move": "string",
                  "boostId": "string"
                },
                "labels": [
                  []
                ],
                "isFeaturedImage": true,
                "usage": [
                  []
                ]
              }
            ],
            "chatRooms": [
              1
            ],
            "pages": [
              1
            ],
            "reservable": true,
            "prestashopSync": true,
            "reservationUnit": "string",
            "gistSync": true,
            "accountingUnit": "string",
            "controls": [
              {}
            ],
            "editAllowSeconds": 1,
            "isVirtual": true,
            "businessContractMask": "string",
            "businessCaseMask": "string",
            "businessOfferMask": "string",
            "businessOrderMask": "string",
            "invoiceMask": "string",
            "purchaseMask": "string",
            "notificationOnSpaceCreate": true,
            "businessCaseAddButtonOptions": [
              "offer"
            ],
            "businessContractAddButtonOptions": [
              "offer"
            ]
          }
        ]
      },
      "RoleMatrix": {
        "title": "Role matrix",
        "properties": {
          "owner": {
            "description": "OWNER IDs",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "manager": {
            "description": "MANAGER IDs",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "member": {
            "description": "MEMBER IDs",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "type": "object",
        "example": {
          "owner": [
            1
          ],
          "manager": [
            1
          ],
          "member": [
            1
          ]
        }
      },
      "Space": {
        "title": "Space",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "description": "Name of the Space",
            "type": "string"
          },
          "description": {
            "description": "More detailed description of space",
            "type": "string"
          },
          "module": {
            "description": "Module type this space belongs to (e.g. contact, deal, todo, work, product, stock-item, business-process)",
            "type": "string"
          },
          "weight": {
            "description": "Weight, for ordering purposes",
            "type": "integer"
          },
          "status_system_id": {
            "description": "ID of the StatusSystem that provides the available statuses for records in this space",
            "type": "integer"
          },
          "status_id": {
            "description": "ID of the currently active Status for this space",
            "type": "integer"
          },
          "color": {
            "description": "Color in hex",
            "type": "string"
          },
          "right": {
            "description": "Name of parent module",
            "type": "string",
            "enum": [
              "project"
            ]
          },
          "right_id": {
            "description": "ID of the parent module record this space is nested under",
            "type": "integer"
          },
          "lft": {
            "description": "LEFT edge for tree identification (nested set model)",
            "type": "integer",
            "readOnly": true
          },
          "rgt": {
            "description": "RIGHT edge for tree identification (nested set model)",
            "type": "integer",
            "readOnly": true
          },
          "trid": {
            "description": "Tree Id identification (for multiple trees separation in nested set model)",
            "type": "integer",
            "readOnly": true
          },
          "depth": {
            "description": "Level of depth inside current tree (nested set model)",
            "type": "integer",
            "readOnly": true
          },
          "parent_node_id": {
            "description": "ID of the parent space in the nested set tree; null means this is a root-level space",
            "type": "integer"
          },
          "is_visible": {
            "description": "Whether this space is visible to non-owner users in listings",
            "type": "boolean"
          },
          "vectorSearchEnabled": {
            "description": "If true, text/wysiwyg field value writes inside this space are embedded synchronously and the /record/vector/* endpoints are available; if false, vector-search endpoints respond 403 (code 4237) and writes do not generate embeddings",
            "type": "boolean"
          },
          "estimated_time": {
            "description": "Amount of minutes as an estimated time for this todo list",
            "type": "integer"
          },
          "customModuleId": {
            "description": "ID of the custom module definition associated with this space, if it was created as a custom module space",
            "type": "integer"
          },
          "boostId": {
            "description": "Globally unique identifier for this record in the format EntityName0{id}, usable as a stable cross-entity reference",
            "type": "string",
            "readOnly": true
          },
          "assigned_users": {
            "description": "IDs of users directly assigned to this space",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "assigned_categories": {
            "description": "IDs of categories assigned to this space",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "assigned_teams": {
            "description": "IDs of teams assigned to this space",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "users": {
            "$ref": "#/components/schemas/RoleMatrix",
            "description": "Matrix of connected user ids with their respective roles"
          },
          "teams": {
            "$ref": "#/components/schemas/RoleMatrix",
            "description": "Matrix of connected team ids with their respective roles"
          },
          "categories": {
            "$ref": "#/components/schemas/RoleMatrix",
            "description": "Matrix of connected category ids with their respective roles"
          },
          "status_system": {
            "$ref": "#/components/schemas/StatusSystem",
            "description": "Status system object"
          },
          "spacesAllowed": {
            "description": "Sub-spaces permitted to be nested under this space, keyed by module, e.g. product =&gt; [11]",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          "customFieldsValues": {
            "description": "Custom fields",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldValue"
            }
          },
          "files": {
            "$ref": "#/components/schemas/Files",
            "description": "List of attached files"
          },
          "chatRooms": {
            "description": "Connected chat-room ids",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "pages": {
            "description": "Connected page ids",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "reservable": {
            "description": "If products in this space are reservable (module setting field, shown only on space module product )",
            "type": "boolean"
          },
          "prestashopSync": {
            "description": "If products in this space are synchronized with prestashop (module setting field, shown only on space type product)",
            "type": "boolean",
            "deprecated": true
          },
          "reservationUnit": {
            "description": "Sets minimal reservation unit for products in this space (module setting field, shown only on space type product )",
            "type": "string"
          },
          "gistSync": {
            "description": "If contacts in this space are synchronized with Gist (module setting field, shown only on space type contact)",
            "type": "boolean",
            "deprecated": true
          },
          "accountingUnit": {
            "description": "Accounting unit  (module setting field, shown only on space type contact or business process)",
            "type": "string"
          },
          "controls": {
            "description": "UI control configuration entries for the todo module (module setting field, shown only on space module todo)",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "editAllowSeconds": {
            "description": "How many seconds can work reports of this space be edited, after their creation. Used for locking purposes. (module setting field, shown only on space type work )",
            "type": "integer"
          },
          "isVirtual": {
            "description": "Determine if this stock is virtual (module setting field, shown only on space type stock )",
            "type": "boolean"
          },
          "businessContractMask": {
            "description": "Mask used for generating numbers of new Business Contract records (module setting field, shown only on space module business-process )",
            "type": "string"
          },
          "businessCaseMask": {
            "description": "Mask used for generating numbers of new Business Case records (module setting field, shown only on space module business-process )",
            "type": "string"
          },
          "businessOfferMask": {
            "description": "Mask used for generating numbers of new Business Offer records (module setting field, shown only on space module business-process )",
            "type": "string"
          },
          "businessOrderMask": {
            "description": "Mask used for generating numbers of new Business Order records (module setting field, shown only on space module business-process )",
            "type": "string"
          },
          "invoiceMask": {
            "description": "Mask used for generating numbers of new Invoice records  (module setting field, shown only on space module business-process )",
            "type": "string"
          },
          "purchaseMask": {
            "description": "Mask used for generating numbers of new Purchase records (module setting field, shown only on space module business-process )",
            "type": "string"
          },
          "notificationOnSpaceCreate": {
            "description": "Check for triggerring notifications about created sub-space (module setting field, shown only on space module business-process )",
            "type": "boolean"
          },
          "businessCaseAddButtonOptions": {
            "description": "Configures places where to display button Add business case (module setting field, shown only on space module business-process )",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "offer",
                "order",
                "reservation"
              ]
            }
          },
          "businessContractAddButtonOptions": {
            "description": "Configures places where to display button Add business contract (module setting field, shown only on space module business-process )",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "offer",
                "order",
                "reservation"
              ]
            }
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "name": "Sample name",
          "description": "string",
          "module": "string",
          "weight": 1,
          "status_system_id": 42,
          "status_id": 42,
          "color": "#1f6feb",
          "right": "project",
          "right_id": 42,
          "lft": 1,
          "rgt": 1,
          "trid": 42,
          "depth": 1,
          "parent_node_id": 42,
          "is_visible": true,
          "vectorSearchEnabled": true,
          "estimated_time": 1,
          "customModuleId": 42,
          "boostId": "string",
          "assigned_users": [
            1
          ],
          "assigned_categories": [
            1
          ],
          "assigned_teams": [
            1
          ],
          "users": {
            "owner": [
              1
            ],
            "manager": [
              1
            ],
            "member": [
              1
            ]
          },
          "teams": {
            "owner": [
              1
            ],
            "manager": [
              1
            ],
            "member": [
              1
            ]
          },
          "categories": {
            "owner": [
              1
            ],
            "manager": [
              1
            ],
            "member": [
              1
            ]
          },
          "status_system": {
            "id": 42,
            "color": "#1f6feb",
            "icon_prefix": "string",
            "icon": "string",
            "module": "string",
            "weight": 1,
            "name": "Sample name",
            "system_name": "Sample system_name",
            "activated": 1,
            "custom": true,
            "allow_move": "string",
            "boostId": "string"
          },
          "spacesAllowed": {
            "key": [
              1
            ]
          },
          "customFieldsValues": [
            {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "valueWysiwyg": "string",
              "valueInt": 1,
              "valueFloat": 1.5,
              "valueDatetime": "2026-01-15T09:30:00Z",
              "valueModule": "string",
              "value": "string",
              "fileId": 42,
              "customFieldInputId": 42,
              "module": "activities",
              "table": "string",
              "entityId": 42,
              "customFieldInputName": "Sample customFieldInputName",
              "selected": true,
              "ipAddress": "string",
              "translatable": true,
              "translations": {
                "en": {
                  "field1": "translation1",
                  "field2": "translation2"
                },
                "it": {
                  "field1": "translation1",
                  "field2": "translation2"
                },
                "cs": {
                  "field1": "translation1",
                  "field2": "translation2"
                }
              }
            }
          ],
          "files": [
            {
              "id": 42,
              "created": "2026-01-15T09:30:00Z",
              "createdUserId": 42,
              "updated": "2026-01-15T09:30:00Z",
              "updatedUserId": 42,
              "statusId": 42,
              "statusSystemId": 42,
              "path": "string",
              "fileName": "Sample fileName",
              "name": "Sample name",
              "type": "string",
              "customType": 1,
              "storage": 1,
              "filesize": "string",
              "boostId": "string",
              "customFieldsValues": [
                {
                  "id": 42,
                  "created": "2026-01-15T09:30:00Z",
                  "valueWysiwyg": "string",
                  "valueInt": 1,
                  "valueFloat": 1.5,
                  "valueDatetime": "2026-01-15T09:30:00Z",
                  "valueModule": "string",
                  "value": "string",
                  "fileId": 42,
                  "customFieldInputId": 42,
                  "module": "activities",
                  "table": "string",
                  "entityId": 42,
                  "customFieldInputName": "Sample customFieldInputName",
                  "selected": true,
                  "ipAddress": "string",
                  "translatable": true,
                  "translations": {
                    "en": {
                      "field1": "translation1",
                      "field2": "translation2"
                    },
                    "it": {
                      "field1": "translation1",
                      "field2": "translation2"
                    },
                    "cs": {
                      "field1": "translation1",
                      "field2": "translation2"
                    }
                  }
                }
              ],
              "publicUrl": "https://acme.boost.space",
              "resize": [
                {
                  "id": 42,
                  "created": "2026-01-15T09:30:00Z",
                  "path": "string"
                }
              ],
              "status": {
                "id": 42,
                "created": "2026-01-15T09:30:00Z",
                "created_user_id": 42,
                "name": "Sample name",
                "color": "#1f6feb",
                "icon": "string",
                "icon_prefix": "string",
                "weight": 1,
                "status_system_id": 42,
                "boostId": "string",
                "spaces": [
                  1
                ],
                "statusSystem": {}
              },
              "statusSystem": {
                "id": 42,
                "color": "#1f6feb",
                "icon_prefix": "string",
                "icon": "string",
                "module": "string",
                "weight": 1,
                "name": "Sample name",
                "system_name": "Sample system_name",
                "activated": 1,
                "custom": true,
                "allow_move": "string",
                "boostId": "string"
              },
              "labels": [
                []
              ],
              "isFeaturedImage": true,
              "usage": [
                []
              ]
            }
          ],
          "chatRooms": [
            1
          ],
          "pages": [
            1
          ],
          "reservable": true,
          "prestashopSync": true,
          "reservationUnit": "string",
          "gistSync": true,
          "accountingUnit": "string",
          "controls": [
            {}
          ],
          "editAllowSeconds": 1,
          "isVirtual": true,
          "businessContractMask": "string",
          "businessCaseMask": "string",
          "businessOfferMask": "string",
          "businessOrderMask": "string",
          "invoiceMask": "string",
          "purchaseMask": "string",
          "notificationOnSpaceCreate": true,
          "businessCaseAddButtonOptions": [
            "offer"
          ],
          "businessContractAddButtonOptions": [
            "offer"
          ]
        }
      },
      "Statuses": {
        "title": "Statuses",
        "description": "Array of objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Status"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "created_user_id": 42,
            "name": "Sample name",
            "color": "#1f6feb",
            "icon": "string",
            "icon_prefix": "string",
            "weight": 1,
            "status_system_id": 42,
            "boostId": "string",
            "spaces": [
              1
            ],
            "statusSystem": {
              "id": 42,
              "color": "#1f6feb",
              "icon_prefix": "string",
              "icon": "string",
              "module": "string",
              "weight": 1,
              "name": "Sample name",
              "system_name": "Sample system_name",
              "activated": 1,
              "custom": true,
              "allow_move": "string",
              "boostId": "string"
            }
          }
        ]
      },
      "Status": {
        "title": "Status",
        "required": [
          "name",
          "icon",
          "icon_prefix"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "created_user_id": {
            "description": "ID of the user who created this status",
            "type": "integer"
          },
          "name": {
            "description": "Status name",
            "type": "string"
          },
          "color": {
            "description": "Status color",
            "type": "string"
          },
          "icon": {
            "description": "Status icon",
            "type": "string"
          },
          "icon_prefix": {
            "description": "Font-icon library prefix used to render the icon (e.g. 'fas' for Font Awesome Solid)",
            "type": "string"
          },
          "weight": {
            "description": "Display order position; lower values appear first",
            "type": "integer"
          },
          "status_system_id": {
            "description": "ID of the StatusSystem this status belongs to",
            "type": "integer"
          },
          "boostId": {
            "description": "Globally unique identifier for this record in the format EntityName0{id}, usable as a stable cross-entity reference",
            "type": "string",
            "readOnly": true
          },
          "spaces": {
            "description": "IDs of spaces this status is scoped to; empty means the status is available globally within its StatusSystem",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "statusSystem": {
            "$ref": "#/components/schemas/StatusSystem",
            "description": "StatusSystem object"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "created_user_id": 42,
          "name": "Sample name",
          "color": "#1f6feb",
          "icon": "string",
          "icon_prefix": "string",
          "weight": 1,
          "status_system_id": 42,
          "boostId": "string",
          "spaces": [
            1
          ],
          "statusSystem": {
            "id": 42,
            "color": "#1f6feb",
            "icon_prefix": "string",
            "icon": "string",
            "module": "string",
            "weight": 1,
            "name": "Sample name",
            "system_name": "Sample system_name",
            "activated": 1,
            "custom": true,
            "allow_move": "string",
            "boostId": "string"
          }
        }
      },
      "StatusSystems": {
        "title": "StatusSystem",
        "description": "Array of objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/StatusSystem"
        },
        "example": [
          {
            "id": 42,
            "color": "#1f6feb",
            "icon_prefix": "string",
            "icon": "string",
            "module": "string",
            "weight": 1,
            "name": "Sample name",
            "system_name": "Sample system_name",
            "activated": 1,
            "custom": true,
            "allow_move": "string",
            "boostId": "string"
          }
        ]
      },
      "StatusSystem": {
        "title": "System status",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "color": {
            "description": "Status system color",
            "type": "string"
          },
          "icon_prefix": {
            "description": "Font-icon library prefix used to render the icon (e.g. 'fas' for Font Awesome Solid)",
            "type": "string"
          },
          "icon": {
            "description": "Status system icon",
            "type": "string"
          },
          "module": {
            "description": "Module type this status system is associated with (e.g. contact, deal, todo)",
            "type": "string"
          },
          "weight": {
            "description": "Display order position; lower values appear first",
            "type": "integer"
          },
          "name": {
            "description": "Status system name",
            "type": "string"
          },
          "system_name": {
            "description": "Internal system-level identifier for this status system, used to reference built-in status systems by a stable key",
            "type": "string"
          },
          "activated": {
            "description": "Whether this status system is active and available for use; 1 = active, 0 = inactive",
            "type": "integer"
          },
          "custom": {
            "description": "Whether this is a user-defined custom status system (1) or a built-in system status system (0)",
            "type": "boolean"
          },
          "allow_move": {
            "description": "Serialized JSON rule set defining which status transitions are permitted within this status system",
            "type": "string"
          },
          "boostId": {
            "description": "Globally unique identifier for this record in the format EntityName0{id}, usable as a stable cross-entity reference",
            "type": "string",
            "readOnly": true
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "color": "#1f6feb",
          "icon_prefix": "string",
          "icon": "string",
          "module": "string",
          "weight": 1,
          "name": "Sample name",
          "system_name": "Sample system_name",
          "activated": 1,
          "custom": true,
          "allow_move": "string",
          "boostId": "string"
        }
      },
      "Teams": {
        "title": "Array of multiple Team objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Team"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "name": "Sample name",
            "color": "#1f6feb",
            "fileId": 42,
            "statusSystemId": 42,
            "users": [
              1
            ],
            "resources": [
              1
            ],
            "status_system": {
              "id": 42,
              "color": "#1f6feb",
              "icon_prefix": "string",
              "icon": "string",
              "module": "string",
              "weight": 1,
              "name": "Sample name",
              "system_name": "Sample system_name",
              "activated": 1,
              "custom": true,
              "allow_move": "string",
              "boostId": "string"
            },
            "image_url": "https://acme.boost.space"
          }
        ]
      },
      "Team": {
        "title": "Team",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of the user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of the user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "description": "Display name of the team",
            "type": "string"
          },
          "color": {
            "description": "Display color for this team in hex format (e.g. #FF5733)",
            "type": "string"
          },
          "fileId": {
            "description": "ID of the file used as the team avatar image",
            "type": "integer"
          },
          "statusSystemId": {
            "description": "ID of the StatusSystem assigned to this team",
            "type": "integer"
          },
          "users": {
            "description": "IDs of users who are members of this team",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "resources": {
            "description": "IDs of resources assigned to this team",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "status_system": {
            "$ref": "#/components/schemas/StatusSystem",
            "description": "Expanded StatusSystem object"
          },
          "image_url": {
            "description": "URL of the team avatar image",
            "type": "string",
            "readOnly": true
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "name": "Sample name",
          "color": "#1f6feb",
          "fileId": 42,
          "statusSystemId": 42,
          "users": [
            1
          ],
          "resources": [
            1
          ],
          "status_system": {
            "id": 42,
            "color": "#1f6feb",
            "icon_prefix": "string",
            "icon": "string",
            "module": "string",
            "weight": 1,
            "name": "Sample name",
            "system_name": "Sample system_name",
            "activated": 1,
            "custom": true,
            "allow_move": "string",
            "boostId": "string"
          },
          "image_url": "https://acme.boost.space"
        }
      },
      "TranslationLanguage": {
        "type": "object",
        "example": {
          "en": {
            "field1": "translation1",
            "field2": "translation2"
          },
          "it": {
            "field1": "translation1",
            "field2": "translation2"
          },
          "cs": {
            "field1": "translation1",
            "field2": "translation2"
          }
        },
        "additionalProperties": {
          "type": "object"
        }
      },
      "Invitations": {
        "title": "Array of multiple Invitation objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Invitation"
        },
        "example": [
          {
            "id": 42,
            "email": "user@example.com",
            "role": "user",
            "hash": "string",
            "created": "2026-01-15T09:30:00Z",
            "accepted": 1,
            "teams": [
              1
            ],
            "categories": [
              1
            ]
          }
        ]
      },
      "Invitation": {
        "title": "Invitation",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "email": {
            "description": "Invited user mail",
            "type": "string"
          },
          "role": {
            "description": "Invited user role",
            "type": "string",
            "enum": [
              "user",
              "admin"
            ]
          },
          "hash": {
            "description": "One-time token embedded in the invitation link sent to the invited user",
            "type": "string"
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "accepted": {
            "description": "Whether the invited user has already accepted the invitation (0 = pending, 1 = accepted)",
            "type": "integer",
            "maximum": 1,
            "minimum": 0
          },
          "teams": {
            "description": "IDs of teams the invited user will be added to upon acceptance",
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "categories": {
            "description": "IDs of categories the invited user will be assigned to upon acceptance",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "email": "user@example.com",
          "role": "user",
          "hash": "string",
          "created": "2026-01-15T09:30:00Z",
          "accepted": 1,
          "teams": [
            1
          ],
          "categories": [
            1
          ]
        }
      },
      "UserRates": {
        "title": "Array of multiple UserRate objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/UserRate"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "caption": "string",
            "rate": 1,
            "validUntil": "2026-01-15T09:30:00Z"
          }
        ]
      },
      "UserRate": {
        "title": "User rate",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "caption": {
            "description": "Human-readable label identifying the purpose or context of this rate (e.g. 'Standard', 'After hours')",
            "type": "string"
          },
          "rate": {
            "description": "Hourly rate value for the user in the smallest currency unit",
            "type": "integer"
          },
          "validUntil": {
            "description": "Date and time until which this rate is valid; null or absent means the rate is currently active",
            "type": "string",
            "format": "date-time"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "caption": "string",
          "rate": 1,
          "validUntil": "2026-01-15T09:30:00Z"
        }
      },
      "Users": {
        "title": "Array of multiple User objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/User"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "labels": [
              1
            ]
          }
        ]
      },
      "User": {
        "title": "User",
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last updated timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "labels": {
            "description": "Connected labels IDs",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "labels": [
            1
          ]
        }
      },
      "ValueMetrics": {
        "title": "Array of multiple Value Metrics objects",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ValueMetric"
        },
        "example": [
          {
            "id": 42,
            "created": "2026-01-15T09:30:00Z",
            "createdUserId": 42,
            "updated": "2026-01-15T09:30:00Z",
            "updatedUserId": 42,
            "makeScenarioId": 42,
            "value": 1.5,
            "aiTokensLog": true,
            "label": "string"
          }
        ]
      },
      "ValueMetric": {
        "required": [
          "makeScenarioId",
          "value"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier - primary key",
            "type": "integer",
            "readOnly": true
          },
          "created": {
            "description": "Creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdUserId": {
            "description": "ID of user who created this record",
            "type": "integer",
            "readOnly": true
          },
          "updated": {
            "description": "Last updated timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedUserId": {
            "description": "ID of user who last updated this record",
            "type": "integer",
            "readOnly": true
          },
          "makeScenarioId": {
            "description": "ID of the Make (Integrator) scenario that triggers this metric increment",
            "type": "integer",
            "x-make-value": "{{scenario.id}}"
          },
          "value": {
            "description": "The numeric amount to add to the metric each time this module runs; can be a fixed number or dynamically sourced from other modules. Stored as decimal(20,6).",
            "type": "number",
            "format": "float",
            "x-default-value": 1
          },
          "aiTokensLog": {
            "description": "When true, the value amount is deducted from the organization AI Credits quota instead of incrementing the metric.",
            "type": "boolean",
            "x-advanced": true,
            "x-default-value": false
          },
          "label": {
            "description": "The name of the metric or event being tracked (e.g. ‘New Lead’, ‘Sale Completed’).",
            "type": "string"
          }
        },
        "type": "object",
        "example": {
          "id": 42,
          "created": "2026-01-15T09:30:00Z",
          "createdUserId": 42,
          "updated": "2026-01-15T09:30:00Z",
          "updatedUserId": 42,
          "makeScenarioId": 42,
          "value": 1.5,
          "aiTokensLog": true,
          "label": "string"
        }
      }
    },
    "responses": {
      "400": {
        "description": "Bad request — the input payload is invalid, missing required fields, or fails validation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized — no valid authentication token was provided, or the token has expired. Authenticate by passing a valid Bearer token in the `Authorization` header.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden — the authenticated user does not have permission to perform this action. Common causes: missing space membership, insufficient role (e.g. Member trying a Manager-only action), or accessing a record in a space the user cannot view.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Not found — the requested resource does not exist or is not accessible to the caller. Common causes: invalid ID, record deleted, or record belongs to a different space.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "500": {
        "description": "Internal server error — an unexpected error occurred. This is not caused by the caller.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "200_deleted": {
        "description": "Record succesfully deleted",
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "id": {
                  "description": "Id of deleted record",
                  "type": "integer",
                  "readOnly": true
                },
                "remotes": {
                  "description": "Remote ids",
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Remote"
                  }
                }
              },
              "type": "object"
            }
          }
        }
      },
      "201_blank": {
        "description": "Succesfully created",
        "content": {
          "text/plain": {
            "example": ""
          }
        }
      },
      "200_deleted_array": {
        "description": "Records succesfully deleted",
        "content": {
          "application/json": {
            "schema": {
              "description": "Ids array of deleted records",
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "parameters": {
      "offset": {
        "name": "offset",
        "in": "query",
        "description": "Zero-based index of the first record to return. Use together with `limit` for pagination. Example: `offset=20&limit=10` returns records 21–30.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum number of records to return. Use together with `offset` for pagination.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "order": {
        "name": "order",
        "in": "query",
        "description": "Sort order for results. Comma-separated list of `field;DIRECTION` pairs. Direction is `ASC` or `DESC` (default `DESC` when omitted). Example: `order=name;ASC` or `order=id;ASC,name;DESC`.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "filter": {
        "name": "filter",
        "in": "query",
        "description": "Filter expression to narrow results. Format: `field operator value`. Multiple conditions are joined with `;` or `&` (AND) or `|` (OR). Conditions can be grouped with parentheses. Supported operators: `=` (equals; also matches NULL when value is empty), `!=` (not equals), `>`, `>=`, `<`, `<=`, `~` (LIKE, use `%` as wildcard; empty value matches NULL/empty), `!~` (NOT LIKE), `...` (IN set, comma-separated: `statusId...1,2,3`). OR across values for one field: `status=(active|pending)`. Examples: `filter=name=Acme`, `filter=created>=2024-01-01;assigneeId=`, `filter=name~%smith%;statusId...1,2,3`, `filter=(status=active|status=pending)&spaceId=5`.",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "Token": {
        "type": "http",
        "description": "Bearer token, created in boost.space user's profile to authorize requests as certain user",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "Token": []
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "<p>Handles all aspects of authentication and identity in Boost.space.</p>\n<h3>Session login</h3>\n<p>POST <code>/auth</code> authenticates with email/password and establishes a server-side session valid for 20 minutes (sliding — every request resets the timeout). DELETE <code>/auth</code> logs out and invalidates the session.</p>\n<h3>Two-factor authentication (2FA)</h3>\n<p>When 2FA is enabled on an account, a successful POST <code>/auth</code> returns error <code>E4031</code> instead of a session. The client must then POST <code>/auth/2fa</code> with the TOTP code to complete login. 2FA setup and per-user device management is handled under <code>/user/{userId}/2fa</code>.</p>\n<h3>Bearer token authentication</h3>\n<p>Private tokens are generated via POST <code>/auth/{userId}/token</code>. Pass the token in every request as <code>Authorization: Bearer &lt;TOKEN&gt;</code> or <code>X-Authorization: Bearer &lt;TOKEN&gt;</code>. Each token carries per-module CRUD permission scopes. Bearer tokens do not use sessions and do not have sliding expiry.</p>\n<h3>Token priority</h3>\n<p><code>/auth/token-priority</code> controls which authentication method takes precedence when multiple valid credentials are present in a single request.</p>\n<h3>OAuth 2.0</h3>\n<p>Boost.space acts as an OAuth 2.0 authorization server. <code>/auth/oauth/client</code> manages registered OAuth clients. <code>/auth/oauth/token</code> issues access tokens, <code>/auth/oauth/renew</code> refreshes them, and <code>/auth/oauth/revoke</code> revokes them. <code>/auth/oauth/authorize</code> is the authorization endpoint for the authorization code flow.</p>\n<h3>Social login</h3>\n<p>Login via Facebook (<code>/auth/facebook</code>), Google (<code>/auth/google</code>), LinkedIn (<code>/auth/linkedin</code>), and X (<code>/auth/x</code>) is supported through OAuth redirects.</p>\n<h3>Field history</h3>\n<p><code>/auth/field-history/{module}/{recordId}</code> returns the audit log of field changes made by the currently authenticated user for a given record.</p>"
    },
    {
      "name": "Modules",
      "description": "<p>User-defined modules that extend the platform with fully custom record types, beyond the built-in modules (Contact, Todo, Business Case, etc.).</p>\n * <p>A <strong>Module</strong> definition specifies the module's name, icon, and configuration. <strong>Records</strong> are the individual records within that module — they support statuses, labels, files, comments, and fields just like built-in entities.</p>\n * <p><strong>Items</strong> are accessed via <code>/module/{moduleId}/item</code>. Each item belongs to a <strong>Space</strong> and uses the same <code>customFieldsValues</code> pattern for dynamic fields. Use <code>GET /custom-field/of/{moduleName}/{spaceId}</code> to discover available fields.</p>\n * <p><strong>Permissions:</strong> Scoped to the item's space. Caller must have at least Member role to read, Manager or Owner to write.</p>"
    },
    {
      "name": "Records",
      "description": "<p>Records within a user-defined Module. Supports full CRUD, file attachments, and remote upsert via integration pair mapping.</p>"
    },
    {
      "name": "Spaces",
      "description": "<p>Organisational containers that scope all records in the system. Every entity (Contact, Todo, Business Case, Invoice, etc.) belongs to exactly one Space.</p>\n * <p><strong>Hierarchy:</strong> Spaces can be nested via <code>parent_node_id</code>. Child spaces inherit role assignments from their parent unless explicitly overridden by setting their own <code>users</code> map.</p>\n * <p><strong>Roles:</strong> Owner → Manager → Member. The creator of a space is always assigned as Owner. For spaces without a parent, the <code>users</code> map must be provided on creation (or the creator is auto-set as sole Owner).</p>\n * <p><strong>Module type:</strong> The <code>module</code> field specifies the type of space (e.g. contact, todo, business-case, custom module). <code>Menu</code>-type spaces are navigation containers and require <code>administration</code> permission to create.</p>\n * <p><strong>File attachments:</strong> Spaces support cover images and attachments via <code>/space/{id}/file</code>.</p>"
    },
    {
      "name": "Field Groups",
      "description": "<p>Field groups are the containers that organise related <strong>Fields</strong> within a space. This tag covers the group lifecycle (create, read, update, delete); the fields inside a group are managed under <strong>Fields</strong>.</p>"
    },
    {
      "name": "Fields",
      "description": "<p>Dynamic schema extension system that adds per-space fields to any supported module (Contact, Business Case, Todo, Invoice, and more).</p>\n * <p><strong>Three-level hierarchy:</strong></p>\n * <ol>\n *   <li><strong>Field Group</strong> (<code>/field-group</code>) — a named container that groups related fields. Groups are attached to spaces or directly to specific records via the <code>spaces</code> or <code>entities</code> properties.</li>\n *   <li><strong>Field</strong> (<code>/field</code>) — a single field definition within a group. Defines the <code>inputType</code> (text, email, date, datetime, money, url, select, multiselect, ...), validation rules, and display options. Once a field has been used, its <code>inputType</code> cannot be changed.</li>\n *   <li><strong>Field Value</strong> — the per-record value stored when creating or updating an entity. Pass values inside <code>customFieldsValues</code> on any supported entity request, referencing fields by <code>customFieldInputId</code> or <code>customFieldInputName</code>.</li>\n * </ol>\n * <p>Use <code>GET /field/of/{module}/{spaceId}</code> to discover all fields available for a specific module and space.</p>\n * <p>For select/multiselect fields, submit the option <code>value</code> (not the display label). Use <code>GET /field/{id}</code> to retrieve valid option values.</p>"
    },
    {
      "name": "Files",
      "description": "<p>Central file storage and management. Files are uploaded via a resumable chunked upload protocol and can be attached to any supported entity (Contact, Todo, Business Case, Product, etc.).</p>\n * <p><strong>Upload flow:</strong> Use <code>POST /{module}/{id}/file</code> with <code>multipart/form-data</code> and the resumable chunk parameters (<code>resumableChunkNumber</code>, <code>resumableIdentifier</code>, <code>resumableTotalChunks</code>, etc.). Poll upload progress with <code>GET /{module}/{id}/file?resumableIdentifier={id}</code>.</p>\n * <p><strong>Download:</strong> <code>GET /file/{fileId}/download</code> streams the file. MIME type and file size are validated on upload. Storage path is sanitised to prevent directory traversal.</p>\n * <p><strong>Permissions:</strong> File access follows the permissions of the parent entity it is attached to.</p>"
    },
    {
      "name": "Labels",
      "description": "<p>Coloured tags used to categorise and filter records across modules (Todo, Business Case, Business Offer, Business Order, Contact, Note, Page, Invoice, Purchase, Product, Chart, File, and more).</p>\n * <p>A label is assigned to one or more spaces via the <code>spaces</code> field. A label with no spaces is <strong>global</strong>: it is visible to every user and can be attached to records in any space. A label assigned to specific spaces is visible to users who have access to at least one of those spaces.</p>\n * <p><strong>Module scoping:</strong> a label can only be attached to a record whose module matches the label's module constraint. The constraint is the global <code>module</code> field, or - more granularly - the list of modules configured per space inside <code>spaces</code>. A label with no module constraint can be attached to records of any module.</p>\n * <p>Labels are attached to records via sub-resource endpoints: <code>POST /{module}/{id}/label/{labelId}</code>.</p>\n * <p>When listing labels, the <code>space</code> query parameter restricts the result to labels belonging to the given space(s). It accepts a single space ID or a comma-separated list (e.g. <code>?space=12,34</code>). Global labels (those with no space assigned) are always included regardless of the filter.</p>"
    },
    {
      "name": "Statuses",
      "description": "<p>Workflow statuses that represent the current state of a record (e.g. New, In Progress, Closed) and the workflows that group them. Statuses come in two levels, both managed under this tag.</p><p>A <strong>status-system</strong> (<code>/status-system</code>) is a named workflow (pipeline) bound to a module &mdash; e.g. &quot;Invoice pipeline&quot; or &quot;Support tickets&quot;. It defines which statuses exist for that module and the rules for moving between them. Its <code>module</code> field binds it to a module and <code>systemName</code> is a stable machine-readable identifier for built-in workflows; <code>actived</code> marks it enabled, and when <code>custom=false</code> it is platform-defined and cannot be deleted. Transitions are validated by its <code>allowMove</code> rules.</p><p>A <strong>status</strong> (<code>/status</code>) is a single state inside one of those workflows. Each status has a <code>name</code>, <code>color</code>, <code>icon</code>, <code>icon_prefix</code>, and <code>weight</code> (display order), and always belongs to a status-system via <code>statusSystemId</code>. Custom statuses can be added by users; system statuses (<code>custom=false</code>) are platform-defined and have restricted modification.</p><p>In short: the status-system is the container/workflow, the status is an individual state within it. When transitioning a record, use the <code>statusId</code> field along with <code>statusSystemId</code>; the API enforces that the target status belongs to the record's bound workflow.</p><p><strong>Status Actions</strong> (<code>/status/{id}/action</code>) define automated side-effects triggered on status change (e.g. send email, trigger notification).</p>"
    },
    {
      "name": "Menus",
      "description": "<p>Menu items define the navigation shown in a space. Items can point to modules, custom modules, external links or act as folders, and their visibility is controlled per user, team and category.</p>"
    },
    {
      "name": "Users",
      "description": "<p>Platform users — people who have an account on the Boost.space instance.</p><p>Users have roles (<code>admin</code> or regular), are organised into <strong>Teams</strong>, and assigned to <strong>Spaces</strong> with role-based permissions (Owner / Manager / Member). A user's accessible spaces and permissions determine what data they can read or modify.</p><p><strong>Sub-resources:</strong> API tokens (<code>/user/{id}/token</code>), invitations (<code>/user/invitation</code>), hourly rates (<code>/user/{id}/rate</code>), 2FA setup (<code>/user/{id}/two-factor</code>), and column display preferences (<code>/user/{id}/column-settings</code>).</p><p><strong>Permissions:</strong> Regular users can only read and update their own profile. Admin users can manage all users. Sensitive fields (password, tokens) are never returned in responses.</p>"
    },
    {
      "name": "Teams"
    },
    {
      "name": "Categories"
    },
    {
      "name": "Vector Database",
      "description": "<p>Semantic vector search over the AI embeddings of records within a chosen space. These endpoints require the space to have <code>vectorSearchEnabled</code>.</p><ul><li><strong>similar</strong> — records most similar to a reference record or query.</li><li><strong>outliers</strong> — records that deviate most from the rest of the set.</li><li><strong>context</strong> — the surrounding records that give a record its context.</li></ul><p>Results can be narrowed with either a <code>filter</code> expression or a <code>segment_id</code>. The two are mutually exclusive — supply at most one.</p>"
    },
    {
      "name": "AI Features",
      "description": "<p>AI-powered features of the platform: content and field/module generation, column-data transformation and validation (including validation results), and calculation-function validation. Chat, provider configuration and the internal transformer are not part of the public surface.</p>"
    },
    {
      "name": "Value Metrics",
      "description": "<p>Numerical metric snapshots collected from Make (Integromat) scenario executions, used to track KPIs and business values over time.</p>\n * <p>Each ValueMetric record stores a <code>value</code> (float), an optional <code>label</code>, a <code>makeScenarioId</code> reference, and a timestamp. Metrics are collected automatically when a Make scenario reports a value.</p>\n * <p>Used by <strong>Dashboard</strong> widgets and <strong>Chart</strong> components to plot trends and aggregated metrics.</p>"
    }
  ],
  "x-ext-urls": {}
}